Instance Method

presentOpenInMenuFromRect:inView:animated:

Displays a menu for opening the document and anchors that menu to the specified view.

Declaration

- (BOOL)presentOpenInMenuFromRect:(CGRect)rect inView:(UIView *)view animated:(BOOL)animated;

Parameters

rect

The location (in the coordinate system of view) at which to anchor the menu.

view

The view from which to display the menu.

animated

Specify YES to animate the appearance of the menu or NO to display it immediately.

Return Value

YES if this method was able to display the menu or NO if it was not.

Discussion

This method is similar to the presentOptionsMenuFromRect:inView:animated: method, but presents a menu restricted to a list of apps capable of opening the current document. This determination is made based on the document type (as indicated by the UTI property) and on the document types supported by the installed apps. To support one or more document types, an app must register those types in its Info.plist file using the CFBundleDocumentTypes key.

If there are no registered apps that support opening the document, the document interaction controller does not display a menu.

This method displays the options menu asynchronously. The document interaction controller dismisses the menu automatically when the user selects an appropriate option. You can also dismiss it programmatically using the dismissMenuAnimated: method.

See Also

Presenting and Dismissing Menus

- presentOptionsMenuFromRect:inView:animated:

Displays an options menu and anchors it to the specified location in the view.

- presentOptionsMenuFromBarButtonItem:animated:

Displays an options menu and anchors it to the specified bar button item.

- presentOpenInMenuFromBarButtonItem:animated:

Displays a menu for opening the document and anchors that menu to the specified bar button item.

- dismissMenuAnimated:

Dismisses the currently active menu.