0
if 응용 프로그램 대리인의 application DidFinishLaunchingWithOptions
에 if 문이 있습니다. if 문이 참이 아니더라도 if 문의 코드가 실행됩니다. 내가 뭔가 잘못하고 있는거야? if 문을 무시하는 것 같습니다.응용 프로그램 didFinishLaunchingWithOptions if 문의를 무시합니다.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSInteger i = [[NSUserDefaults standardUserDefaults] integerForKey:@"numOfLCalls"];
[[NSUserDefaults standardUserDefaults] setInteger:i+1 forKey:@"numOfLCalls"];
if (i >= 3) {
UIAlertView *alert_View = [[UIAlertView alloc] initWithTitle:@"Hey! You are still coming back!" message:@"It would mean a whole lot to me if you rated this app!" delegate:self cancelButtonTitle:@"Maybe later" otherButtonTitles: @"Rate", nil];
[alert_View show];
}
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
: 나는 당신을 위해 약간의 비틀기 몇했습니다 아래 당신이 볼 수 또한
? –
@NDPostWhenIdle 나는 그것을 시도하지 않았지만, 방금 전 콘솔 출력을 보았습니다. 6. 어떻게 또는 왜 그런 일이 일어 났는지 전혀 모른다. –
그래,'i> = 3' 조건은 참이지만 경고는 표시되지 않고 있습니까? –