ios - Popup User Agreement Display in Swift -


i'm trying implement code swift user given popup alert upon initial launch of app. , prefer not have popup again each time app re-launched. i'm thinking using uialert in viewdidload() don't know code determine if app has been launched more once. appreciate input , code examples. thank you!

you use nsuserdefault storage this

let firstlaunchkey = "firstlaunch" if nsuserdefaults.standarduserdefaults().objectforkey(firstlaunchkey) == nil{     // show alert , set firstlauch key      nsuserdefaults.standarduserdefaults().setbool(false, forkey: firstlaunchkey) } 

Comments

Popular posts from this blog

html - How can i make an element from a bottom stacking context stays in front of another higher stacking context? -

python - TypeError: start must be a integer -

html - href attribute breaking an element -