uikit

    [UIKit] UserDefault로 데이터 저장하기

    UserDefault를 사용하면 데이터 값이 plist에 값이 저장되어 영구적으로 사용 가능하다. 애플에서 공식문서를 보면 Key - Value로 구성되어 있는 Dictional 형태의 저장소임을 알 수 있다. 간단하게 값을 저장하고 불러오는 것이 가능하지만 plist에 저장되기 때문에 보안상 취약하다는 단점도 있다. 공식 문서 : https://developer.apple.com/documentation/foundation/userdefaults import UIKit let defaults = UserDefault.standard //선언 defaults.set(0.24, forKey: "Volume") //float defaults.set(true, forKey: "On") //bool defaul..