iphone - How to prevent a UILabel cutting off with '...' -


i wondering if there way prevent uilabel cutting off '...'? have cgrect 55 in width , 20 in height , cut off after 55 (or clip contents off) without indicating '...' there more.

        uilabel *btntitle = [[uilabel alloc] initwithframe:cgrectmake(0, 0, 55, 20)];     btntitle.text = labelme;     btntitle.textcolor = [uicolor whitecolor];     btntitle.backgroundcolor = [uicolor clearcolor];     btntitle.transform = cgaffinetransformmakerotation( ( 90 * m_pi ) / 180 ); 

i achieved wanted (i.e. clipping) putting uilabel (with increased width, i.e. 100 x 20) uiview (55 x 20) , set clipstobounds yes result couldn't click buttons anymore - because using label label button. uiview containing label hiding buttons...

is there way around without using uiview clip contents of uilabel?

try out:

label.linebreakmode = nslinebreakbyclipping; 

for more information, refer uilabel class reference

hope helps


Comments