You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.0 KiB

//
// PPDataHandle.h
// PPAddressBook
//
// Created by AndyPang on 16/8/17.
// Copyright © 2016年 AndyPang. All rights reserved.
//
/*
*********************************************************************************
*
* PP-iOS学习交流群: 323408051 !!!
*
* 使 PPGetAddressBook bug或有更好的建议,,
* bug,.
*
* Weibo : jkpang-
* Email : jkpang@outlook.com
* QQ : 323408051
* GitHub: https://github.com/jkpang
*
* PS:,使!
* 1.AFNetworking 3.x YYCache的二次封装,,FMDB:
* GitHub:https://github.com/jkpang/PPNetworkHelper
* 2.仿,,使:
* GitHub:https://github.com/jkpang/PPNumberButton
*
* PPGetAddressBook ,Star支持, !
*********************************************************************************
*/
#import <Foundation/Foundation.h>
#ifdef __IPHONE_9_0
#import <Contacts/Contacts.h>
#endif
#import <AddressBook/AddressBook.h>
#import "PPPersonModel.h"
#import "PPSingleton.h"
#define IOS9_LATER ([[UIDevice currentDevice] systemVersion].floatValue > 9.0 ? YES : NO )
/** 一个联系人的相关信息*/
typedef void(^PPPersonModelBlock)(PPPersonModel *model);
/** 授权失败的Block*/
typedef void(^AuthorizationFailure)(void);
@interface PPAddressBookHandle : NSObject
PPSingletonH(AddressBookHandle)
/**
@param success
*/
- (void)requestAuthorizationWithSuccessBlock:(void(^)(void))success;
/**
*
*
* @param personModel
* @param failure Block
*/
- (void)getAddressBookDataSource:(PPPersonModelBlock)personModel authorizationFailure:(AuthorizationFailure)failure;
@end