将我的应用程序升级到iOS9后,我的应用程序出现了一个错误,错误消息如下:
: objc[344]: 无法对类LoginVC的实例(0x15919e00)进行弱引用。这个对象可能已经释放过多次,或者正在被解除分配。
以下是发生此错误的函数:
-(void)dismissLogin {
self.isLoggingIn = NO;
[self stopLoginAnimation];
[self dismissViewControllerAnimated:YES completion:NO];
[[NSNotificationCenter defaultCenter] removeObserver:self];
[self.appDelegate setLoginVC:nil];
[self.view removeFromSuperview];
//[APPDEL selectTabBar];
}
应用程序在登录界面卡住,并且无法切换到下一个界面。
这个错误在iOS8中并不存在。 有人可以帮助解决这个问题吗?
dealloc
方法中记录日志,以了解你的对象何时被销毁。 - Robotic Cat