У меня есть метод с именем -showMoreTools:
- (IBAction) showMoreTools:(id)sender {
UIActionSheet *popupQuery = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:nil destructiveButtonTitle:@"Close" otherButtonTitles:@"Add Bookmark", @"Add to Home Screen", @"Print", @"Share", nil];
popupQuery.actionSheetStyle = UIActionSheetStyleDefault;
popupQuery.dismiss
[popupQuery showFromBarButtonItem:moreTools animated:YES];
[popupQuery release];
}
Когда пользователь нажимает
UIBarButtonItem
, он отображает
UIActionSheet
, но затем, если пользователь хочет закрыть
UIActionSheet
, не нажимая кнопку Закрыть, (коснувшись
UIBarButtonItem
, затем он отображает
UIActionSheet
поверх первого
UIActionSheet
.
. Можно реализовать как-то еще прикосновение к UIBarButtonItem
, чтобы закрыть UIActionSheet
?
Большое спасибо - я новичок в программировании на iOS!