我试图在钛中使用“Popover”功能。钛罂粟不起作用
我去throught的的KitchenSink和我的应用程序建立了一个代码,但一些如何
我得到这个错误:
Result of expression 'Ti.UI.iPad' [undefined] is not an object.
我不知道我做错了。
这里是我的代码:
var RLWindow=Ti.UI.createWindow({backgroundColor:'#700'});
var LBBar=Titanium.UI.createView({height:60,left:0,right:0,top:105,backgroundImage:'Images/toolbar.jpeg'});
var ShowNotes=Ti.UI.createButton({color:'blue',font:{fontSize:20,fontWeight:"bold"},right:10,title:'Today Notes',height:40,width:120});
LBBar.add(ShowNotes);
RLWindow.add(LBBar);
ShowNotes.addEventListener('click',function(e){
var popover = Ti.UI.iPad.createPopover({
width:300,
height:250,
title:'Test Popover',
arrowDirection:Ti.UI.iPad.POPOVER_ARROW_DIRECTION_UP
});
popover.show({
view:button,
animated:true
});
});
请帮助我这个情况..
谢谢
尝试在清洁旧版本之后进行新建。并使用 'popover.show({view:ShowNotes, animated:true });' –