Quantcast
Viewing all articles
Browse latest Browse all 8068

NavigationGroup and TabGroup

Ti SDK 3.2.2.GA CLI 3.2.3 IOS SDK: 7.1 IOS simulator 3.5 Im trying add a NavigationWindow into TabGroup. My problem is that i can't can't hide the TabGroup's Header. Then, I see always the TabGroup's Header and NavigationWindow's Header, this is horrible. I trend with navbarhidden but doesn't works.

My second problem is. How can i change the style of the back button into NavigationWindow? Always is a plain text. I have this: http://subefotos.com/ver/?f30c8ab466a3ac5e3d1791b79b87b6abo.png

You can look the first header, is the TabGroup´s Header. I HATE IT. I wanna do something like this: https://skitch-img.s3.amazonaws.com/20110919-x9y4m4mygwf4msm1kite9xnjd9.jpg

My code: index.xml

<Alloy>
    <TabGroup>
        <Tab icon="KS_nav_ui.png" >
            <NavigationWindow id="nav1" platform="ios">
            <Window title="ventana" navBarHidden="true">
 
 
                <Button title="BOTON" onClick="controlNavegacion.openWindow" destino="roja" ventana="nav1"/>
 
            </Window>
                </NavigationWindow>
        </Tab>
        <Tab title="Tab 2" icon="KS_nav_views.png">
            <NavigationWindow id="nav2" platform="ios">
            <Window navBarHidden="true">
 
                <Label>I am Window 2</Label>
 
            </Window>
            </NavigationWindow>
        </Tab>
    </TabGroup>
</Alloy>
Navigation.js
function navigation(ventana){
 
    this.navegacion;
    self=this;
 
}
 
navigation.prototype.openWindow=function(e){
    var win=Alloy.createController(e.source.destino.trim()).getView();
    Ti.API.info(e.source.destino);
 
        if (Ti.Platform.osname=='iphone'){
            var leftButton=Ti.UI.createButton({
                title:"Close",
                style:Ti.UI.iPhone.SystemButtonStyle.BORDERED,
                color:"#990000",
                backgroundColor:"blue"
            });
            leftButton.addEventListener('click',function(e){
                win.close();
            });
 
            win.setLeftNavButton(leftButton);
            self.navegacion.openWindow(win);
        }
        else{
 
 
            win.open();
 
        }
};
 
navigation.prototype.setNavigation=function(ventana){
    this.navegacion=ventana;
};
 
 
 
module.exports=navigation;

Viewing all articles
Browse latest Browse all 8068

Trending Articles