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

c# - Move local mssql database to webhosted MYSQL -

java - How to pass parameters between Request-Scoped Controllers? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -