Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20028] iOS: Layout fails on iOS8 with iOS9-only Picker height set

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2015-12-11T18:12:20.000+0000
Affected Version/sRelease 5.1.0
Fix Version/sRelease 5.2.0
ComponentsiOS
Labelspicker, qe-5.2.0
ReporterFokke Zandbergen
AssigneeAngel Petkov
Created2015-11-21T10:49:02.000+0000
Updated2016-01-22T00:42:15.000+0000

Description

Since iOS 9 it is possible to set a picker's height and we support that in Titanium 5.1.0. However, on iOS 8 the layout seems to use the set height, resulting in the standard-height picker to overflow. See screenshots. On iOS 8 we should use the standard-height to do the layout. This should also be reflected when you get the height via the size and rect properties. Found by [~ewieber] and demonstrated in the Ti 5.1.0 sample app https://github.com/appcelerator-developer-relations/appc-sample-ti510/issues/3

Attachments

FileDateSize
Simulator Screen Shot 11 Dec 2015 09.39.49.png2015-12-11T08:45:21.000+0000113889
Simulator Screen Shot 21 Nov 2015 11.40.07.png2015-11-21T10:48:58.000+0000124565
Simulator Screen Shot 21 Nov 2015 11.41.20.png2015-11-21T10:48:58.000+000083503

Comments

  1. Fokke Zandbergen 2015-12-08

    Hey [~apetkov], so on iOS 8 the picker will now appear full height and not overflow? I think that's fine.
  2. Angel Petkov 2015-12-08

    The picker is full height on that image , the problem is that prior to iOS 9 it's height cant be set. So it will always be the same size, thats why it appears to be overflowing as it's overlapping the labels.
  3. Fokke Zandbergen 2015-12-10

    OK, so with this fix if I set a height on the picker it will be ignored on iOS 8 and the picker will display in standard height, without overflowing the frame? That is, assuming the layout is vertical of course. If it's absolute and you position the view below it using a top that expects the picker to be the height you've set it to be then it will still appear over the picker.
  4. Fokke Zandbergen 2015-12-11

    Looks great now (see attached screenshot)
  5. Angel Petkov 2015-12-11

    Great, thanks Fokke!
  6. Harry Bryant 2016-01-21

    Verifed as fixed, logged height when app builts to 8.4 is 216, scale of picker on iOS9 can be changed appropriately. Tested on: iPhone 6s Plus Device (9.2) & iPhone 6 Plus Device (8.4) Mac OSX El Capitan 10.11 (15A284) Ti SDK: 5.2.0.v20160114021251 Appc NPM: 4.2.3-1 App CLI: 5.2.0-231 Xcode 7.2 Node v4.2.3 *Closing Ticket.*

JSON Source