开发者

Popover shown from inputAccessoryView has wrong rotation

开发者 https://www.devze.com 2023-01-09 22:49 出处:网络
Does anybody know why a UIPopover or UIActionSheet presented from a UIBarButtonItem in a toolbar in the inputAccessoryView doesn\'t rotate along with all the other view controllers?

Does anybody know why a UIPopover or UIActionSheet presented from a UIBarButtonItem in a toolbar in the inputAccessoryView doesn't rotate along with all the other view controllers?

The steps to reproduce this are:

  1. In an Xcode iPad project, add a UILabel editable text field in IB.
  2. Also in IB, add a UIToolbar with a UIBarButtonItem.
  3. In code, set the text 开发者_如何学Gofield's inputAccessoryView to the toolbar.
  4. Send the becomeFirstResponder message to the text field.
  5. Present an action sheet from the toolbar button item using [actionSheet showFromBarButtonItem:sender animated:YES];

You just need to rotate your iPad to any orientation other than Portrait, and then present the popover to see it happen. If you rotate it while the popover is open, the popover rotates as well so it's in the same weird orientation relative to the rest of the app.

Popover shown from inputAccessoryView has wrong rotation

(source: tumblr.com)

Update 2010-08-04 Turns out all popovers and action sheets shown from a item in a toolbar that's an input accessory view (for the keyboard) have this issue. I have submitted a Radar to Apple with Bug ID# 8272121.

0

精彩评论

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

关注公众号