[TIMOB-8713] iOS: Label not resizing properly when in ScrollView
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-07-09T07:42:24.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | Release 2.1.0, Sprint 2012-09 API, Release 2.0.3 |
Components | iOS |
Labels | api, module_scrollview, qe-testadded, titanbeta |
Reporter | Ketan Majmudar |
Assignee | Vishal Duggal |
Created | 2012-04-12T19:43:42.000+0000 |
Updated | 2012-08-07T03:45:01.000+0000 |
Description
Scroll View Bug with font, a label view was not fully resizing correctly when in an scroll view, simple use cases didn't show any issues, the code worked on android too. It turns out that by adding a font property to the label view, causes the scaling / resizing engine to fail in its calculations and set the bounding box shorter than it should be.
Test Case on Gist:
https://gist.github.com/c3ddfe83c3b9943ae366
Run as is, and you will see all the text, uncomment the font property and you will see it stops short of the end of text.
Also the code above will fail if you use this text string (even without adding the font property:) var text = "So many of today’s creative, technical, and cultural talent are, in one way or another, indebted to the little machine that plugged into the living room telly.We’re celebrating the Spectrum’s anniversary in HORIZONS, at the BFI: a rich blend of fun, memories, and future-gazing. Play some of your favourite games (you’re welcome to bring your Kempston interface and Quickshot II)."; There is definitely a bug here.
I looked at the code, and see a potential problem... your scrollview has a contentHeight:'auto'. I believe it should be Ti.UI.SIZE Try that?
I think I've tried that, but that's not the issue. That code, when not in a tabbed environment works. But I will try modifying test when I'm behind a machine.
This is a further bug, if you were to change the contentHeight property to Ti.UI.SIZE then the scroll bar disappears and the content area does not expand at all. I'm sure this shouldn't be the desired behaviour, but either way, contentHeight is not the issue here, the rendering of the view seems to be the problem, by not taking the tab and nav zones into account.
Pull pending https://github.com/appcelerator/titanium_mobile/pull/2089
Customer is requesting 2.0.2 backport (TIMOB-9127)
Closing issue Tested with Ti Studio build 2.1.0.201206172244 Ti Mobile SDK 2.1.0.v20120619142258 hash r5982b78e OSX Lion 10.7.3 iPhone 4S OS 5.1 The expected behavior is shown
Re-opening to edit label
verified on: 2.0.3.v20120806151610