objective c - iPhone - UILabel containing text with multiple fonts at the same time -



objective c - iPhone - UILabel containing text with multiple fonts at the same time -

i looking way utilize uilabel (or similar) display this:

tom: message.

it how it's done in illustration facebook app display "what's on mind?" messages. have suggestions how approach this?

use 2 uilabel iboutlets, each different format (font/color/etc), desire.. move sec 1 on first based on first one's text ends. can via sizewithfont:forwidth:linebreakmode:

alternatively, can subclass uilabel, , draw text in drawrect. if way, add together instance variable tell how much of string draw in 1 format, , draw rest in another.

update: please see @aam's response below. of ios6 uilabel's can contain nsmutableattributedstring. when wrote this, not available.

iphone objective-c uilabel

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -