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:
- In an Xcode iPad project, add a
UILabel
editable text field in IB. - Also in IB, add a
UIToolbar
with aUIBarButtonItem
. - In code, set the text 开发者_如何学Gofield's
inputAccessoryView
to the toolbar. - Send the
becomeFirstResponder
message to the text field. - 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.
(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.
精彩评论