Ios5 Tabgroup无法在Tianium studio中使用IOS 6模拟器打开

Ios5 Tabgroup无法在Tianium studio中使用IOS 6模拟器打开,ios5,ios-simulator,titanium-mobile,ios6,Ios5,Ios Simulator,Titanium Mobile,Ios6,我是Tianium Studio的移动开发新手。我使用的是tabgroup控制器,它与IOS模拟器5.1版配合得很好。但是当我升级到IOS 6时,当我尝试运行相同的代码时,我得到了下面的错误 Script Error = -[UITabBarController setSelectedViewController:] only a view controller in the tab bar controller's list of view controllers can be selecte

我是Tianium Studio的移动开发新手。我使用的是tabgroup控制器,它与IOS模拟器5.1版配合得很好。但是当我升级到IOS 6时,当我尝试运行相同的代码时,我得到了下面的错误

Script Error = -[UITabBarController setSelectedViewController:] only a view controller in the tab bar controller's list of view controllers can be selected. at app.js (line 45).
这是我的代码:

var tabGroup = Titanium.UI.createTabGroup(); 

var win = Titanium.UI.createWindow({  
    navBarHidden: true,
    tabBarHidden: true,
    url:'example.js',
});

var tab1 = Titanium.UI.createTab({  
    height: 30,
    window:win,
});

tabGroup.addTab(tab1);  

tabGroup.addEventListener('open', function(){
    tabGroup.setActiveTab(tab1);
})

tabGroup.open();
请告诉我我是否能做点什么来解决它。或者我可以将模拟器降级到5.1,因为我在运行配置中找不到IOS模拟器5.1


提前感谢。

我测试了您的代码,无法重现此问题。想知道它是否与“example.js”相关:你有什么

但是,您可以在Xcode中安装仿真器的早期版本:如果您在Xcode中打开首选项,在下载下您将能够获得5.1、5.0和4.3


希望对您有所帮助

通过将您的Tianium SDK更新至最新版本,可以解决此问题。目前为2.1.3 RC2

我有同样的问题,这为我解决了它