您的位置:首页 > 其它

ACAccountStore

2016-01-26 14:11 232 查看
ACAccountStore管理账户授权及对账户ACAccount的增、删、改和查。

1 Getting Accounts

/// 获取所有账户
public var accounts: [AnyObject]? { get }

/// 根据账户标示符获取账户
public func accountWithIdentifier(identifier: String!) -> ACAccount!

/// 根据账户类型获取账户
public func accountsWithAccountType(accountType: ACAccountType!) -> [AnyObject]!


2 Getting Account Types

/// 获取账户类型,如获取微博,传入ACAccountTypeIdentifierSinaWeibo
public func accountTypeWithAccountTypeIdentifier(typeIdentifier: String!) -> ACAccountType!


3 Saving Accounts

/// 保存账户
public func saveAccount(account: ACAccount!, withCompletionHandler completionHandler: ACAccountStoreSaveCompletionHandler!)


4 Requesting Access

// 用户授权
public func requestAccessToAccountsWithType(accountType: ACAccountType!, options: [NSObject : AnyObject]!, completion: ACAccountStoreRequestAccessCompletionHandler!)


5 Renewing Account Credentials

// 更新账户
public func renewCredentialsForAccount(account: ACAccount!, completion completionHandler: ACAccountStoreCredentialRenewalHandler!)


6 Removing Accounts

// 删除账户
public func removeAccount(account: ACAccount!, withCompletionHandler completionHandler: ACAccountStoreRemoveCompletionHandler!)


Appendix

Sample Code

Swift

Related Documentation

Accounts Framework Reference

ACAccountStore Class Reference

Revision History

时间描述
2016-01-26博文完成

Copyright

CSDN:http://blog.csdn.net/y550918116j

GitHub:https://github.com/937447974/Blog
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: