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

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -