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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:14:53+00:00 2026-06-11T22:14:53+00:00

I have two views. One view is registration view. When user clicks on the

  • 0

I have two views. One view is registration view. When user clicks on the registration UIBarButtonItem, it takes them to that view. On that view, there’s another UIBarbuttonitem that says “Back” – so when the user clicks on that button, it takes them to the main view that has registration button on it. Then if the user clicks on Sign up button again, it throws this error;

2012-09-26 19:22:53.256 Users[14763:c07] -[Registration signUp:]: unrecognized selector sent to instance 0x747e5b0
2012-09-26 19:22:53.257 Users[14763:c07] *** Terminating app due to uncaught exception

UsersViewController.h

@interface UsersViewController : UIViewController
@property (nonatomic, strong) Registration *registration;

UsersViewController.m
Signup event:
    self.registration = [[Registration alloc]initWithNibName:@"Registration" bundle:nil];
    [self.view addSubview:self.registration.view];

Registration.h
    @interface Registration : UIViewController
    @property (nonatomic, strong) Registration *mainView; 

Registration.m
Back button Event
   self.mainView = [[Registration alloc]initWithNibName:@"UsersViewController" bundle:nil];     

[self.view addSubview:self.mainView.view]

  • 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-11T22:14:54+00:00Added an answer on June 11, 2026 at 10:14 pm

    When the bar button is pressed, the handling code should look like this:

    - (IBAction)showRegistration:(id)sender
    {
        Registration *registrationViewController = [[Registration alloc] init];
        [self.navigationController pushViewController:registrationViewController];
    }
    

    Make sure your main view controller is embedded in a navigation controller and the OS should do the rest of the work for you. You’ll have a back button on your registration view controller that will take your user back to the previous view. addSubview is not the method generally used for navigating between views like this. You could also use

    [self presentViewController:registrationViewController animated:YES];
    

    or if you’re using storyboards,

    [self performSegueWithIdentifier:@"go to registration view"];
    

    there’s a bunch of ways to do this but addSubview is not the droid you’re looking for.

    Also, you don’t want to give your presented view controller a property that points to its presenter. You should read up on the delegation design pattern in Cocoa. You’ll want to give your Registration view controller a delegate property, assign the MainViewController as the Registration view controller’s delegate when it’s presented, and then implement a delegate call-back method for the MainViewController to do whatever work it needs to when your Registration view controller is dismissed.

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

Sidebar

Related Questions

I have two views within one .xib (one view for landscape, another for portrait).
I have two views, one view takes the whole screen, the second view covers
i have two views,one is aView,another is bView, there is a button on aView,i
I have two partial view and I want to call one of them in
I have two views one of them is in landscape and other in portrait.
IN my apllication i have three Views One,Two,Three. In all view I made one
i have two views 1st one is displaying list (uitableview used), user will select
I have two views in my app, one is a general view where CoreLocation
In my example, I have 3 views: one red view containing two white views.
I have two views.In One view when i click on custom button it goes

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.