0

I'm trying to fill a 'Table View Cell' with selected contact information. I have a 'Stepper + & -' next to it to add the selected contact and remove it..

I need to know how to make the '+' open the framework...

In the interface file I have written as follows:

#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

In the Implementation file I have written as follows:

@implementation ViewController

- (IBAction)showPicker:(id)sender
{
ABPeoplePickerNavigationController *picker =
[[ABPeoplePickerNavigationController alloc] init];
picker.peoplePickerDelegate = self;

[self presentModalViewController:picker animated:YES];
}

@end

But it isn't working.... Any suggestions??

rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • 1
    Stepper controls are used for incrementing / decrementing a number. Using it in this way is confusing and inconsistent. You'd be better off having a `UIButton` handle this action. – iwasrobbed Oct 03 '13 at 23:08
  • Did you connect that action to your stepper in your storyboard/xib? – Jonathan Arbogast Oct 03 '13 at 23:52
  • Also, presentModalViewController:animated: was deprecated in iOS6, try using its replacement presentViewController:animated:completion – Jonathan Arbogast Oct 03 '13 at 23:55

0 Answers0