Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

user defaults swift

let defaults = UserDefaults.standard
defaults.set(25, forKey: "Age")
defaults.set(true, forKey: "UseTouchID")
defaults.set(CGFloat.pi, forKey: "Pi")

defaults.set("Paul Hudson", forKey: "Name")
defaults.set(Date.now, forKey: "LastRun")
Source by www.hackingwithswift.com #
 
PREVIOUS NEXT
Tagged: #user #defaults #swift
ADD COMMENT
Topic
Name
6+2 =