ситуация выглядит так:
есть кнопка в UIView A, которая после нажатия приведет нас к средству выбора контактов:
ABPeoplePickerNavigationController *picker=[[ABPeoplePickerNavigationController alloc]init];
picker.peoplePickerDelegate=self;
[self presentModalViewController:picker animated:YES];
[picker release];
и я использовал UIActionSheet в средстве выбора, чтобы перейти к различным представлениям в соответствии с выбором пользователя:
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person{
UIActionSheet *actionSheet=[[UIActionSheet alloc]initWithTitle:nil delegate:self cancelButtonTitle:@"cancel" destructiveButtonTitle:nil otherButtonTitles:@"ViewB",@"ViewC",@"ViewD",@"ViewE",nil];
[actionSheet showInView:picker.view];
[actionSheet release];
return NO;
}
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{
if(buttonIndex==0)
[self gotoViewB];
else if(buttonIndex==1)
[self gotoViewC];
else if(buttonIndex==2)
[self gotoViewD];
else if(buttonIndex==3)
[self gotoViewE];
}
-(void)gotoViewB{
ViewB *bClass=[[ViewB alloc]init];
[self presentModalViewController:bClass animated:YES];
[bClass release];
}
но после того, как я выбрал строку в представлении выбора контактов, ничего не произошло, так как представление выбора не исчезло, а ViewB не отображался. я не знаю, что здесь не так, пожалуйста, помогите мне: <</p>