NavBar linking help, different pages

Discussion in 'Jiggy Runtime Development' started by hockeypanda32, Apr 13, 2008.

  1. hockeypanda32

    hockeypanda32 Well-Known Member

    Joined:
    Dec 18, 2007
    Messages:
    2,183
    Likes Received:
    89
    Device:
    iPhone 4 (Black)
    I have been trying to use the navbar to my advantage for my first app, a gallery viewer, how can I make the navbar buttons do something? I thought Commander147 was gonna make a tut so if he could help or anyone it'd be great!

    RESOLVED: Now to get on with my app, thx to Commander147
  2. Commander147

    Commander147 Member

    Joined:
    Oct 10, 2007
    Messages:
    78
    Likes Received:
    4
    Device:
    iPhone 4 (Black)
    well I am busy working on a serious of tutorials. I am not going to release them individualy but all at once. For the time being use this to make the navigational bars do something.


    var bar = new UINavigationBar( [ 0 , 0 , window.bounds[ 2 ] , 48 ] );
    bar.showButtonsWithLeftTitle( "button1","button2" );
    mainView.addSubview( bar );


    bar.onButtonClicked =
    function( theBar , theButton )
    {
    if ( theButton == 0 )
    {
    alert("Button 1 pressed");
    }
    if ( theButton == 1 )
    {
    alert("Button 2 pressed");
    }
    }
  3. hockeypanda32

    hockeypanda32 Well-Known Member

    Joined:
    Dec 18, 2007
    Messages:
    2,183
    Likes Received:
    89
    Device:
    iPhone 4 (Black)

    thanks a lot! Also cannot wait for the tutorials
  4. shuffle

    shuffle Member

    Joined:
    Dec 26, 2007
    Messages:
    458
    Likes Received:
    6
    Device:
    2G iPod touch
    I am looking forward to the tutorials too, i have been wanting to learn javascript
  5. hockeypanda32

    hockeypanda32 Well-Known Member

    Joined:
    Dec 18, 2007
    Messages:
    2,183
    Likes Received:
    89
    Device:
    iPhone 4 (Black)
    Thx Commander, now i have a head start on the app!

    Previews:

    Please Register or Log in to view images

    Please Register or Log in to view images

Share This Page