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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:54:29+00:00 2026-05-18T00:54:29+00:00

I am a new iPhone developer learning Objective-C, and trying to build an iPhone

  • 0

I am a new iPhone developer learning Objective-C, and trying to build an iPhone app using a Navigation-Based template. The way I want this application to function is to have a button, which takes the user to the second screen after being pressed. Unfortunately, I have not seen any examples of this online, and am unsure how to do this.

I realize that I won’t be using a table view, where I would select a particular row that would then take me to another screen. What view would be appropriate to have a button, and possibly a search bar on the first screen, which would then allow me to navigate over to a second screen? I would need the second screen to have a table view which would hold a list of rows retrieved from a sqlite database. What method in the RootViewController (i.e. the first screen) would I use to place the code to execute when the button is selected (i.e. fires an event)?

  • 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-18T00:54:29+00:00Added an answer on May 18, 2026 at 12:54 am

    Not sure I understand you question correctly, but…

    In RootViewController:

    - (void) viewDidLoad
    {
      UIButton* button = [UIButton buttonWithStyle:...];
      [button setFrame:CGRectMake(0, 0, 10, 10)];
      [button addTarget:self action:@selector(onButtonPressed) forControlEvents:UIControlEventTouchUpInside];
      [[self view] addSubview:button];
    }
    
    - (void) onButtonPressed
    {
      SecondViewController* controller = ...;
      [[self navigationController] pushViewController:controller animated:YES];
    }
    

    The addTarget:action:forControlEvent: selector registers the ‘callback’ that should be called every time the button is pressed. In the callback (onButtonPressed) you just create new controller and push it into the navigation controller.

    Usually you should do it in the Interface Builder. Just add IBAction and connect it to the event.

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

Sidebar

Related Questions

I am a new iPhone developer learning Objective-C, and am trying to dynamically calculate
When building a new iPhone app in Xcode, I'm getting this error: codesign error:
I'm new to Objective-C and iPhone development, and I'm trying to store floating-point values
Just became an iPhone developer. I'm completely new to this, and not really sure
I'm an Objective C developer. The new announcement of the Flash for iphone got
I am currently working on an iPhone 2.1 application. I am new to Objective
New to javascript/jquery and having a hard time with using this or $(this) to
I'm an iPhone/Objective-C newbie with an extensive Java background. I'm learning more about memory
I'm learning how to integrate facebook api in iphone app. First I visited facebook
I am using this http://imthi.com/blog/programming/iphone-rss-reader-application-with-source-code.php as a start for my rss reader in my

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.