Skip to main content
robotcoder
Participant
September 9, 2013
Question

[iOS] Can I instantiate a ViewController from AIR, and/or 'place' my AIR app within a UIView?

  • September 9, 2013
  • 1 reply
  • 1171 views

Hello,

We have a fairly complex and custom Objective-C/C++ ViewController class.

I would LOVE to be able to create an AIR app which can:

  1. Instantiate the above ViewController class, by writing a Native Extension.

  2. Add the resulting UIView underneath my AIR app.

  3. OR, place my AIR app's visual elements in a UIView above another UIView.

I have done things like this in C# on Windows, by doing either of the following:

  A. AIR app invokes C# GUI program, so both the AIR program and C# program are running, with one visually on top of the other.

  B. Embed a SWF inside a Windows C# GUI element in Visual Studio.

Basically, I have an existing iOS app, and its source code. I wish to layer over its UI pretty buttons and images. Creating such a UI is FAR easier and faster in AS3, than it is in Objective-C.

I'd like to combine parts of the existing iOS app with AIR elements.

Is there any way to accomplish my goal using ActionScript and iOS?

This topic has been closed for replies.

1 reply

Inspiring
September 9, 2013

We use many different iOS components in our AIR app, including UIViewControllers that popup with other components contained within it.

However, to the best of my knowledge, the iOS components will always be above the AIR/Flex components.

I have spent a lot of time trying to insert an iOS component lower down the view stack but I have never succeeded in doing this.

If you do find a way to do this, then please post it.....

robotcoder
Participant
September 9, 2013

In Objective-C (without AIR), I have been able to place Views directly in the Window, circumventing the normal iOS display list:

AppDelegate *delegate = [[UIApplication sharedApplication] delegate];

[delegate.window insertSubview:myBehindView  belowSubview:self.view];

I have no idea if this will work from AIR. Is it possible from Objective-C to obtain a reference to the UIView that AIR is in?

Inspiring
September 10, 2013

No, this won't work for AIR....