Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19908] iOS: Ti.UI.ScrollableView was not shown

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2016-04-04T13:39:44.000+0000
Affected Version/sRelease 5.1.0
Fix Version/sRelease 5.4.0
ComponentsiOS
LabelsAL-5.4.0, autolayout, notable, qe-5.4.0
ReporterKosuke Isobe
AssigneeChee Kiat Ng
Created2015-11-10T23:50:43.000+0000
Updated2016-07-07T19:41:54.000+0000

Description

In use-autolayout enabled and specification the width/height properties. Test case. *tiapp.xml*
<ios>
  <use-autolayout>true</use-autolayout>
</ios>
*app.js*
var win = Ti.UI.createWindow(),
  view0 = Ti.UI.createView({
    backgroundColor: 'red'
  }),
  view1 = Ti.UI.createView({
    backgroundColor: 'green'
  }),
  view2 = Ti.UI.createView({
    backgroundColor: 'blue'
  }),
  scrollableview = Ti.UI.createScrollableView({
    width: 200, // not the Ti.UI.FILL or SIZE
    height: 200, // not the Ti.UI.FILL or SIZE
    views: [
      view0,
      view1,
      view2
    ]
  });

win.add(scrollableview);
win.open();

Comments

  1. Pedro Enrique 2015-12-07

    Fixed in this PR https://github.com/appcelerator/titanium_mobile/pull/7553
  2. Chee Kiat Ng 2015-12-08

    APPROVED. PR Merged.
  3. Harry Bryant 2016-01-20

    I am still able to reproduce the error with the latest 5.2.X SDK. Tested the above test case against several SDKs and found the following: 5.1.1.GA SDK: App launches & Black Screen, no Scrollable View. 5.1.2.GA SDK: App hangs on splash screen. 5.2.0.v20160114021251 SDK: App launches & White Screen, no Scrollable View. In all cases, removing <use-autolayout>true</use-autolayout> from the tiapp.xml fixes the issue and the scrollable view is shown, setting autolayout to false in all cases also fixes the issue. iPhone 6s Plus Device (9.2) Mac OSX El Capitan 10.11 (15A284) Ti SDK: 5.2.0.v20160114021251 , 5.1.1.GA , 5.1.2.GA Appc NPM: 4.2.3-1 , 4.2.2 App CLI: 5.2.0-228 , 5.1.0 Xcode 7.2 Node v4.2.3 *Reopening Ticket.*
  4. Pedro Enrique 2016-03-07

    PR: https://github.com/appcelerator/titanium_mobile/pull/7809
  5. Chee Kiat Ng 2016-03-31

    PR: https://github.com/appcelerator/titanium_mobile/pull/7896

    To test

    IN these 2 scenarios, this should work perfectly a) run-on-main-thread enabled, auto layout enabled b) run-on-main-thread disabled, auto layout disabled [~bimmel] To consider for 5.4.0 release notes, we may need to inform developers, if they wish to use auto layout, run-on-main-thread MUST be enabled.
  6. Chee Kiat Ng 2016-03-31

  7. Hans Knöchel 2016-03-31

  8. Chee Kiat Ng 2016-04-01

    Thanks Hans!!!! So I'm assuming that with everything disabled, these still function as per normal? I think i just fixed those 2 issues. checking again and will update PR.
  9. Chee Kiat Ng 2016-04-04

    Here's a better PR: https://github.com/appcelerator/titanium_mobile/pull/7914
  10. Josh Longton 2016-07-07

    Verified as fixed. Tested on:
 iPhone 5s (9.2) iOS Simulator (9.3) 
Mac OSX El Capitan 10.11.5 Studio: 4.7.0.201607070843 
Ti SDK: 5.4.0.v20160705213725 
Appc NPM: 4.2.8-1 Appc CLI: 5.4.0-26 
Xcode 7.3.1 Node v4.4.4 *
Closing Ticket*

JSON Source