我正在尝试使用选定的联系信息填充“表格视图单元格”。我旁边有一个“Stepper + & -”来添加选定的联系人并将其删除..
我需要知道如何让'+'打开框架......
在接口文件中我写了如下:
#import <UIKit/UIKit.h>
#import <AddressBookUI/AddressBookUI.h>
@interface APPNAME : UIViewController
@end
@interface ViewController : UIViewController <ABPeoplePickerNavigationControllerDelegate>
@property (weak, nonatomic) IBOutlet UILabel *phoneNumber;
- (IBAction)showPicker:(id)sender;
@end
在实现文件中,我写了如下:
@implementation ViewController
- (IBAction)showPicker:(id)sender
{
ABPeoplePickerNavigationController *picker =
[[ABPeoplePickerNavigationController alloc] init];
picker.peoplePickerDelegate = self;
[self presentModalViewController:picker animated:YES];
}
@end
但它不起作用....有什么建议吗?