This discussion is archived
8064 Views 7 Replies Latest reply: Mar 10, 2009 12:49 AM by akandor
Currently Being ModeratedSep 10, 2008 2:02 AM (in response to aapl.crox)Hi, I had the same problem some time ago. What helped me was overriding
- (void)navigationController: willShowViewController: animated:
inside this method you have to create custom IUView with frame rectangle = CGRectMake(0,0,0,0),
then create custom UIBarButtonItem, init it with custom view (use your previously created UIView), and then replace your rightBarButtonItem for coming ViewController with your new bar button item.
Btw. Why does it have to be such pain in the *** to go through such a simple tasks?Mac Mini, Mac OS X (10.5.4)
Currently Being ModeratedOct 13, 2008 6:15 PM (in response to lawicko)Could you suggest how you would put the ABPeoplePickerNavigationController in a tab bar view?
I keep running into problems using IB. So darn complicated.
Thanks in advance.
Currently Being ModeratedOct 13, 2008 6:42 PM (in response to lawicko)I managed to get the picker in the tab view, but I don't quite follow your steps in the (void)navigationController:willShowViewController:animated:
Currently Being ModeratedNov 13, 2008 1:25 PM (in response to HoofSC)Hi HoofSC,
You are claiming that you've managed to show ABPeoplePickerNavigationController in a tabbar. How did you manage to solve the issue with showing the ABCardViewer after a person is selected. The screen slides into view but only the background is visible. Shows the subviews only after you drag the view up or down with a touch. Some other people in this forum reported the same problem. Can you please help?iMac, Mac OS X (10.5.5), iphone OS 2.1
Currently Being ModeratedNov 15, 2008 9:28 AM (in response to rgarkov)I did this my making a proxy viewController subclass that does the following in awakeFromNib:
ABPeoplePickerNavigationController *nav = [[ABPeoplePickerNavigationController alloc] init];
NSMutableArray *newControllers = [NSMutableArray arrayWithArray: [self.tabBarController viewControllers]];
int index = [newControllers indexOfObject: self];
[newControllers replaceObjectAtIndex: index withObject: nav];
[self.tabBarController setViewControllers: newControllers animated: NO];
This seems to work as expected...
MattMacBook Pro, Mac OS X (10.5)
Currently Being ModeratedJan 9, 2009 2:49 PM (in response to aapl.crox)@interface PeoplePicker : ABPeoplePickerNavigationController<ABPeoplePickerNavigationControllerDelegate>
[self setAllowsCancel : 0];
[self setAllowsCardEditing: 1];
self.peoplePickerDelegate = self
need some more help? let me email...
Message was edited by: eaglemay
Message was edited by: eaglemayMac mini, Mac OS X (10.5.4)
Currently Being ModeratedMar 10, 2009 12:49 AM (in response to eaglemay)Hi,
can I use your solution also for my code?
peoplePicker.navigationBar.tintColor = [UIColor colorWithRed:(102/255.0) green:(102/255.0) blue:(102/255.0) alpha:1.0];
peoplePicker.title = NSLocalizedString(@"contacts", @"contacts");
peoplePicker.tabBarItem.image = [UIImage imageNamed:@"buddieIcon.png"];
peoplePicker.peoplePickerDelegate = self;
tabBarController.viewControllers = [NSArray arrayWithObjects:favNavController, recNavController, peoplePicker, dialViewController, morNavController, nil];
peoplePicker setAllowsCancel : 0;
peoplePicker setAllowsCardEditing: 1;
Thanks for your help!iMac 24", Mac Mini, MacBook (white), MacBook (Alu), Mac OS X (10.5.6)