Separate names with a comma.
Discussion in 'iOS Programming' started by Narendar Singh, Jul 10, 2012.
Please see attached image for the reference, I have a problem with sizeToFit() function in UILable.
The origin of the coordinate system is on the left. The position of any view is based on the left (for the x component of position) Size to fit changes the size but not the position of the component. So the behaviour is exactly what you should expect: position unchanged and size changed.
For sizeToFit: to do what you are expecting it would have to change the position as well as the size.
Time to upgrade to iOS6's Auto-Layout?
Yes I want to change position too. What should I do now?
dejo: I'll update soon.
Calculate the correct position based on the new size and change the origin to that.
make sense, thanks.
How can I do that?
In Xcode 4:
Xcode -> Preferences -> Downloads -> Components -> Check and Install Now saying "No updates available"
Do you have Xcode 4.5 DP? Also, be aware that auto-layout will only work in apps targeted for iOS 6+.
NO, I have Xcode 4.3.1
In order to use Auto Layout, one of the "tent pole" features of iOS 6, you'll need to use Xcode 4.5.
make sense... well my problem is solved using some run time calculation. thanks