objective c - Different Font Styles in a String in an Array -


let's have this:

self.dictionary = [nsmutablearray arraywithobjects:                            @"blah",                            @"blah",                            @"blah (blah)",                            @"blah",                            @"blah",                            nil]; 

in third object, want have first "blah" larger font-size , black font-color. however, want second "blah" parentheses of smaller size , grey color. how go doing this? possible?

you want use nsmutableattributedstring.

you concatenate yours strings , each substring, figure attributes want, call - setattributes:range:.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -