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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:33:22+00:00 2026-06-18T02:33:22+00:00

May somebody let me know: How to navigate from one view to another view

  • 0

May somebody let me know:
How to navigate from one view to another view in single viewcontroller in iphone sdk? I have an application in which i want to push to next view and pop to previous view in a single View controller. How this functionality can be achieved?
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-06-18T02:33:23+00:00Added an answer on June 18, 2026 at 2:33 am

    I have figured out the solution for this problem and here is the solution as below:-

    #import <UIKit/UIKit.h>
    
    @interface ViewController : UIViewController
    {
        IBOutlet UIButton *backbtn;
        IBOutlet UIButton *nxtBtn;
        IBOutlet UILabel *label;
    }
    -(IBAction)nxt:(id)sender;
    -(IBAction)ba:(id)sender;
    
    @end
    
    #import "ViewController.h"
    
    @interface ViewController ()
    @end
    
    int count=0;
    
    @implementation ViewController
    
    - (void)viewDidLoad
    {
        label.text=[[NSUserDefaults standardUserDefaults] objectForKey:@"NavigtionNumber"];
        [super viewDidLoad];
        // Do any additional setup after loading the view, typically from a nib.
    }
    
    - (void)viewDidUnload
    {
        [super viewDidUnload];
        // Release any retained subviews of the main view.
    }
    -(IBAction)nxt:(id)sender
    {
        count++;
        label.text=[NSString stringWithFormat:@" navigation time %d",count];
    
        [[NSUserDefaults standardUserDefaults] setObject:label.text forKey:@"NavigtionNumber"];
        [[NSUserDefaults standardUserDefaults] synchronize];
    
        ViewController *vc=[[ViewController alloc] init];
    
        [self.navigationController pushViewController:vc animated:YES];
    
    }
    
    -(IBAction)ba:(id)sender
    {
        count--;
        label.text=[NSString stringWithFormat:@" navigation time %d",count];
    
        [[NSUserDefaults standardUserDefaults] setObject:label.text forKey:@"NavigtionNumber"];
        [[NSUserDefaults standardUserDefaults] synchronize];
    
        [self.navigationController popViewControllerAnimated:YES];
    }
    
    
    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
    {
        return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
    }
    
    @end
    

    Hope this will help others in future.

    Thanks.

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

Sidebar

Related Questions

I need to copy xib files from one project to another project. This may
May I know how could I pass the value of driver from code behind
May I know if there is any way to remove non-alphabetical symbols from a
Good day! May I have somebody's help on a sample in a book that
I know this question may have appeared few times here and in the internet.
May I know a way to change the Google Map marker color via Javascript..
May i know how could i edit the style of description of the images
May be a stoopid question: I have a number of reference tables in an
Please, may somebody explain me, what can raise an exception in this code? function
Suppose you have a HUGE application "develoopped" ;) by a big team. Here is

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.