iphone - How can i make bold a single character in the lable without using UIWebView? -
i have uilabel contains textvalue , want bold particular character in whole string please let me inform possible? , yes please give me example important me.please me.
it's possible single-line label if create custom uiview subclass, , implement -drawrect:
this:
-(void)drawrect:(cgrect)rect { nsstring* stringbefore; nsstring* boldpart; nsstring* stringafter; uifont* normalfont; uifont* boldfont; ... cgsize sizebefore = [stringbefore drawatpoint:cgpointzero withfont:normalfont]; cgsize sizebold = [boldpart drawatpoint:cgpointmake(sizebefore.width, 0) withfont:boldfont]; [stringafter drawatpoint:cgpointmake(sizebefore.width+sizebold.width, 0) withfont:normalfont]; }
Comments
Post a Comment