开发者

iPhone window add subview crashing problem [closed]

开发者 https://www.devze.com 2022-12-18 09:18 出处:网络
This question is unlikely to help any future visit开发者_如何学Cors; it is only relevant to a small geographic area, a specific moment in time,or an extraordinarily narrow situation that is not ge
This question is unlikely to help any future visit开发者_如何学Cors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 10 years ago.

I have the code [window addSubview:[self.mvController view]]; where mvController is a view controller and whenever I run the program (device and simulator) it crashes.


Could you please post the entire function where this code is being called, as well as the error message.

The first thought that occurs to me is has mvController been initialized? The app would crash if you try and add nil as a subview, which would be the case if you didn't initialized the view controller first.


maybe [window addSubview:[mvController view]]; ?


It turns out that the program was releasing something too early.

0

精彩评论

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

关注公众号