objective c - Not able to align button text in UIActionSheet for iphone5 -
how align button text in uiactionsheet iphone5?
using way,you can set frame,change font alignment of button text on actionsheet.
cgrect oldframe = [(uilabel*)[[sheet subviews] objectatindex:0] frame]; uilabel *newtitle = [[[uilabel alloc] initwithframe:oldframe] autorelease]; newtitle.font = [uifont boldsystemfontofsize:17]; newtitle.textalignment = uitextalignmentcenter; newtitle.backgroundcolor = [uicolor clearcolor]; newtitle.textcolor = [uicolor whitecolor]; newtitle.text = @"your title"; [sheet addsubview:newtitle]; [sheet release];
Comments
Post a Comment