账号管理 WAAccountStore
- 授权协议: MIT
- 开发语言: Objective-C Swift
- 操作系统: iOS
- 软件首页: https://github.com/YuAo/WAAccountStore
软件介绍
WAAccountStore 是一个简单并且可扩展的账号系统。它封装了基本的账号管理函数,帐户凭据的安全存储,允许你存储任何关于账号的有用信息。
使用示例:
使用你 App 的默认存储
WAAccountStore.defaultStore()
或许你想直接使用 WAAccountStore 。不过,WAAccountCredential 和 WAAccount 创建一些简单的扩展可以让你的工作更轻松。
例如:
将你的用户模块和 WAAccount 联结
//Assuming `User` is your user model class.
extension WAAccount {
var user: User {
get {
return self.userInfo as! User
}
}
convenience init(identifier: String, credential: WAAccountCredential, user: User) {
self.init(identifier: identifier, credential: credential, userInfo: user)
}
}直接进入 不太方便,所以先创建一个方便进入的扩展。WAAccountCredential 的 securityStorage
let UserAccessTokenStorageKey = "AccessToken"
extension WAAccountCredential {
var accessToken: String {
get {
return self.securityStorage[UserAccessTokenStorageKey] as! String
}
}
convenience init(identifier: String, accessToken: String) {
self.init(identifier: identifier, securityStorage: [UserAccessTokenStorageKey: accessToken])
}
}The Art and Science of CSS
Jonathan Snooks、Steve Smith、Jina Bolton、Cameron Adams、David Johnson / SitePoint / March 9, 2007 / $39.95
Want to take your CSS designs to the next level? will show you how to create dozens of CSS-based Website components. You'll discover how to: # Format calendars, menus and table of contents usin......一起来看看 《The Art and Science of CSS》 这本书的介绍吧!
