Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5956867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:19:09+00:00 2026-05-22T18:19:09+00:00

– (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch.

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

    // Override point for customization after application launch.

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

    [window addSubview:viewController.view];
    MainPageDialog *overviewViewController = [[MainPageDialog alloc] initWithNibName:@"MainPage" bundle:nil];
    UINavigationController *nav_obj = [[UINavigationController alloc] initWithRootViewController:overviewViewController ];

    [self.viewController presentModalViewController:nav_obj  animated:YES];
    [overviewViewController release];
    [self.window makeKeyAndVisible];

    return YES;
}

This code shows the blue bar of navigation controller, but no buttons on it.It seems like to be that the UINavigationController allocated as empty.
Who knows what problems is?

UPD:Archive http://www.mediafire.com/?lbjjvl6fcue2q18
Please help me, I’m new in objective-c

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T18:19:09+00:00Added an answer on May 22, 2026 at 6:19 pm

    The correct way to use a UINavigationController is to push view controllers on to it. That way they will be stacked and the navigation bar will be populated with a back button when it is case (i.e., when you can actually go back to a previous controller). You control the label that appears in the “back” button by defining the title of the controllers you push.

    The technique shown in another answer (setting explicitly the button) is useful with defining the right button, if you ever need one.

    You could try with this code:

     - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
    
        MainPageDialog *overviewViewController = [[MainPageDialog alloc] initWithNibName:@"MainPage" bundle:nil];
        UINavigationController* navigation = [[UINavigationController alloc] init];
        [navigation pushViewController:overviewViewController animated:NO];
        [overviewViewController release];
    
        [window addSubview:[navigation view]];
        [self.window makeKeyAndVisible];
    
        return YES;
    }
    

    Instead of doing:

        UINavigationController* navigation = [[UINavigationController alloc] init];
        [navigation pushViewController:overviewViewController animated:NO];
    

    you could also use initWithRootController, but to display the general case of how you push a view controller I preferred this one.

    Notice that since you are pushing just a root controller, you should see no back button at the moment, but if you push a second view controller, then it will appear.

    EDIT: I gave a look at your project. Summary of what you should try and do:

    1. objects you need in your NIB: File’s Owner (UIApplication), First Responder, FBFun App Delegate (iVkAppDelegate), Window (UIWindow); remove the rest;

    2. File’s owner delegate outlet is FBFun App Delegate;

    3. FBFun App Delegate window outlet is Window.

    With this simple setup (more or less what you have), use this code :

     - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
    
         UINavigationController* navigation = [[UINavigationController alloc] init];
    
         //--    MainPageDialog *overviewViewController = [[MainPageDialog alloc] initWithNibName:@"MainPage" bundle:nil];
         iVkViewController *overviewViewController = [[iVkViewController alloc] init];
     overviewViewController.title = @"First";
         [navigation pushViewController:overviewViewController animated:NO];
    
         iVkViewController *overviewViewController2 = [[iVkViewController alloc] init];
     overviewViewController2.title = @"Second";
         [navigation pushViewController:overviewViewController2 animated:NO];
    
        [overviewViewController release];
        [window addSubview:[navigation view]];
        [self.window makeKeyAndVisible];
    
        return YES;
    }
    

    In the code above, as you notice, I instantiated twice your iVkViewController just to have a second controller to push onto the navigator.

    Please, delete your existing app from the simulator, and the run this in order to see that the navigation bar is correctly created and you can go back from the second controller to the first one.

    I removed usage of MainPageDialog, because the MainPage nib has many problems.

    But I hope this skeleton is sufficient for you to go forward with your development.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My NSXMLParser breaks on this string: <title>AAA &#8211; BCDEFGQWERTYUIO</title> I parsed it in this
when i view my site : http://www.testtrack.tv/ in IE8's compatibility-mode the horizontal scrollpanes turn
An extension to my previous question: Text cleaning and replacement: delete \n from a
I am generating some text to be shown on a web-site, and use HttpUtility.HtmlEncode
I've got the following login script.. <?php $name = $_POST[name]; $password = $_POST[password]; $query
So to start, I have an array of XML files. These files need to
I am currently running into a problem where an element is coming back from
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
I am currently scraping some data from the internet and converting into xml documents.
I have a JSP page retrieving data and when single or double quotes are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.