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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:57:54+00:00 2026-05-19T14:57:54+00:00

I have a view with three buttons in an iphone app, want to go

  • 0

I have a view with three buttons in an iphone app, want to go to another view by clicking a particular button, tried add target method, its working fine but when we go to next view after navigation and click on the back button their it crashes??

Here is my code.

- (void)viewDidLoad { 

    [super viewDidLoad]; 
    helpButton=[UIButton buttonWithType:UIButtonTypeRoundedRect]; 
    helpButton.frame= CGRectMake(5, 370, 90, 30); 
    [helpButton setTitle:[NSString stringWithFormat:@"Help"] forState:UIControlStateNormal]; 
    [helpButton addTarget:self action:@selector(btnClicked:) forControlEvents:UIControlEventTouchUpInside]; 
    helpButton.tag=1;
    [self.view addSubview:helpButton];
}

Please help me

Thanks in advance

  • 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-19T14:57:55+00:00Added an answer on May 19, 2026 at 2:57 pm

    when I look at your code, it seems that your helpButton is a class variable… If it is true, you are missing a retain :

    helpButton=[[UIButton buttonWithType:UIButtonTypeRoundedRect] retain]; 
    

    not sure it will fix your problem, but it can help…

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

Sidebar

Related Questions

I have a universal iOS app with a custom view that has three buttons,
I have a view with a button and three UITextFields. The view's background is
I want to show an image view for three like on/off,if any one have
i want to click a button to change Views in iphone app . I
I have a UIPickerView which works correctly, now I want to add a button
I want to switch to another viewController. I have an UIButton on my view,
I have three different views in my iPhone app, and when the user presses
I have a navigation based app. Press a button on main view, then I
I have created a view in which there is a capture button. When i
I have three view on the same place. I need to show them like

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.