Skip to content

yiqiejieliu/YYKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YYStorage

A property wrapper for UserDefaults that supports Codable types and SwiftUI.

Installation

Swift Package Manager

Add the following to your Package.swift:

dependencies: [
    .package(url: "https://github.com/yourusername/YYStorage.git", from: "1.0.0")
]

Usage

class UserSettings {
    @YYStorage(key: "username", defaultValue: "")
    var username: String
    
    @YYStorage(key: "isFirstLaunch", defaultValue: true)
    var isFirstLaunch: Bool
}

Features

  • Property wrapper for UserDefaults
  • Supports Codable types
  • SwiftUI compatible
  • iOS 11.0+ support

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages