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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:26:04+00:00 2026-06-12T07:26:04+00:00

sorry if this question is elementary, but I’ve been stuck on this bug for

  • 0

sorry if this question is elementary, but I’ve been stuck on this bug for the past 2 days & I haven’t been able to get past it. I’m using Xcode 4.3.2

I’m trying to load a nib named AController.xib in a method called “- (void) process” in the file named BController.m

To be clear, I copied ./A/AController.xib (which is a UIView), ./A/AController.m, ./A/AController.h to the directory ./B

I only mention this because I’m not sure if it matters for my question.

Currently, my flow works as flows (which could be my problem):

  • A view loads with a “buy” button
  • the user clicks the “buy” button which has an IBOutlet named “buyNow”
  • “buyNow” calls “buy”, which then calls “process”
  • process then tries to load the nib with the following (option 1):

    AController *blah;
    for (id object in bundle){
    if ([object isKindOfClass:[AController class]])
    blah = (AController *) object;
    }
    assert(blah != nil && “blah can’t be nil”);
    [self.view addSubView: blah];

The error I get here is “Thread 1: signal SIGABRT” in main.m
I’ve also tried (option 2),

AController *myView = [[AController alloc] initWithFrame:self.view.bounds];
[self.view addSubview:myView];
[AController release];

And (option 3)

AController * vc = [[AController alloc] initWithNibBundle:@"AController" bundle:nil];    [self.nc pushViewController:vc animated:NO];

I get the same error for all 3 choices. Each option was tried in the method “process”. “process” is written in B.m. Can anyone offer some help so that I may figure this out? Any guidance as to why these options failed would be very helpful for my understanding and would be much appreciated. Thanks for helping a noob!

  • 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-12T07:26:05+00:00Added an answer on June 12, 2026 at 7:26 am

    If AController is a UIView subclass, it cannot load a NIB. Verify it is in fact a controller, but from the initWithFrame and the way you are adding it to a view, it looks like it is not, or is being handled incorrectly.

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

Sidebar

Related Questions

Sorry if this question seems stupid, but it's stumped me for a couple days,
Sorry for this question. There is a lot of information but unfortunately I haven't
Sorry if this is an elementary question but I've just started to consider whether
Sorry if this question has been asked 100 times before, unfortunately, i haven't found
sorry if this question has been asked before, I searched but wasn't sure on
I'm sorry if this question has been asked. I have looked but can not
Sorry if this question has already been answered but I can't find an answer.
I'm sorry if this question has already been answered but I couldn't find it.
Sorry if this question's been asked before, but I can't seem to find an
Sorry for this question but I am stuck. I have folowing syntax: class xx

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.