uilabel - Adding a line break to a string from plist in iOS -


i need add line break string, obtain plist. string passed uilabel presented on screen.
example, text "adding line break string plist in ios"
need line break after word break.

i have added "\n", hence text became "adding line break \n string plist in ios". ensured numberoflines = 0 uilabel.

but can't see line break , text "\n" appears in text itself.

need guidance on this.. thanks..

edit:

[photo setcaption:[nsstring stringwithformat:@"%@",[[galleryarray objectatindex:index] objectforkey:@"title"]]]; 

the plist file requires actual newline character in string value. can't enter 2 characters \ , n. treated newline character compiler.

bring plist file in xcode , edit string value. enter newline, press option-return on keyboard instead of return.

now when load string value nsstring in app, newline part of string value. , when set @ text of label, newline appear (assuming label setup show multiple lines).


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -