아래 코드에서 willPresentAlertView 메소드가 호출되지 않았습니다. 왜? 이 방법은 정적입니까? 또는 Alert 값이 정적입니까?정적 UIAlertView가 호출되지 않았습니다. willPresentAlertView
@interface ShowAlert : NSObject <UIAlertViewDelegate>
static UIAlertView* alert;
+(void) showAlert:(NSString*) msg{
alert = [[UIAlertView alloc] initWithTitle:nil message:[NSString stringWithFormat:@"%@", msg] delegate:self cancelButtonTitle:nil otherButtonTitles:nil];
[alert show];
}
- (void)willPresentAlertView:(UIAlertView *)alertView {
NSLOG(@"willPresentAlertView");
}
실제 코드를 정확하게 게시 했습니까? 그리고 NSLOG는 무엇입니까? 표준 NSLog는 약간 다른 철자법을 가지고 있습니다 ... – Vladimir
#define NSLOG (...) NSLog (__ VA_ARGS__) 그것은 NSLOG입니다. – mooongcle