我有一个按钮,当我单击它时,它会设置 userInteraction:self.view.userInteractionEnabled = NO;
这有效,如果我单击该按钮,我将无法再单击它。然后我得到了一个receiveNotification
我在另一个班级打电话的。
- (void) receiveNotification:(NSNotification *) notification
{
if ([[notification name] isEqualToString:@"EnableUI"]){
self.view.userInteractionEnabled = YES;
NSLog(@"Successfully received the %@ notification!",[notification name]);
}
}
程序输出告诉我收到通知,因为它打印出来Successfully received the EnableUI notification!
但是,我仍然无法单击 UI 按钮...