31 March 2015

If UILabel iOS auto shrink is not working

There is an issue I've got today, UILabel has not not autoshrinking text to fit label size. Investigation gives the answer - do not select "Word Wrap" in Line Breaks parameter for this label control, select "Truncate Tail" (see illustration) and it magically starts to work. This applied to latest Xcode 6 and iOS7-iOS8 targets. For earlier versions like iOS 6 you also have to set up 1 in "Lines" field to auto shrink can be applied.