Edit Menu
Users can display an Edit menu to perform actions such as cut, paste, and selection in text view, Web page view, and image view.
You can adjust the behavior of some menus to give users more content control in your app. For example, you can:
- Specifies which standard menu command is appropriate for the current environment
- Decide the location of the menu before the menu is displayed so you can protect the important parts of your app's UI from being obscured
- Determines the default selected object when the user double-clicks to display the menu
You can't change the menu to its own color and shape.
View copy, Cut, and Paste operations get information on how to implement these behaviors in your code.
To ensure that the Edit menu behavior in your app meets the expectations of your users, you should:
displays commands that make sense in the current environment. For example, if no content is selected, the menu should not contain copy and cut, because these commands are actions on the selection. Similarly, if something is selected, the menu should not contain a selection. If you are in a custom view that supports the Edit menu, you are responsible for ensuring that the menu display commands are appropriate for the current environment.
adjust the menu that appears in your layout. iOS Displays the Edit menu above or below the insertion cursor or selection, depending on the space available, and placing the menu pointer so that the user can see how the menu command is associated with the content. If necessary, you can encode the location of the menu before the menu is displayed so that you can protect the important parts of your app's UI from being obscured.
supports all gestures that the user can invoke from the menu. While touch and hold gestures are the primary way for users to display the Edit menu, they can also double-click a word in the text view to select the Word and display the menu at the same time. If you support menus in a custom view, make sure to respond to all gestures. In addition, you can define which objects are selected by default when the user double-clicks.
do not create a button in your UI that can get commands in the Edit menu. For example, it's better to have the user use the Edit menu to perform the copy operation than to provide a copy button, because the user will wonder why there are two ways to do the same thing in your app.
if it is useful to the user, consider supporting static text for your selection. For example, a user might want to copy the title of a picture, but they don't want to copy the label element or the label of the view title, such as the account. In the text view, the selection of the word should be the default.
do not let the button title be selected. A selectable button caption will make it difficult for the user to display the Edit menu without activating the button. In general, elements that behave like buttons do not need to be selected.
Combine support for undo and redo with support for copy and paste. People often expect to undo recent actions when they change their mind. Because the Edit menu does not ask for confirmation before performing the action, you need to give the user the opportunity to undo and redo the action.
If you need to create a custom Edit menu element similar to the one below, follow these guidelines:
Edit menu to create edits, changes, or other actions directly above the user's selection. A standard menu entry is expected to operate on top of the current environment text or object, and it is best to have a similar behavior for your custom menu entry.
A custom entry is listed after all system-supplied entries. Do not distribute your custom entries in the system-provided entries.
keep the number of custom menu entries reasonable. You don't want to overwhelm your users with too many options.
Use concise names for your custom menu entriesand ensure that the name accurately describes the function of the command. In general, the entry name should be a verb describing the action performed. Although you should usually use a single uppercase Word as the entry name, if you must use a phrase, use the title style capitalization. (in short, the title style of capitalization means that each word is capitalized, except for articles, parallel conjunctions, and four-letter or below prepositions.) )
This article is translated from the official Apple document to view the integration set: Https://github.com/Cloudox/iOS-Human-Interface-Guidelines All rights reserved: Http://blog.csdn.net/cloudox_
"IOS Human Interface Guidelines"--edit Menu