开发者

UI problem after dismissing UIActionSheet within UIPopoverController

开发者 https://www.devze.com 2023-01-30 02:02 出处:网络
I\'m having a problem with a specific use of a UIActionSheet within a UIPopoverController.It seems to be an Apple bug, but I wanted to check here first to make sure I\'m not missing something.The cond

I'm having a problem with a specific use of a UIActionSheet within a UIPopoverController. It seems to be an Apple bug, but I wanted to check here first to make sure I'm not missing something. The conditions to reproduce the problem are quite specific, so I've created a small app that reproduces the problem. You can download that here.

The problem happens under the following conditions:

  • A UIPopoverController contains a UINavigationController.
  • The setToolbarHidden: method has been called on the UINavigationController to show the toolbar, but the toolbar is in a hidden state when displaying the UIActionSheet.

Once the UIActionSheet is displayed and dis开发者_Go百科missed, the navigation controller gets resized as if a toolbar should be displayed below it (or perhaps it is the toolbar?). Calling setToolbarHidden:YES in -(void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex doesn't help.

You can reproduce the problem by downloading the project above, running it in the iPad simulator (iOS4.2) in portrait orientation, and tapping "Tap Me" in the UIPopoverController. Once the UIAlertView is dismissed you'll see the problem. Below is a screenshot.

Any ideas? Thanks.

UI problem after dismissing UIActionSheet within UIPopoverController

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号