title: How to open the Edit contact window in iphone app?
body: <p>I am adding contact info from my iPhone application on Addcontact click. I just want to open edit contact window on same Addcontact click so user can edit or delete the contact which just now have added. I have done smthing like below.. </p>
  
  <pre><code>- (IBAction)AddContact
   {   
  ABAddressBookRef addressBook = ABAddressBookCreate();
  ABRecordRef Showroom = ABPersonCreate();
  
  //adding contact name as showroom name
  
  ABRecordSetValue(Showroom, kABPersonFirstNameProperty, ShowroomName.text , nil);
     ABAddressBookAddRecord(addressBook, Showroom, nil);
  ABAddressBookSave(addressBook, nil);
  // Fetch the address book 
  //ABAddressBookRef addressBook = ABAddressBookCreate();
  // Search for the person named "Appleseed" in the address book
  
      //ABRecordRef Showroom = (ABRecordRef)[Showroom objectAtIndex:0];
      ABPersonViewController *picker = [[[ABPersonViewController alloc] init] autorelease];
      picker.personViewDelegate = self;
      picker.displayedPerson = Showroom;
      // Allow users to edit the person’s information
      picker.allowsEditing = YES;
  [self.navigationController pushViewController:picker animated:YES];
  }
  </code></pre>
  
  <p>this is my Map application. On launching I get showroom results with there contacts. This I can add in to the iPHone contact with edit contact window opening. But when I open other controller to pass user selected string address in to Map controller to search showroom location. The same above code is not working. I mean it only add the contacts but I didnt get the edit contact window.</p>
  
  <p><strong>Edit:</strong>
  May be this problem is regarding navigation controller bar so check the below code also</p>
  
  <pre><code>- (void)viewWillAppear:(BOOL)animated 
     {
    [self.navigationController setNavigationBarHidden:YES animated:animated]; 
     } 
     - (void)viewDidLoad {
  
  [self.navigationController setNavigationBarHidden:NO ];
  self.navigationController.navigationBar.tintColor = [UIColor  colorWithRed:25.0/255.0f green:25.0/255.0f blue:25.0/255.0f alpha:1.0f];
     }
  - (void)viewWillDisappear:(BOOL)animated
  { 
  [self.navigationController setNavigationBarHidden:NO animated:animated];
   }
  </code></pre>