why dont you use UIActionSheet....try something like...
UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:nil
delegate:self
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:@"Take photo",@"Choose existing", nil];
actionSheet.actionSheetStyle=UIActionSheetStyleBlackTranslucent;
[actionSheet showFromRect:[sender frame] inView:self.view animated:YES];
also implement the action in the delegate method.....
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
// create an image picker controller
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
imagePickerController.delegate = self;
if(buttonIndex==0)
{
//create image picker with source camera blah blah
}
else if(buttonIndex==1)
{
//choose existing...
}
}
you will get something like>>