iphone - Getting UILabel to produce an ellipsis rather than shrinking the font -


when dynamically change text of uilabel prefer ellipsis (dot, dot, dot) rather have text automatically resized. how 1 this?

in other words, if have uilabel word cat size font 14 , change word hippopotamus font shrinks fit word. rather word automatically truncated followed ellipsis.

i assume there parameter can changed within uilabel object. i'd rather not programmatically.

set following properties:

label.adjustsfontsizetofitwidth = no; label.linebreakmode = nslinebreakbytruncatingtail; 

you can set these properties in interface builder.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -