ACAccountStore管理账户授权及对账户ACAccount的增、删、改和查。
/// 获取所有账户
public var accounts: [AnyObject]? { get }
/// 根据账户标示符获取账户
public func accountWithIdentifier(identifier: String!) -> ACAccount!
/// 根据账户类型获取账户
public func accountsWithAccountType(accountType: ACAccountType!) -> [AnyObject]!
/// 获取账户类型,如获取微博,传入ACAccountTypeIdentifierSinaWeibo
public func accountTypeWithAccountTypeIdentifier(typeIdentifier: String!) -> ACAccountType!
/// 保存账户
public func saveAccount(account: ACAccount!, withCompletionHandler completionHandler: ACAccountStoreSaveCompletionHandler!)
// 用户授权
public func requestAccessToAccountsWithType(accountType: ACAccountType!, options: [NSObject : AnyObject]!, completion: ACAccountStoreRequestAccessCompletionHandler!)
// 更新账户
public func renewCredentialsForAccount(account: ACAccount!, completion completionHandler: ACAccountStoreCredentialRenewalHandler!)
// 删除账户
public func removeAccount(account: ACAccount!, withCompletionHandler completionHandler: ACAccountStoreRemoveCompletionHandler!)
Swift
Accounts Framework Reference
ACAccountStore Class Reference
时间 | 描述 |
---|---|
2016-01-26 | 博文完成 |
CSDN:http://blog.csdn.net/y550918116j
GitHub:https://github.com/937447974/Blog