Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 11-29-2010, 02:38 AM   #1 (permalink)
Registered Member
 
Join Date: Oct 2010
Posts: 90
rk_mail04 is on a distinguished road
Default How to call UIViewController

Code:

RootViewController.m

- (void)viewDidLoad 
{


    Fertility *fertility = [[Fertility alloc]initWithNibName:@"Fertility" bundle:[NSBundle mainBundle]];    
    [self.navigationController pushViewController:fertility animated:YES];
    [fertility release];
    fertility = nil;

    [super viewDidLoad];

}
AppDelegate :

   - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    


        //set onFront equal to YES since firstViewController's view is showing
        onFront = YES;

        //tell the notification center to notify the app delegate if a @"DelegateFlipViewNotification" is received
        //Nothing will happen as a result of this unless you uncomment the indicated lines in SecondViewController.m
        NSNotificationCenter *dc = [NSNotificationCenter defaultCenter];
        [dc addObserver:self selector:@selector(flipViews:) name:@"Flip" object:nil];

        [window addSubview:navigationController.view];

        [window makeKeyAndVisible];

        Report *report = [[Report alloc]initWithNibName:@"Report" bundle:[NSBundle mainBundle]];    
        [self.navigationController pushViewController:report animated:YES];
        [report release];
        report = nil;

        // Add the navigation controller's view to the window and display.

        return YES;

    }
I am First displaying Main menu through RootViewController that is FertilityviewContrller . After adding Report UIViewController to Appdelegate its taking first menu of Report View . But i dont want report as first menu .I understood i am doing wrong calling report in didfinishlaunchingwithoption . how to call report after Fertility Uiviewcontroller.

Last edited by rk_mail04; 11-29-2010 at 12:04 PM.
rk_mail04 is offline   Reply With Quote
Old 11-29-2010, 11:47 PM   #2 (permalink)
Registered Member
 
Join Date: Oct 2010
Posts: 90
rk_mail04 is on a distinguished road
Default

Any one help me how to access uiviewcontroller

Quote:
Originally Posted by rk_mail04 View Post
Code:

RootViewController.m

- (void)viewDidLoad 
{


    Fertility *fertility = [[Fertility alloc]initWithNibName:@"Fertility" bundle:[NSBundle mainBundle]];    
    [self.navigationController pushViewController:fertility animated:YES];
    [fertility release];
    fertility = nil;

    [super viewDidLoad];

}
AppDelegate :

   - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    


        //set onFront equal to YES since firstViewController's view is showing
        onFront = YES;

        //tell the notification center to notify the app delegate if a @"DelegateFlipViewNotification" is received
        //Nothing will happen as a result of this unless you uncomment the indicated lines in SecondViewController.m
        NSNotificationCenter *dc = [NSNotificationCenter defaultCenter];
        [dc addObserver:self selector:@selector(flipViews:) name:@"Flip" object:nil];

        [window addSubview:navigationController.view];

        [window makeKeyAndVisible];

        Report *report = [[Report alloc]initWithNibName:@"Report" bundle:[NSBundle mainBundle]];    
        [self.navigationController pushViewController:report animated:YES];
        [report release];
        report = nil;

        // Add the navigation controller's view to the window and display.

        return YES;

    }
I am First displaying Main menu through RootViewController that is FertilityviewContrller . After adding Report UIViewController to Appdelegate its taking first menu of Report View . But i dont want report as first menu .I understood i am doing wrong calling report in didfinishlaunchingwithoption . how to call report after Fertility Uiviewcontroller.
rk_mail04 is offline   Reply With Quote
Reply

Bookmarks

Tags
iphone, uiviewcontroller, xcode

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 374
7 members and 367 guests
daudrizek, HemiMG, Kirkout, MarkC, Sami Gh, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,665
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, daudrizek
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:48 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0