This version of Astro is only compatible with Xcode 7.3
Menu

Modal View Plugin

The modal view plugin allows you to create a modal with a plugin's view. A modal view is useful when you want to display content to the user that blocks interaction with the main screen.

var modalWebViewPromise = WebViewPlugin.init();
modalWebViewPromise.then(function(modalWebView) {
    modalWebView.navigate('http://www.example.com/support.html');

    // The support page fires a custom js event to tell app.js to dismiss the modal
    modalWebView.on('application:support__dismiss', function() {
        modalView.hide();
    });

    modalView.setContentView(modalWebView);
    modalView.show();
})

Methods

ModalViewPlugin.init() #

Creates and returns an instance of the modal view plugin that is used to make subsequent method calls.


setContentView(plugin) #

Sets a plugin's view as the modal's content area.


show(options) #

Shows the modal.


hide(options) #

Hides the modal.


setBackgroundColor(color) #

Sets the background color of the modal view