Skip to content

Latest commit

 

History

History
41 lines (34 loc) · 1.02 KB

README.md

File metadata and controls

41 lines (34 loc) · 1.02 KB

TiUniversalPopover

The TiUniversalPopover common.js module for Titanium that emulates Ti.UI.iPad.Popover on non iPad devices. On iPad it creates native Ti.UI.iPad.Popover, on the other it opens styled window with closing on background click.

Useful for launching iPad apps on iPhones. ##Installation

Copy UniversalPopover.js in app/lib folder.

##Usage

In .XML files simply add module attribute

<Popover module="UniversalPopover" id="popover">
    <ContentView>
        <NavigationWindow>
            ...
        </NaigationWindow>
    </ContentView>
</Popover>

<ContentView> supports have both View or Window as a child.

Or in vanilla Titanium

var contentView = Ti.UI.createView({
    backgroundColor:"red",
    width:"50%",
    height:"50%"
});
var popover = require("UniversalPopover").createPopover({
    contentView: contentView,   //must set before show
    width: 200,
    height: 200
});
popover.show();    

License

MIT