开发者

Uitextfield "losing" text value between view flips

开发者 https://www.devze.com 2023-01-13 01:41 出处:网络
I\'m a days-old iphone programmer - I\'m writing a simple program based on the utility xcode template. I have a uitextfield that writes its value into a singleton object on edit. I also have implement

I'm a days-old iphone programmer - I'm writing a simple program based on the utility xcode template. I have a uitextfield that writes its value into a singleton object on edit. I also have implement开发者_Python百科ed key observation on changes to this value. This works fine. When I flip the view to the second "flipside view" and back again the value is reset.

I'm trying to get the textfield to retain its value between flips.

What am I missing?


Re-set your value in viewDidLoad/viewWillAppear. Maybe you are getting memory warning and view controller releases it's view?

0

精彩评论

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