Extending ios 8 app to show UIAlertView as view instead of modal UIViewController?

I am trying to create an application extension with a UIAlertView (UIWindowLevelStatusBar of limited width and height), similar to how we open (UITextView and UIButtons) a tweet or post dialog from UIActivityViewController

I added an action extension from File> New> Target> Application Extension.

enter image description here

I selected "Presents the user interface". Now I have an ActionViewController and a MainInterface.storyboard. I changed the height (250), tint (red), background (transparent color), alpha (0.5) of the view controller in the storyboard. When I launch the simulator using Safari and click Share. I see an extension available there.

And when I click I see this screen:

enter image description here

For Plan B, I chose No UI from the above image. And tried to access the "window" from "appDelegate" to add it to the subtitle. But take a look from here: Application Extension Programming Guide

"Access to a sharedApplication object and therefore cannot use any of the methods of this object"

My question is:

Can I show an Action extension like a UIAlertView and fill in some data? How?

thank

+3


source to share


1 answer


Alrite guys, I found the main problem. In the new iOS 8 SDK, you cannot get rid of the UIViewController via an App Extension until I concluded that the best option would be to use an Action Extension . If anyone finds a good way please share :)



0


source







All Articles