Monday, April 29, 2013

Tab Bar Application Part 4 ( Navigation )

                   
                                  Tab Bar Application Part 4 ( Navigation )

Step1
      
      Create a project by using previous tutorial

                  Tab Bar Application Part 1
                  Tab Bar Application Part 2
                  Tab Bar Application Part 3
         
Step 2

       add  a new class call "FirstView"



Step 3

  click the "FirstView.xib" file then change the UI

Step 4


  change the code in "FirstTabView.h" file

#import <UIKit/UIKit.h>
#import "FirstView.h" // import the header of the "FirstView"

@interface FirstTabView : UIViewController

-(IBAction)GotoFirst:(id)sender;

@end


Step 5

  implement the  " -(IBAction)GotoFirst:(id)sender; " method   in the "FirstTabView.m" class

-(IBAction)GotoFirst:(id)sender
{
   
    FirstView *first=[[FirstView alloc] initWithNibName:@"FirstView" bundle:nil];
    //Push detail view controller on to the stack
    [self.navigationController pushViewController:first animated:YES];
   
}




Step 6

add button to the  "FirstTabView.xib"









Step 7

Run Your App







No comments:

Post a Comment