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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:08:55+00:00 2026-05-25T10:08:55+00:00

I am trying my first UINavigationController app and it is now crashing. If I

  • 0

I am trying my first UINavigationController app and it is now crashing. If I comment out the line that starts with navController, I don’t crash, but if course the app doesn’t work either.

(Note: My environment is IOS 4.2 and Xcode 3.2)

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

    WpglViewController *firstViewController = [[WpglViewController alloc] init];    

    navController = [[UINavigationController alloc] initWithRootViewController:firstViewController];

    [firstViewController release];

    [window addSubview:navController.view];

    [self.window makeKeyAndVisible];

    return YES;
}

Here is the crash information. Can someone point me in the right direction? Thanks for the help.

2011-09-04 07:59:49.309 wpgl[7302:207] -[WpglViewController title]: unrecognized selector sent to instance 0x4b134c0
2011-09-04 07:59:49.313 wpgl[7302:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[WpglViewController title]: unrecognized selector sent to instance 0x4b134c0'
*** Call stack at first throw:

(
    0   CoreFoundation                      0x00ecdbe9 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x00cc25c2 objc_exception_throw + 47
    2   CoreFoundation                      0x00ecf6fb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
    3   CoreFoundation                      0x00e3f366 ___forwarding___ + 966
    4   CoreFoundation                      0x00e3ef22 _CF_forwarding_prep_0 + 50
    5   UIKit                               0x00375781 -[UINavigationController pushViewController:transition:forceImmediate:] + 743
    6   UIKit                               0x0036e4a0 -[UINavigationController pushViewController:animated:] + 62
    7   UIKit                               0x00370d98 -[UINavigationController initWithRootViewController:] + 78
    8   wpgl                                0x00001df9 -[wpglAppDelegate application:didFinishLaunchingWithOptions:] + 146
    9   UIKit                               0x002b81fa -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1163
    10  UIKit                               0x002ba55e -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 439
    11  UIKit                               0x002c4db2 -[UIApplication handleEvent:withNewEvent:] + 1533
    12  UIKit                               0x002bd202 -[UIApplication sendEvent:] + 71
    13  UIKit                               0x002c2732 _UIApplicationHandleEvent + 7576
    14  GraphicsServices                    0x016e4a36 PurpleEventCallback + 1550
    15  CoreFoundation                      0x00eaf064 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
    16  CoreFoundation                      0x00e0f6f7 __CFRunLoopDoSource1 + 215
    17  CoreFoundation                      0x00e0c983 __CFRunLoopRun + 979
    18  CoreFoundation                      0x00e0c240 CFRunLoopRunSpecific + 208
    19  CoreFoundation                      0x00e0c161 CFRunLoopRunInMode + 97
    20  UIKit                               0x002b9fa8 -[UIApplication _run] + 636
    21  UIKit                               0x002c642e UIApplicationMain + 1160
    22  wpgl                                0x00001d44 main + 102
    23  wpgl                                0x00001cd5 start + 53
)
terminate called after throwing an instance of 'NSException'

In my WpglViewController.h file I have the following declared:

@interface WpglViewController : NSObject <UIApplicationDelegate>

{
    UILabel *servingsLabel;
    UILabel *quantityLabel;
    UINavigationController *navigationController;
}

@property (nonatomic, retain) IBOutlet UILabel *servingsLabel;
@property (nonatomic, retain) IBOutlet UILabel *quantityLabel;
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) UINavigationController *navigationController;

@end

and in my WpglViewController I have the following declared:

#import "WpglViewController.h"

@implementation WpglViewController

@synthesize servingsLabel;
@synthesize quantityLabel;
@synthesize navigationController;
  • 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-25T10:08:55+00:00Added an answer on May 25, 2026 at 10:08 am

    WpglViewController needs to be a subclass of UIViewController.

    The exception says that WpglViewController doesn’t respond to the title method which it expects in a UIViewController.

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

Sidebar

Related Questions

Trying to create my first iPhone app that would play back audio. When I
I'm trying to use a UINavigationController but I'm uncertain how. Up till now (for
I'm trying out my first Spring project and must be doing something really stupid
Im trying to develop my first ASP.NET MVC web app and have run into
I'm trying to implement auto-rotation in my application that is basically UINavigationController with lots
trying first time WPF user. I read through some WPF layout docs but am
Trying to first .getJSON then using that data to become the source of my
I am trying to figure out how to use a UINavigationController, UITabBarController, and UITableView
I'm trying to create another UINavigationBar in my project, but it seems that I'm
I'm trying to create a basic navigation app using UINavigationController as root container for

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.