0

I'm very new to Adobe Edge animations and from my understanding, they render correctly in mobile safari, and UIWebViews embedded inside iOS apps.

However, this would mean that my device always requires an internet connection to display the above animation.

I know it's possible to display stored HTML content from within an iOS app and that there's limited possibilities for running local javascript; Is there a way this can be used to run an Adobe Edge animation locally?

PS: I have not created the animation but I can request whatever files are necessary, from the animator.

Sid
  • 9,508
  • 5
  • 39
  • 60

1 Answers1

1

n xCode all you have to do is drag a webview onto your view. Make an outlet to it (I named mine 'webview'.) then load the html into the webview like so:

- (void)viewDidLoad
{
    [super viewDidLoad];

    NSString *html = @"<html> ... the rest of your html";


    [self.webview loadHTMLString:html baseURL:nil];
}

To add in the javascript adobe edge you will give you. Just add them into the header of your html like this ...

<script type="text/javascript">
   JavaScript statements...
</script>

I believe it will link them to files automatically but you can just add it into your header.

Joel Johnson
  • 134
  • 7
  • Hi Joel, thanks for your response. This is kind of the direction I am thinking of going in; Still awaiting files from the designer so I may give this a shot and let you know how it goes. Linking to files is still unknown territory but I think I'll just load them up in the app's root folder and see what happens. Have you tried this and does it work for you? – Sid Jan 29 '13 at 02:38
  • 1
    @Sid I have loaded javascript audio players and html 5 video it has worked well. I ended up moving over to the built in audio player eventually for the added features. If your going to link files then you need to do something like [this](http://stackoverflow.com/questions/13152170/using-html-js-file-saved-in-the-sandboxdocuments-directory-of-an-ios-app-so/13152725#13152725). You could also use the less elegant solution where you copy and paste the code between the script tags I put in the answer. – Joel Johnson Jan 29 '13 at 14:10