navbar help

Discussion in 'Jiggy Runtime Development' started by 34highlighter, Jul 15, 2008.

  1. 34highlighter

    34highlighter New Member

    Joined:
    Jun 10, 2008
    Messages:
    182
    Likes Received:
    0
    Device:
    iPod touch
    i was able to make the nav bar with a button saying "about" it takes you to another page but i cant get the "back" button to work heres my nav bar code

    var mainView = new UIView();
    window.setContentView( mainView );
    var bar = new UINavigationBar( [ 0 , 0 , window.bounds[ 2 ] , 48 ] );
    bar.showButtonsWithLeftTitle( "About" , null , false );

    mainView.addSubview( bar );

    var itemOne = new UINavigationItem( "Level 0" );
    bar.pushNavigationItem( itemOne );



    //code for navbar

    bar.onButtonClicked =
    function( theBar , theButton )
    {
    if ( theButton == 0 )
    {
    var newItem = new UINavigationItem( "Level " + theBar.navigationItems.length );

    theBar.pushNavigationItem( newItem );
    }
    else
    {
    theBar.popNavigationItem();
    }

    //button pressing code

    var mainView = new UIView();
    window.setContentView( mainView );
    var bar = new UINavigationBar( [ 0 , 0 , window.bounds[ 2 ] , 48 ] );
    bar.showButtonsWithLeftTitle( null , "Back" , false );

    mainView.addSubview( bar );

    var itemOne = new UINavigationItem( "Level -1" );
    bar.pushNavigationItem( itemOne );

    }
  2. SUPERBXD

    SUPERBXD Member

    Joined:
    Jan 16, 2008
    Messages:
    932
    Likes Received:
    14
    Device:
    iPhone 5 (Black)
    Jiggy ? Why jiggy . Develop apps for Firmware 2.0

    Please Register or Log in to view images

    using SDK & Cocoa Touch !!
    BTW : nice nav bar.
  3. 34highlighter

    34highlighter New Member

    Joined:
    Jun 10, 2008
    Messages:
    182
    Likes Received:
    0
    Device:
    iPod touch
    well im new 2 coding and i dont wanna pay 99 dollars a year to be an "apple devoloper"=/ and ty

Share This Page