我遇到了一些时间后未被识别的选择器发送到实例异常。当我遇到这种情况时,我希望能够跳过它并让我的应用程序继续工作。
然而,我不知道如何捕获它。因为这个代码无法捕获异常:
我该如何处理这个问题?谢谢。
然而,我不知道如何捕获它。因为这个代码无法捕获异常:
@property(nonatomic,retain) UIButton *button;
@try{
if(button.currentBackgroundImage == nil){//rises exception
}
}@catch(NSException *e){
}
我该如何处理这个问题?谢谢。
thing.currentBackgroundImage = img
),则需要检查的 @selector 是 @selector(setCurrentBackgroundImage)。 - Chris Trahey