[TIMOB-8413] iOS: Ti.UI.WebView disable bounce through property
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 1.8.2 |
Fix Version/s | n/a |
Components | iOS |
Labels | SupportTeam |
Reporter | Junaid Younus |
Assignee | Unknown |
Created | 2012-03-29T10:31:50.000+0000 |
Updated | 2018-03-06T18:58:00.000+0000 |
Description
*Issue*
Customer wants to be able to disable Ti.UI.WebView bounce via a property.
*Code*
This is what is required to be added to the TiUIWebView.m file:
#define PAGE_VERTICAL_BOUNCE false
if (!PAGE_VERTICAL_BOUNCE) {
for (id subview in webview.subviews)
if ([[subview class] isSubclassOfClass: [UIScrollView class]])
((UIScrollView *)subview).bounces = NO;
}
Before: [self addSubview:webview];
*Notes*
-I created this ticket as a bug, since this is possible to do natively.
-Customer request: Is there a way this can be included as a feature in future SDK release by adding additional boolean property to webview called bounce?
-HD ticket: http://support-admin.appcelerator.com/display/APP-296567
There is a correction in above code '#' stmbol before define is missing: #define PAGE_VERTICAL_BOUNCE false if (!PAGE_VERTICAL_BOUNCE) { for (id subview in webview.subviews) if ([[subview class] isSubclassOfClass: [UIScrollView class]]) ((UIScrollView *)subview).bounces = NO; } Before: [self addSubview:webview];
Edited the code to reflect the correct syntax.
Before: [self addSubview:webview]; is not part of code... its a hint, that we have to add code before this->"[self addSubview:webview];" line.