开发者

Can viewDidAppear:animated method be called multiple times for a single presentModalViewController:animated?

I have a view hierarchy like this:

nav1 (UINavigationController, top level object in nib)
  view1 (UIViewController) 
    nav2 (UINavigationController, top level object in nib) 
      view2 (UIViewController)

I called nav2's view[Will/Did][Appear/Disappear] methods in view1's each method. an开发者_如何学编程d when I'm calling presentModalViewController:animated to display nav2 & view2, view2' viewDidAppear called twice.

I treated viewDidAppear will occur only once for a single present/dismiss/push/pop, however I can't know how understand this.


I got solution. It was my fault.

view[Will|Did][Appear|Disappear] routing trick is no longer required. It made my app to call it's subviews' method twice.

*I note this for others having trouble about this situation.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜