Select the image view in the storyboard canvas and remove it using the keyboard delete key. The only change necessary for the purposes of this example is to replace the image view with a text view. Locate this file in the project navigator panel and load it into Interface Builder.īy default, Xcode has created a template user interface consisting of a toolbar, a “Done” button and an image view. The user interface for the Action extension is contained in the MyActionExt -> MainInterface.storyboard file. ![]() In the remainder of this chapter and the next chapter, both of these concepts will be implemented through the creation of an example Action extension and host app. With the appropriate behavior implemented, a host app can receive modified content from an Action extension and make constructive use of it on the user’s behalf. The other possibility is for host apps to be able to move beyond simply displaying the Action extension as an option within the activity view controller. An Action extension must be bundled with a containing application which must, in turn, provide some useful and meaningful functionality to the user. In the first instance, there is the Action extension itself. Unlike other extension types, there are two sides to an Action extension. In other words, an Action extension that is only able to work with text based content will not appear as an option in the activity view controller when the user is currently working with or viewing image or video content within a host app. The appearance or otherwise of the Action extension within the activity view controller is entirely context sensitive. When an Action extension is created, it must declare the types of content with which it is able to work. ![]() Action extensions appear within the action area of this panel alongside the built-in actions such as printing and copying of content. Figure 86 1, for example, shows the activity view controller panel as it appears from within the Safari web browser running on an iPhone. Action extensions appear within the activity view controller which is the panel that appears when the user taps the Share button within a running application.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |