iOS: different addSubview behavior between iOS 4.3 and 5.0

前端 未结 7 2044
长发绾君心
长发绾君心 2021-01-30 11:32

while coding in iOS 4.3 before, I found while add a view controller\'s view to another view with [superview addSubView:controller.view], the controller instance wil

7条回答
  •  感情败类
    2021-01-30 11:50

    After reviewing all the evidence, I think the best thing to do is NOT use viewDidAppear etc for views that are affected by this ios 4 / ios 5 bug. Instead make a custom class (like viewDidAppearCustom) and call it yourself. this way you can guarantee that apple won't change the sdk again and mess you up. There is a great blog covering this issue here:

    http://gamesfromwithin.com/view-controller-notification-changes-on-ios5

提交回复
热议问题