iphone - How to show an UIAlertView (Or UIView) at the first launch of an Application? -


i know how show uialertview or uiview @ first launch of application.

thanks.

use nsuserdefaults store bool, so:

-(void) showfirstrunalerts {      bool ranbefore = [[nsuserdefaults standarduserdefaults] boolforkey:@"ranbefore"];      if (!ranbefore) {         uialertview *alert = [[uialertview alloc]                           initwithtitle:@"message title."                           message:@"your message."                           delegate:self                           cancelbuttontitle:@"thanks!"                           otherbuttontitles:nil];         [alert show];         [alert release];          [[nsuserdefaults standarduserdefaults] setbool:yes forkey:@"ranbefore"];         [[nsuserdefaults standarduserdefaults] synchronize];     } } 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -