开发者

why viewDidLoad get called after dismissing UIIMagePickerViewController?

I am creating a application in which I am calling webservice in viewDidLoad method. the response will populate my form. There is a button that button allow user to capture a image. For that I used UIImagePickerViewController. After capturing the image when I dismiss the camara view some time the application enter in viewWillAppear. I don't have any issue with this. But Some time this enter in viewDidLoad method.

Thats why my form get repopulated.

I don't know what happ开发者_StackOverflow中文版ening Why app is entering in viewDidLoad method?

Any idea plz

Thanks


When using the UIImagePickerViewController, often times the camera will cause a memory warning and your viewcontroller's viewDidUnload method will be called. Next time your view is shown (when the UIImagePickerViewController is dismissed), the viewDidLoad method will be called because it was previously unloaded.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜