-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
31 lines (24 loc) · 702 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
var safariDialog = require('ti.safaridialog');
Ti.API.info("module is => " + safariDialog);
var win = Titanium.UI.createWindow({
title:'Demo', backgroundColor:'#fff',layout:'vertical'
});
var btnOpenDialog = Ti.UI.createButton({
top:20, title:'Open Safari Dialog',
height:60, width:Ti.UI.FILL
});
win.add(btnOpenDialog);
btnOpenDialog.addEventListener('click',function(d){
safariDialog.open({
url:"http://appcelerator.com",
title:"Hello World",
tintColor:"red"
});
});
safariDialog.addEventListener("open",function(e){
console.log("open: " + JSON.stringify(e));
});
safariDialog.addEventListener("close",function(e){
console.log("close: " + JSON.stringify(e));
});
win.open();