1
我在iPad中的modalView中使用了一個ActionSheet。 我從一個UIBarButton,navController上顯示它。 第一個問題:如果我點擊10次,它會顯示10個actionSheet,這是一個問題。modalView問題中的iPad UIActionSheet
第二個問題:在navBar的正確項目上,有一個DONE按鈕。 當我點擊actionSheet按鈕並且出現動作表時,然後點擊DONE按鈕,modalView被解除,並且動作表保持在屏幕上,然後應用程序崩潰。
代碼以顯示actionsheet:
UIActionSheet *iPadActionButton = [[UIActionSheet alloc] initWithTitle: @""
delegate: self
cancelButtonTitle: nil
destructiveButtonTitle: nil
otherButtonTitles: @"option 1", @"option 2", @"option ", nil];
iPadActionButton.destructiveButtonIndex = 2;
[iPadActionButton showFromBarButtonItem:self.navigationItem.rightBarButtonItem animated:YES];
[iPadActionButton setTag:200];
[iPadActionButton release];
就如何解決這些問題的任何想法?
Rui