cocoa - Show NSAlert on specific launches -
i need show nsalert on 3rd, 10th , 20th launch of app, far have tried:
/* note klaunchcount incremented number in dictionary */ if([[[nsuserdefaults standarduserdefaults] objectforkey:@"klaunchcount"] intvalue] == 1||2||3) { /* show nsalert */ } the above code shows nsalert every launch.
that code parses ...||2||3, return true (since || 2 true). should put launch count variable n , use n == 3 || n == 10 || n == 20 test.
Comments
Post a Comment