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

  • Home
  • SEARCH
  • 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 952615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:55:22+00:00 2026-05-15T23:55:22+00:00

I want to ask a question about the iPhone application. I write a program

  • 0

I want to ask a question about the iPhone application. I write a program which will display a table. However, I don’t know why I cannot display the navigation title in the table. The following is my code

// code

- (void)viewDidLoad {

    [super viewDidLoad];

    // control flow, call another user define function and add the items to the table   
    [self flowControl];

    //Set the title     
    self.navigationItem.title = @"Table Title Hello";

    // can see  
    // NSLog(@"self.navigationItem.title: %@", self.navigationItem.title);

}

The table can only display the item but not the title. Can any one help me?

// ———- Update 1 ————–

The code in the [self flowControl] will call two functions, both of the function is to add the items, e.g [displayNameArray addObject:@"John Chan"];

// ———- Update 2 —————
In my program, the are 2 view controllers.

1) MyViewController

2) SimpleTableView

The first one is used to let the user to enter the information, the second one is used to display the content in table format.

My project name is USERPROJECT

//The following is the content of the .m
#import "MyViewController.h"
#import "USERPROJECT.h"
#import "SimpleTableView.h"

@implementation USERPROJECT

@synthesize window;
@synthesize myViewController;


- (void)applicationDidFinishLaunching:(UIApplication *)application {    

    MyViewController *aViewController = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:[NSBundle mainBundle]];
    [self setMyViewController:aViewController];
    [aViewController release];

    UIView *controllersView = [myViewController view];
    [window addSubview:controllersView];

    // Override point for customization after application launch
    [window makeKeyAndVisible];
}


- (void)dealloc {
    [myViewController release];
    [window release];
    [super dealloc];
}

@end 

And it is one of the content within the ‘MyViewController.m’, I use this to switch to the control from the ‘MyViewController.m’ to ‘SimpleTableView.m’

- (void) switchPageShowTable {

    NSLog(@"%d: switchPageShowTable", order);
    order++;

    SimpleTableView *simpleTableView = [[SimpleTableView alloc] initWithNibName:nil bundle:nil];
    [self presentModalViewController:simpleTableView animated:YES]; 

}

Is it affect the use of the ‘self’ in the calling title? Thank you very much.

  • 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-15T23:55:23+00:00Added an answer on May 15, 2026 at 11:55 pm

    The title you expect to see is displayed in a navigation bar, which is usually part of UINavigationController. To make it work you have to do the following:

    SimpleTableView *simpleTableView = [[SimpleTableView alloc] initWithNibName:nil bundle:nil];
    UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController: simpleTableView];
    [self presentModalViewController:navController animated:YES];
    [simpleTableView release];
    [navController release];
    

    And (a small nitpick) instead of

    self.navigationItem.title = @"Table Title Hello";
    

    you can do this:

    self.title = @"Table Title Hello";
    

    unless you have a reason to explicitly use the navigationItem.

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

Sidebar

Ask A Question

Stats

  • Questions 469k
  • Answers 469k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Here is a basic snippet. See also @JaredReisinger 's comment… May 16, 2026 at 2:42 am
  • Editorial Team
    Editorial Team added an answer Well, it's difficult to explain all the logic behind a… May 16, 2026 at 2:42 am
  • Editorial Team
    Editorial Team added an answer There are many ways, but I think the WPF equivalent… May 16, 2026 at 2:42 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.