0

I am building an iPhone application that should look just like Apple's Dialer application. the thing is that i have some problems with it. Apple's controllers are very hard to work with, and have to many problems, maybe someone here can help me?

I have a TabBar application, and in 1 of the tab's i have created an ABPeoplePickerNavigationController. i allowed the user to delete and edit a contact, but i have 2 problems: 1) when i press on edit -> delete contact i get an action sheet poping up from the bottom but the part of the "Cancel" button that is over the TabBar, i cant press it. the Cancel button will get the touch only if i press on the top part of it, where the TabBar under it wont be ontop. (even when i see the action sheet ontop of everything).

2) when a user edit a contact's name for example and then press the Back button, the person's name won't change into the new name in the contact's list.

my architecture is: i create the ABPeoplePickerNavigationController in the "view did appear" of the VC of the tabBar button. for the add new person i make a new controller and says: self modalviewcontroller:newPerson, so when i press done or cancel "ViewDidAppear" is called again and this is why i can see the new person in the contacts. but for edit contact i use pushviewcontroller:person, so when the view pop's it does not call the viewDidAppear function.

what can i do? Thank You!

eladyanai
  • 1,063
  • 2
  • 15
  • 34

1 Answers1

0

To solve the first problem you will have to change the way the action sheet appears. You can make it appear from the tab bar using something like this:

[actionSheet showFromTabBar:self.tabBarController.tabBar];

or even better letting it show in the windows' view

[actionSheet showInView:[[[UIApplication sharedApplication] delegate] window]];

To solve the second problem you have to be sure that the editing of the fields ends correctly before tapping the "Back" button. In fact, if you focused a text field and do not resign it before going back to the previous page, you will not fire the events you handle to save data. You could try to handle these situations in the viewWillDisappear: method.

marzapower
  • 5,531
  • 7
  • 38
  • 76
  • the issue was discussed here http://stackoverflow.com/questions/6402008/abpersonviewcontroller-delete-button-warnning/6402117#6402117. I think, it would help us understand it better. –  Jun 20 '11 at 07:47
  • its ok. i only meant it would help you understand it clearly. –  Jun 20 '11 at 08:07