Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16160] iOS: Adding more than one view to a scrollableview with addView does not work

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2014-08-22T09:30:36.000+0000
Affected Version/sRelease 3.2.0
Fix Version/sRelease 3.4.0
ComponentsiOS
Labels3.2.0GA, ios, module_scrollableview, qe-manualtest
ReporterJens F.
AssigneeIngo Muschenetz
Created2014-01-09T08:55:18.000+0000
Updated2014-08-22T09:30:36.000+0000

Description

add more than one webview to a scrollableview with addView is not working with Ti SDK 3.2.0 this code doesn't work, webviews won't load {color:red} var win = Ti.UI.createWindow(); var scrollableview = Ti.UI.createScrollableView(); win.add(scrollableview); var webview1 = Ti.UI.createWebView({ url: "http://www.appcelerator.com", }); scrollableview.addView(webview1); var webview2 = Ti.UI.createWebView({ url: "http://www.google.com", }); scrollableview.addView(webview2); win.open(); {color} this only happens if adding webviews with scrollableview.addView. if the views will be assigned on creation there is no problem with the webviews. see the following code {color:green} var win = Ti.UI.createWindow(); var webview1 = Ti.UI.createWebView({ url: "http://www.appcelerator.com", }); var webview2 = Ti.UI.createWebView({ url: "http://www.google.com", }); var scrollableview = Ti.UI.createScrollableView({ views: [ webview1, webview2 ] }); win.add(scrollableview); win.open(); {color} this code is working fine. so there is no possibility to add webviews to the scrollableviews at runtime.

Comments

  1. Ritu Agrawal 2014-01-10

    Moving this ticket to engineering as I can reproduce both working and non working cases with the provided test cases.
  2. Jason Kneen 2014-01-10

    Getting this also. WebView in a scrollable view doesn't load HOWEVER if I scroll through all the views (webview and then images) and get to the last one, THEN go back to the webview it has loaded.
  3. Jason Kneen 2014-01-10

    Workaround based on code above worked. 1. Create array 2. push views to array 3. create ScrollableView on the fly, views = your array This works fine. In Alloy, I simply replaced the scrollableView with a view wrapper, created the scrollableView in the code.
  4. Ritu Agrawal 2014-01-14

    Note that this issue is not specific to web views and can be reproduced with other views as well. TC-3565 has been marked as a duplicate of this ticket.
  5. Shameer Jan 2014-08-21

    Issue reproduced with SDK Version 3.2.0 GA But cannot be reproduced with SDK 3.4.0 GA CLI version 3.3.0, Titanium SDK version 3.4.0 Titanium SDK version 3.2.0 iOS SDK: 7.1 Appcelerator Studio, build: 3.3.0.201407111535
  6. Satyam Sekhri 2014-08-22

    A scrollableview with more than one webview added using addview works correct. Verified on: Appc Studio: 3.4.0.201408210941 SDK: 3.4.0.v20140821144114 CLI: 3.4.0-Dev XCode: Xcode6-Beta6 Devices: iPhone 4 (v7.1), iPhone 5S (v8.0 beta), iOS Simulator (7.0.3)

JSON Source