开发者

UITextView setText works only once

开发者 https://www.devze.com 2023-03-18 06:24 出处:网络
I have a UITextView in my xib and in my UIViewController class, I call setText on this element.It works correctly - once.

I have a UITextView in my xib and in my UIViewController class, I call setText on this element. It works correctly - once.

Subsequently, it does not set the tex开发者_StackOverflow社区t and the old text remains.

I also have the same problem with UINavigationBar, where navBar.topItem.title can be set once but not again.

How do I clear the old values and get the new values to show?

Thanks DeShawn


Does 'subsequently' mean 'on the next line of code' or 'the next time a button is clicked' ? The latter is appropriate I guess, don't you set your outlet to nil somewhere ?

0

精彩评论

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

关注公众号