开发者

Save UITextView content in NSString

I'm trying to save the contents of an UITextView into a NSString which I will somehow persist later.

The problem is that the U开发者_JS百科ITextView "text" property doesn't save all the rows in the textView (after touching "return"). I tried print the TextView object and the textView.text, and they're different.

Does anybody know how (after editing the textView) I can save its content into a String (or something else that I can later access and share through different views and persist in the database)?

Thanks a lot. Pretty sure it is simple, but I'm honestly not finding the solution.


NSString *textViewString = myTextView.text

ought to be what you need. But you say that the TextView object and its text property have different values? Has your delegate received – textViewDidEndEditing: or – textViewDidChange: yet?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜