///用户信息
class UserInfo : DataProvider{
private override init(){}
static func Create()->UserInfo{
let userInfo = UserInfo()
userInfo.initiailize()
return userInfo
}
}
//启动时注册数据:
DataStore.instance.registerDataProvider(UserInfo.Create()) //用户信息
DataStore.instance.registerDataProvider(SetttingInfo.Create()) //环境信息
DataStore.instance.registerDataProvider(PhotoLibary.Create()) //照片和相册数据信息
//需要时在任何位置取数据:
let userInfo = DataStore.instance.DataProvider(type: UserInfo.self)
-
Notifications
You must be signed in to change notification settings - Fork 0
wanmeixx/DataStore
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
swfit DataStore
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published