Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23413] Picker Width Sizing Bug on iOS

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionDuplicate
Resolution Date2016-05-20T03:30:39.000+0000
Affected Version/sRelease 5.2.2
Fix Version/sRelease 5.4.0
ComponentsiOS
Labelsios, qe-5.4.0
ReporterBryant T.
AssigneeChee Kiat Ng
Created2016-05-19T02:09:09.000+0000
Updated2016-06-14T17:21:11.000+0000

Description

iOS Picker accepts width styling in units, but not in percentages. When using a percentage for the Picker width, it defaults to smallest possible size. Both units and percentages work in Android. To recreate: *WORKS:* {{ }} *DOESN'T WORK:* {{ }} Issue makes it a nightmare to code standardized forms for multiple devices.

Attachments

FileDateSize
Screen Shot 2016-05-18 at 9.51.58 PM.png2016-05-19T01:52:33.000+000023376

Comments

  1. Sharif AbuDarda 2016-05-19

    Hello, I tested the issue in IOS 9.2. I have observed the similar issue. Picker width sizing/PickerColumn width sizing is not working properly when used "%". Like when width="70%" used, it will work as width="70". And when width="70" used, it works as expected as width="70". So, using % is not working for iOS. It's working fine for Android. Below code will demonstrate the issue in iOS.
       <Alloy>
           <Window id="win" backgroundColor="white" layout="vertical" exitOnClose="true">
               <Picker id="picker" top="50" width="70%" selectionIndicator="true" useSpinner="true">
                   <PickerColumn id="column1" width="70%">
                       <PickerRow title="Bananas"/>
                       <PickerRow title="Strawberries"/>
                       <PickerRow title="Mangos"/>
                       <PickerRow title="Grapes"/>
                   </PickerColumn>
               </Picker>
           </Window>
       </Alloy>
       
    Environment: SDK 5.2.2.GA, iOS 9.2 Regards, Sharif.
  2. Chee Kiat Ng 2016-05-20

    Resolving as duplicate of an existing ticket. the fix is in 5.4.0.
  3. Harry Bryant 2016-06-14

    Closing ticket as fixed. Although the existing ticket that this one duplicates was closed as Won't Fix, Width Sizing a Picker element with % values works correctly, despite Height Sizing a Picker element not working with % values. Tested On: iPhone 6S (9.3.2) Device & iPhone 6 Plus (8.3) Device Mac OSX El Capitan 10.11.5 Ti SDK: 5.4.0.v20160608165242 Appc Studio: 4.6.0.201605201934 Appc NPM: 4.2.7-2 App CLI: 5.4.0-15 Xcode 7.3 Node v4.2.6 *Closing ticket.*

JSON Source