Discussion Forums  >  Uncategorized

Replies: 1    Views: 288

mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
02/14/12 11:42 AM (12 years ago)

How to create a popup window when first opened in IOS

I would like to create a popup window that opens in my app when first opened only... telling them to review the terms of use policy. I'd rather not use the flash intro screen for that since that appears to keep loading if the app hasn't been used in awhile. I just want this to open once. I saw a thread from last year for something similar but geared towards android. Any advice for IOS? Thanks! Josh
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
02/14/12 11:54 AM (12 years ago)
Without pasting any code, my thoughts are this.... a) Use the built in BT_strings setPrefString method (see an example in the BT_screen_settingsLogIn.m file) to save a value to the devices preferences telling you that you have already displayed the pop-up. b) When the device launches (do this in the appDidBecomeActive method in your apps delegate class) see if you have a saved value in the preferences. If you don't, show the message then save the value. Checking this first would tell your program if it exists already. If it does, don't show the message (you already did). c) As far as the pop up goes, I can think of a few ways to do this. It's probably best to work this out in a Splash Screen that always shows the first time the app launches and may or may not show when it's launched again (depending on how they put the app in the background). In fact, maybe do all the logic in the BT_screen_splash.m load, may be easier. psuedo code.... if( [[BT_strings getPrefValue:@mySecretKey] isEqualToString:@'yes'] ){ //ignore, do not show the pop up... }else{ //set the pref so we dont' do it again... [BT_strings setPrefString:@myCoolKey:yes]; //show the popup here.. }
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.