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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:01:24+00:00 2026-05-15T15:01:24+00:00

How to create next and previous button in navigation bar like in mail application

  • 0

How to create next and previous button in navigation bar like in mail application in iphone.
alt text

  • 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-15T15:01:25+00:00Added an answer on May 15, 2026 at 3:01 pm

    Use the next code (notice that you need the “prev.png” and “next.png” images – arrows):

    - (void)addNextPrevSegmentedControl {
        // Prepare an array of segmented control items as images
        NSArray *nextPrevItems = [NSArray arrayWithObjects:[UIImage imageNamed:@"prev.png"], [UIImage imageNamed:@"next.png"], nil];
        // Create the segmented control with the array from above
        UISegmentedControl* nextPrevSegmentedControl = [[UISegmentedControl alloc] initWithItems:nextPrevItems];
        [nextPrevSegmentedControl addTarget:self action:@selector(nextPrevAction:) forControlEvents:UIControlEventValueChanged];
        // Create the bar button item with the segmented control from above
        UIBarButtonItem *rightButton = [[UIBarButtonItem alloc] initWithCustomView:nextPrevSegmentedControl];
        // Add the bar button item from above to the navigation item
        [self.navigationItem setRightBarButtonItem:rightButton animated:YES];
        // Release memory
        [rightButton release];
        [nextPrevSegmentedControl release];
    }
    - (void)nextPrevAction:(id)sender {
        if ([sender isKindOfClass:[UISegmentedControl class]]) {
            int action = [(UISegmentedControl *)sender selectedSegmentIndex];
    
            switch (action) {
                case 0:
                    // Prev
                    break;
                case 1:
                    // Next
                    break;
            }
        }
    }
    

    EDIT: corrected the code

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

Sidebar

Related Questions

I have created a bar over the keyboard for textfields with previous/next/done button selections.
I need to create next and previous link urls here's a sample <a href=/calendar/2009/10/>previous</a>
I'm using the following script in my website in order to create pagination next-previous
I am trying to create my own next and previous arrows in a fancybox
Hi I have been trying to create a crossfade plugin with previous and next
I want to create updated URL when Next 1000 button is clicked on the
I know that when creating buttons, like next and previous, that the code can
I am creating a mail like scenario where a user has a next and
I want to create a list of thumbnails with a button previous and another
I have a navigation based application. when I click on a table's row next

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.