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

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -