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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:00:48+00:00 2026-05-20T17:00:48+00:00

I am creating a simple app that let’s the user view movies after clicking

  • 0

I am creating a simple app that let’s the user view movies after clicking buttons. The first screen you see is the Main Menu with 2 buttons. One of them sends the user to a sub view which I coded as this in an IBAction method:

ViewConroller *nextView = [[ViewController alloc] initWithNibName:@"NextMenu" bundle nil];
[self.view addSubview:[nextView view]];
[nextView release];

This part is fine except that the sub view shows a 20 px bar across the bottom of the previous view. I looked around and none of the solutions like this one work for me. This isn’t even the main problem. On the sub view, whenever I click a button, the app explodes. The IBAction methods break before even executing a line inside the method. Here, in the goBack IBAction method, I am trying to dismiss the subview and go back to the main menu:

[self.view removeFromSuperview];

My connections are correct in my XIB files and everything seems to be in order. The buttons just aren’t executing. I’m not sure if it has to do with adding the sub view or what. I have done a lot of searching around on google and this website, but I still can’t find a solution.

Here is an example of the error I’m getting:

Terminating app due to uncaught exception 'NSInvalidArgumentException, reason: '-[__NSCFType goBack:]: unrecognized selector sent to instance 0x5640b70'

Hopefully you guys can help me out, this is really quite frustrating. I feel like I’ve tried everything. Thanks for your time. Let me know if I need to provide any more information. Thanks again.

  • 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-20T17:00:49+00:00Added an answer on May 20, 2026 at 5:00 pm
    ViewController *nextView = [[ViewController alloc] initWithNibName:@"NextMenu" bundle nil];
    

    View controller is created.

    [self.view addSubview:[nextView view]];
    

    self.view added value of nextView.view as it’s subview and retained it (N.B. it retained next.view value not nextView itself)

    [nextView release];
    

    nextView is released and immediately deallocated (because it has never been retained by anybody)

    Button is trying to send a message to deallocated object -> behavior is undefined, in your case some other object (or something that looks like an object) is there and it doesn’t understand what goBack: means.

    That’s why you should not invent a wheel (especially if you are new to this) with your own navigation. Use UINavigationController instead.

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

Sidebar

Related Questions

I'm creating a simple app that loads a modal view in the root view
I am creating simple app on Silverlight 4. In folder of View I have
I'm currently creating my first android app and I've a simple class 'Player' I
Let me start off by saying that this is my first real Cocoa app.
I im creating a simple testing app that runs a check every hour on
Creating a simple app that calculates the speed your going and displays it in
I'm creating a simple proof-of-concept web-app that integrates with Facebook. The base functionality is
I am creating a simple android app to view a comic book. The pages
I have a simple Rails 3 blog app that needs an admin user so
my question is simple i think. I am creating a really simple app which

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.