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.
精彩评论