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 8022783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:22:13+00:00 2026-06-04T22:22:13+00:00

Im new to iOS programming and I’m trying to get the table view running

  • 0

Im new to iOS programming and I’m trying to get the table view running with my app but I can’t find any solid information as to why the app keeps aborting. here is the code from the delegate file, can anyone tell me what I’m doing wrong thats causing the error?

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    listTopics = [NSMutableArray arrayWithCapacity:8];
    Topics *topic = [[Topics alloc]init];
    topic.topic = @"Movies";
    [listTopics addObject:topic];
    topic = [[Topics alloc]init];
    topic.topic = @"Games";
    [listTopics addObject:topic];
    topic = [[Topics alloc]init];
    topic.topic = @"TV";
    [listTopics addObject:topic];
    topic = [[Topics alloc]init];
    topic.topic = @"Cars";
    [listTopics addObject:topic];
    topic = [[Topics alloc]init];
    topic.topic = @"Actors";
    [listTopics addObject:topic];
    topic = [[Topics alloc]init];
    topic.topic = @"Sports";
    [listTopics addObject:topic];
    topic = [[Topics alloc]init];
    topic.topic = @"Brands";
    [listTopics addObject:topic];
    topic = [[Topics alloc]init];
    topic.topic = @"Music";
    [listTopics addObject:topic];
    topic = [[Topics alloc]init];

    UINavigationController *navigationController = (UINavigationController *)self.window.rootViewController;      
    TopicsViewController *topicsViewController = [[navigationController viewControllers]objectAtIndex:0];
    topicsViewController.listTopics = listTopics;
    return YES;
}
  • 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-06-04T22:22:14+00:00Added an answer on June 4, 2026 at 10:22 pm

    I assume you want to show a navigation controller which has table view controller as a root view controller, which is TopicsViewController for you.

    In your

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

    method you need to set the rootViewController property of your window. You can not get it because you havent set yet. After that you need to make it visible. The following code should help you

    TopicsViewController *topicsViewController = [[TopicsViewController alloc] init]; 
    // or 
    TopicsViewController *topicsViewController = [[TopicsViewController alloc]initWithStyle:UITableViewStylePlain];
    // depends if it is a view controller or table view controller
    
    topicsViewController.listTopics = listTopics;
    
    UINavigationController *topicsNavController = [[UINavigationController alloc] initWithRootViewController:topicsViewController];
    self.window.rootViewController = topicsNavController;
    [self.window makeKeyAndVisible];
    return YES;
    

    please note that, if you do not use ARC you need to release the objects you have called alloc on them.

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

Sidebar

Related Questions

i'm just new to iOS Programming, so appreciate for any help. I'm trying to
I am fairly new to Objective C and iOS programming but am constantly trying
I am new to iOS programming, i read the view controller programming guide but
I'm new to Xcode and programming for iOS, so I might not get what
I'm sure I'm dense from being new to iOS programming, but, I am having
Many will find this question quite trivial, but since I'm quite new on iOS
I am new at ios programming and I need some help, can't figure out
I'm fairly new to iOS programming, but have a basic understanding of it. I
I am relatively new to iOS and programming, and I made an app before,
I'm pretty new to iOS programming so sorry for any doh questions ;) I

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.