Instance Method

showFromBarButtonItem:animated:

Displays an action sheet that originates from the specified bar button item.

Declaration

- (void)showFromBarButtonItem:(UIBarButtonItem *)item animated:(BOOL)animated;

Parameters

item

The bar button item from which the action sheet originates.

animated

Specify YES to animate the presentation of the action sheet or NO to present it immediately without any animation effects.

Discussion

On iPad, this method presents the action sheet in a popover and adds the toolbar that owns the button to the popover’s list of passthrough views. Thus, taps in the toolbar result in the action methods of the corresponding toolbar items being called. If you want the popover to be dismissed when a different toolbar item is tapped, you must implement that behavior in your action handler methods.

See Also

Presenting the Action Sheet

- showFromTabBar:

Displays an action sheet that originates from the specified tab bar.

Deprecated
- showFromToolbar:

Displays an action sheet that originates from the specified toolbar.

Deprecated
- showInView:

Displays an action sheet that originates from the specified view.

Deprecated
- showFromRect:inView:animated:

Displays an action sheet that originates from the specified view.

Deprecated