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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:37:42+00:00 2026-05-24T10:37:42+00:00

I created a button in my cover.h file for my first view #import <UIKit/UIKit.h>

  • 0

I created a button in my cover.h file for my first view

#import <UIKit/UIKit.h>


@interface cover : UIViewController 
{

     IBOutlet UIButton *Enter;

}

@property (nonatomic, retain) UIButton *Enter;
-(IBAction)buttonpressed:(id)sender;

@end

and connected it with the actual button in the inteface builder by choosing File’s Owner in the tiny box that gives you the choice of File’s Owner, First Responder, and View

Then I went to cover.m file and added the following code

-(IBAction)buttonpressed:(id)sender
{

      [[NSBundle mainBundle] loadNibNamed:@"nextView" owner:self options:nil];
      NSLog(@"pressed");

}

SO when I go to the nextView.xib and modify nextView.m and nextView.h and access its buttons and do the same thing I did for cover.xib cover.m and cover.h , it doesn’t work properly.

What happens is that when I click the enter button in the cover view it shuts down the app. This does not happen until I connected the button to function and outlet (Meaning when it was just switching views and the second view wasn’t doing anything it would work)

Thank you for any help you can give. Sorry if I haven’t given enough information, kinda new at this, but as find out more info I should have had, I will add it.

Thank you

Edit 1 :

I did not notice anywhere where it said there was an error or anything like that. It built correctly

  • 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-24T10:37:44+00:00Added an answer on May 24, 2026 at 10:37 am
    • It’s convention to capitalize class names. I’d Suggest CoverViewController. This makes it more obvious, when reading your code, what we’re looking at.

    What is your intent here? To show nib after nib of content?

    Is the “files owner” of every nib a CoverViewController?

    What you have actually done is (catastrophically) reloaded the views for the existing controller. This will not end well.

    What you want to do is create another instance of the same class:

    -(IBAction)buttonpressed:(id)sender {
    CoverViewController nextController = [[CoverViewController alloc] initWithNibName:@"nextView"];
    [navigationController pushViewController:nextController animated:NO];
    }
    

    If you’re not using a nav controller, you probably want to be.
    Read up on the View Controller Programming Guide.

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

Sidebar

Related Questions

I have button created programmatically in the UIImageView. This view was also created programmatically.
I've created a button (symbol), and added a OVER state, which covers a bigger
I have created button 2 below: <input id=Button1 type=button value=Stop onclick=alert('hello world');/> <input id=Button2
I created a button and added an action for it, but as soon as
I created a button and I need it to restart the form I have
I created a button with a 9patch image as a background. In the 9patch
I have created a button CSS class that uses background images with different positions
Actually I created a button using the cobogw widget library. But the button does
I have created a button in my Android application & I tried to set
I have created a button. So when I click the button it gives me

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.