nsstring - Escape bad characters for iOS UILabel? -


i'm feeding nsstring data (forum posts queried website) uilabel part of first app. thing is, sometimes, depending on content of post, label goes entirely blank. i've tinkered enough discern there characters cause problem, can't quite pin down full set.

is there collected list of character types watch out kind of thing? , better, there method escaping them, or automatically converting them more acceptable?

thank helping out n00b!

looks have whitespace or new line in string:

try this:

nsstring* labeltext = [stringfromwebsite stringbytrimmingcharactersinset:[nscharacterset whitespaceandnewlinecharacterset]] 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -