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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:03:33+00:00 2026-05-26T22:03:33+00:00

Have created a small two tab app, then subclassed another view controller to create

  • 0

Have created a small two tab app, then subclassed another view controller to create a third tab. App compiles fine with no warnings. But when I click on the third tab, the app crashes, and I get a SIGABRT message in the main file.

Can you help me find what’s wrong?

TabBarFirstViewController.m

#import "TabBarFirstViewController.h"

@implementation TabBarFirstViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        self.title = NSLocalizedString(@"Screen One", @"Screen One");
        self.tabBarItem.image = [UIImage imageNamed:@"Screen One"];
    }
   return self;
}

TabBarSecondViewController.m

#import "TabBarSecondViewController.h"

@implementation TabBarSecondViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        self.title = NSLocalizedString(@"Screen Two", @"Screen Two");
        self.tabBarItem.image = [UIImage imageNamed:@"Screen Two"];
    }
   return self;

}

ThirdViewController.m

#import "ThirdViewController.h"

@implementation ThirdViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        self.title = NSLocalizedString(@"Screen Three",@"Screen Three");
        self.tabBarItem.image = [UIImage imageNamed:@"Screen Three"]; 
    }
   return self;

}

TabBarAppDelegate.m

#import "TabBarAppDelegate.h"

#import "TabBarFirstViewController.h"

#import "TabBarSecondViewController.h"

#import "ThirdViewController.h"

@implementation TabBarAppDelegate

@synthesize window = _window;
@synthesize tabBarController = _tabBarController;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:    (NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
    UIViewController *viewController1 = [[TabBarFirstViewController alloc]     initWithNibName:@"TabBarFirstViewController" bundle:nil];
    UIViewController *viewController2 = [[TabBarSecondViewController alloc]     initWithNibName:@"TabBarSecondViewController" bundle:nil];
    UIViewController *viewController3 = [[ThirdViewController alloc]    initWithNibName:@"Third View Controller" bundle:nil];
    self.tabBarController = [[UITabBarController alloc] init];
    self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2, viewController3, nil];
    self.window.rootViewController = self.tabBarController;
    [self.window makeKeyAndVisible];
    return YES;
}

Main.m with error message commented out

#import <UIKit/UIKit.h>

#import "TabBarAppDelegate.h"

int main(int argc, char *argv[])
{
    @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([TabBarAppDelegate     class]));   /* Thread 1: Program received signal "SIGABRT" (appears only when clicked on    third tab) */
    }
}
  • 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-26T22:03:33+00:00Added an answer on May 26, 2026 at 10:03 pm

    This line of code is incorrect:

    UIViewController *viewController3 = [[ThirdViewController alloc] initWithNibName:@"Third View Controller" bundle:nil];
    

    I don’t know what your NIB name actually is, you’ll have to check, but it isn’t “Third View Controller”. Perhaps “ThirdViewController”?

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

Sidebar

Related Questions

I have created a small UIView which contains two UIButton s. The view responds
I have created a small application which opens,reads and creates Excel files. The app
I have created a small and simple android app. I tried installing it on
I have two small problems/questions about app development in Windows Phone 7. 1: I
I have created a small iPhone app using MonoTouch - got all provisioning files
I have created a small test app. It creates a new company and a
I have created a small flash CS4 project that has a few custom components
I have created a small application using Microsoft .NET. I don't have problems with
I have created a small chatting application in C#, and started as a Console
I want to globalize my application. I have created a small form which asks

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.