`
cxsjabc
  • 浏览: 19900 次
  • 性别: Icon_minigender_1
  • 来自: 合肥
最近访客 更多访客>>
社区版块
存档分类
最新评论

iphone-common-codes-ccteam源代码 CCContact.m

阅读更多
//  
//  CCContact.m  
//  CCFC  
//  
//  Created by xichen on 11-12-16.  
//  Copyright 2011年 ccteam. All rights reserved.  
//  
  
#import "CCContact.h"  
  
  
@implementation CCContact  
  
// 调用联系人界面  
+ (ABPeoplePickerNavigationController *)  
        showAddressBookPeopleView:(id)delegate   
                           withId:(ABPropertyID)propertyId   
                         animated:(BOOL)animated  
{  
    ABPeoplePickerNavigationController *peoplePicker = [ABPeoplePickerNavigationController new];  
    if(!peoplePicker)  
    {  
        return nil;  
    }  
    [peoplePicker setPeoplePickerDelegate:delegate];  
      
    //设置过滤属性  
    [peoplePicker setDisplayedProperties:  
     [NSArray arrayWithObject:[NSNumber numberWithInt:propertyId]]];  
      
    //显示联系人界面  
    [delegate presentModalViewController:peoplePicker animated:animated];  
    [peoplePicker release];  
    return peoplePicker;  
}  
  
// 调用新建联系人界面  
+ (ABNewPersonViewController *)showNewPersonView:(id)delegate    
                                        animated:(BOOL)animated  
{  
    ABNewPersonViewController *newPersonVew = [ABNewPersonViewController new];  
    if(!newPersonVew)  
    {  
        return nil;  
    }  
      
    newPersonVew.newPersonViewDelegate = delegate;  
    [delegate presentModalViewController:newPersonVew animated:animated];  
      
    [newPersonVew release];  
    return newPersonVew;  
}  
  
@end  


googlecode链接地址(会有更新):http://code.google.com/p/iphone-common-codes-ccteam/source/browse/trunk/CCFC/files/CCContact.m
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics