我正在尝试用选定的联系信息填充“表视图单元格”。我有一个'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
但它不起作用......有什么建议吗?