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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:58:00+00:00 2026-05-24T22:58:00+00:00

I began from a tutorial example that had a UIViewController connected to a nib,

  • 0

I began from a tutorial example that had a UIViewController connected to a nib, but now i’ve decided to do it all programmatically. Consequently, I deleted the nib but without knowing how to implement my controller.

I did something like this:

EventsDetailController *myChild = [[EventsDetailController alloc] init];
[self.navigationController pushViewController:myChild animated:YES];

However, it crashes when I click the specific cell.

Do I have to initWith something? Before when I had a nib it was initWithNib

#import <UIKit/UIKit.h>

@interface EventsDetailController : UIViewController {

    NSString *message;
}

@property (nonatomic, copy) NSString *message;

@end



#import "EventsDetailController.h"


@implementation EventsDetailController
@synthesize message;


-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];

}

-(void)viewDidLoad{


    UILabel *theMsg = [[UILabel alloc] initWithFrame:CGRectMake(0,0,200,30)];

    theMsg.text = @"hello";

    [theMsg release];
    [super viewDidLoad];
}

-(void)viewDidUnload{

    self.message = nil;
    [super viewDidUnload];

}


-(void)dealloc{


    [message release];
    [super dealloc];

}
@end

Perhaps, I’ll start from scratch, I think it is still looking for the nib I deleted.

  • 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-24T22:58:02+00:00Added an answer on May 24, 2026 at 10:58 pm

    I’m assuming that you have the app delegate’s window.rootViewController set to a NavigationController instance, and that instance was created with a initWithRootViewController, as you mentioned that you’re getting to the point where it crashes when you click on a cell.

    Looking at the added code, the only thing I see that’s strange is in the ‘veiwDidLoad’ method – you alloc and release ‘theMsg’, but don’t use it. I’m assuming you’ve cut out some code for brevity.

    I ended up starting from scratch when I went away from .nib files (about 5 minutes after starting my first iPhone app). I would run with that, adding in your functionality a little at a time.

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

Sidebar

Related Questions

After some stupid musings about Klingon languages, that came from this post I began
To begin i read all resources from xml in my MergedDictionaries and now I
I just began looking into source control.... And installed subversion from collabnet... I also
Can I access spring bean that exposed using http invoker (server) from GWT application
I began using WCF last night to setup a simple client server that will
This is probably very simple! I followed a tutorial from http://webdesignerwall.com/demo/jquery-sequential/jquery-sequential-list.html It works fine
I just began learning about AudioQueues from the CoreAudio book (rough cuts). I did
I used this tutorial http://delphi.about.com/od/kbthread/a/thread-gui.htm to create a class that asynchronously downloads a file
the example code on the boost website is not working. http://www.boost.org/doc/libs/1_46_1/libs/filesystem/v3/doc/tutorial.html#Using-path-decomposition int main(int argc,
I'm trying to run the Camel Example camel-example-spring-jms (also at http://activemq.apache.org/camel/tutorial-jmsremoting.html ). However, when

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.