Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3218] iOS: Button height:'auto' does not respond

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionCannot Reproduce
Resolution Date2017-06-12T22:29:05.000+0000
Affected Version/sRelease 2.0.1, Release 3.0.0, Release 3.1.0
Fix Version/sn/a
ComponentsiOS
Labelscore, parity
ReporterAlan Leard
AssigneeIngo Muschenetz
Created2011-04-15T03:39:45.000+0000
Updated2017-06-12T22:29:05.000+0000

Description

If you set a button height to 'auto', it should adjust based on contents, similar to a label.

Test Code:

var win = Ti.UI.createWindow({backgroundColor:'#fff'});

var button = Titanium.UI.createButton({ 
width:100,
height:'auto', 
left:10,
top:50,
title:"This is my Button"
});

var label = Titanium.UI.createLabel({ 
width:100,
height:'auto', 
left:10,
top:100,
text:"This is my Label"
});

win.add(button);
win.add(label);

win.open();

Reference Ticket: http://developer.appcelerator.com/helpdesk/view/75281">http://developer.appcelerator.com/helpdesk/view/75281

Comments

  1. Junaid Younus 2012-05-15

    Tested with 2.0.1GA2, on the iOS simulator the button changes the text into 'This...Button' all on the same line. On a Samsung Galaxy S2, the button is fully resized to show the whole text 'This is my Button'. Not sure if this is the expected behavior, but I have added the parity label to this ticket.
  2. Junaid Younus 2012-08-31

    Tested using TiSDK 2.2.0v20120830102513, issue still valid.
  3. Shameer Jan 2013-05-07

    Issue reproduces , it seems that its not an expected behavior . Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 iOS iPhone Simulator: iOS SDK version: 6.0
  4. Lee Morris 2017-05-26

    Closing this ticket as the issue cannot be reproduced with the following environment; iPhone 7 (10.2) MacOS 10.11.6 (15G31) Studio 4.9.0.201705021158 Ti SDK 6.1.0.v20170519131839 Appc NPM 4.2.9 Appc CLI 6.2.1 Ti CLI 5.0.13 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.7.0_80

JSON Source