Write formatted text on image with iOS sdk -


i need write formatted text on image in current ios app. got example how write text on image. need formatted text. let me share example of text, guys can give me suggestion. here sample text (font should changed)

programming contest !!!    xyz company     when:    1/1/2013     where:    south africa     time:    3.10 pm 

please give me suggestion how can formatted text (color , font enter image description herechanged)

thanks, arefin

if understand question, you're looking nsattributedstring. there several existing examples on so, apple docs. if have specific issue you're struggling with, update question , can address it.

the following example applies question stands. borrows heavily existing posts, , assumes way you're writing text on image combining existing image uilabel:

nsmutableattributedstring * testastring = [[nsmutableattributedstring alloc] initwithstring:@"programming contest !!! xyz company"]; [testastring addattribute:nsforegroundcolorattributename value:[uicolor bluecolor] range:nsmakerange(0,19)]; [testastring addattribute:nsforegroundcolorattributename value:[uicolor bluecolor] range:nsmakerange(23,3)]; [self.textplaceholdertextlabel setattributedtext:testastring]; 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -