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
Post a Comment