{ "id": "134185", "key": "AC-3253", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2014-09-01T06:12:06.000+0000", "created": "2014-08-05T15:48:26.000+0000", "labels": [ "TCSupportTriage" ], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:57:40.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "The default deceleration rate for the scrollview attached to a UiWebview is \r\nUIScrollViewDecelerationRateFast. This makes all webviews in TI, feel/appear/be perceived as running slower than other kinds of native views.\r\n\r\nI would suggest either:\r\n\r\n1. Expose a scrollmode property for Ti.UI.WebView (there seems to be some logic behind this for very complex html that requires a lot of rendering)\r\n2. Change the scrollmode such that around line 145 of TiUiWebView.m, add the following line.\r\n\r\n{code}\r\nwebview.scrollView.decelerationRate = UIScrollViewDecelerationRateNormal;\r\n{code}\r\n\r\nI enabled this in my SDK, and the results are astounding. Webviews become indistinguishable from other kinds of scrollviews.\r\n", "attachment": [], "flagged": false, "summary": "Expose Scrollmode for UIWebView.scrollView", "creator": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS", "comment": { "comments": [ { "id": "317839", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello,\r\ndo you have a reference website that clearly shows to be slow? So we can provide a testcase to the Platform team.\r\n\r\nBest Regards!", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-08-10T07:26:00.000+0000", "updated": "2014-08-10T07:26:00.000+0000" }, { "id": "317877", "author": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It's not a case of a specific website being slow, more specifically, this is a concern when using the WebView to generate app content (e.g. a list, a gallery, some other complex html)\r\n\r\nThe default decelerationRate for the scrollView attached to UiWebView is \"UIScrollViewDecelerationRateFast\" while the default decelerationRate for a simple UiScrollView is \"UIScrollViewDecelerationRateNormal\". This means that, when creating a Ti.UI.WebView under iOS it will have a different deceleration speed than Ti.UI.ScrollView (or Ti.UI.TableView / ListView). Thus the webview will scroll to a stop very quickly (no matter how fast the user flicks the screen). This make WebViews, used for generating app content seem very different than other native views (e.g. list, scroll, table). \r\n\r\nMy contention is that the deceleration rate of the webview should match that of other native views (as it is on Android and MobileWeb). If this was about opening Amazon.com (or any other website) in a Webview, I wouldn't have brought this up.\r\n\r\n", "updateAuthor": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-10T17:20:15.000+0000", "updated": "2014-08-10T17:20:15.000+0000" }, { "id": "321185", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "If customer provides a sample website that shows the slow scroll, will reopen. \r\n\r\n", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-09-01T06:12:06.000+0000", "updated": "2014-09-01T06:12:06.000+0000" }, { "id": "321264", "author": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Did you read my description from above at all? This isn't about a website, but about the difference between scroll deceleration rates of UiScroolViews.", "updateAuthor": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-02T02:42:10.000+0000", "updated": "2014-09-02T02:42:10.000+0000" }, { "id": "327113", "author": { "name": "ludolphus", "key": "ludolphus", "displayName": "Steven van Loef", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "You might want to have a look at this module https://github.com/ryugoo/TiExtendWeb I think it does what you want. ", "updateAuthor": { "name": "ludolphus", "key": "ludolphus", "displayName": "Steven van Loef", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-10-07T08:16:02.000+0000", "updated": "2014-10-07T08:16:02.000+0000" }, { "id": "327123", "author": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks for the tip. \r\n\r\nI'd rather not use a module, as my app is tri platform, soon to be quad platform. I'm just hacking the SDK for the time being, as I'm not sure Mauro understood what this request was about. If you read his comment, he is under the impression this is about some sort of slow scrolling of a website, when it is only about deceleration rates. \r\n\r\nFrom the module you linked, it becomes pretty clear\r\n\r\n{code}\r\n- (void)setNormalScrollSpeed_:(id)args\r\n{\r\n BOOL normalSpeed = [TiUtils boolValue:args def:NO];\r\n UIScrollView *scrollView = [self performSelector:@selector(scrollview)];\r\n if (normalSpeed == YES) {\r\n [scrollView setDecelerationRate:UIScrollViewDecelerationRateNormal];\r\n } else {\r\n [scrollView setDecelerationRate:UIScrollViewDecelerationRateFast];\r\n }\r\n}\r\n{code}\r\n\r\nEvery scrolling view in Titanium uses: UIScrollViewDecelerationRateNormal except Ti.UI.Webview, which uses UIScrollViewDecelerationRateFast\r\n\r\nThus, when using the Webview to display local html-based views, along side native scrollviews, list views, table views, it seems clunky/broken as it slows at a much different rate than the other views.", "updateAuthor": { "name": "andrew@gstreetmedia.com", "key": "andrew@gstreetmedia.com", "displayName": "Andrew Greenstreet", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-07T14:16:55.000+0000", "updated": "2014-10-07T14:16:55.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }