ACAccountStore

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

Accounts Framework Reference

ACAccountStore Class Reference

Revision History

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

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

GitHub:https://github.com/937447974/Blog

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值