为什么要移除2次呢?调用一次不就好了。
//[[NSNotificationCenter defaultCenter] removeObserver:self forKeyPath:@"myNotify" context:nil];
//[[NSNotificationCenter defaultCenter] removeObserver:self forKeyPath:@"myNotify"];另外,你用按钮事件触发释放,最好能保证只释放一次。如果你联系按下按钮同样也会crash。
iOS开发小站:www.mibugs.com
//[[NSNotificationCenter defaultCenter] removeObserver:self forKeyPath:@"myNotify" context:nil];
//[[NSNotificationCenter defaultCenter] removeObserver:self forKeyPath:@"myNotify"];另外,你用按钮事件触发释放,最好能保证只释放一次。如果你联系按下按钮同样也会crash。
iOS开发小站:www.mibugs.com
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货