У меня есть UIActionSheet, который я настроил так:
-(void)trash:(id)sender
{
UIActionSheet *sheet = [[[UIActionSheet alloc] initWithTitle:@"Delete" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Remove text" otherButtonTitles:@"Remove tags", nil] autorelease];
[sheet showInView:self.view];
}
Лист отображается в нижней части экрана, как и предполагалось, и все правильно. Однако ни одна из кнопок не активна. Единственный выход - прикоснуться к кнопке «Домой».
Что-то мне не хватает?
Представление self.view является представлением контроллера представления. Единственная странность в том, что он меньше высоты экрана, потому что находится над клавиатурой.
// Never called
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex;
{
NSLog(@"%d",buttonIndex);
}
// Never called
- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonInde
{
}
// Never called
- (void)actionSheet:(UIActionSheet *)actionSheet willDismissWithButtonIndex:(NSInteger)buttonIndex
{
}
// Called if I hit Home button
- (void)actionSheetCancel:(UIActionSheet *)actionSheet
{
}
// Called second
- (void)didPresentActionSheet:(UIActionSheet *)actionSheet
{
}
// Called first
- (void)willPresentActionSheet:(UIActionSheet *)actionSheet
{
}