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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:27:03+00:00 2026-05-19T22:27:03+00:00

I am sure this is a straight forward application, but not sure what the

  • 0

I am sure this is a straight forward application, but not sure what the best way is (and this is all new). I have a Navigation Controller with a UITableViewController (all running in UITabViewController).

When a user taps a row the App goes to a detailed view. Now I am trying to link left and right swipe gestures to navigating the to previous and next record. But what is the right way to do this from within the detailed view, what is the easiest to get a link back to my TableViewController?

A related question is then how I could link a ‘pull down’ to the same action as the ‘back’ button of the Navigation Controller.

I hope the above makes sense. Thanks a million in advance!


I have something working kind-of in the way I like, but it is very clumsy.
When calling the DetailView I pass as parameter the pointer to ‘self’ and the current ‘selectedRow’. Then when a swipe is made I call the function ‘moveToNextRecord’ on the tabelViewController (with the pointer provided) and have the selectedRow as a parameter. In the tableViewController I then call selectRowAtIndexPath and didSelectRowAtIndexPath.

-(void)moveToNextRecord:(NSIndexPath*) selectedRow{
    //[self.navigationController popViewControllerAnimated:YES];
    //NSIndexPath *selectedRow = [self.tableView indexPathForSelectedRow];
    NSUInteger row = selectedRow.row;
    NSUInteger section = selectedRow.section;
    ++row;
    if(row >= [self.tableView numberOfRowsInSection:selectedRow.section])
    {
        row = 0;
        ++section;
        if(section >= [self.tableView numberOfSections])
        {
            row = 0;
            section = 0;
        }
    }
    [self.tableView selectRowAtIndexPath:[NSIndexPath indexPathForRow:row inSection:section] animated:YES scrollPosition:UITableViewScrollPositionMiddle];
    [self tableView:self.tableView didSelectRowAtIndexPath:[NSIndexPath indexPathForRow:row inSection:section]];
}

This seems to work, but the problem is that the next record is slotted after the previous one. This means that the back-button brings me back to the previous record and not back to the table view. So I guess I should tell the ViewController that I don’t want to stack them but basically am going back and then select the next row, while showing the animation directly from one detailView to the next. Does that makes sense?

([self.navigationController popViewControllerAnimated:YES] as first fiction does not seem to work as it does not proper flow.)

  • 1 1 Answer
  • 1 View
  • 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-19T22:27:04+00:00Added an answer on May 19, 2026 at 10:27 pm

    I am moving towards a PageControl solution, as it is a much improved user experience as the page actually moves at the same time the user swipes. With the above suggestion I would need to over-ride the ‘back’ button, and manually populate the ViewController-stack in order to allow a left-to-right transition when doing a right swipe (and it only happens when the swipe is completed)

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

Sidebar

Related Questions

This seems pretty straight forward but I'm not sure what is going wrong. I'm
I am sure this is straight forward but I just cant seem to get
I am sure there must be a relatively straightforward way to do this, but
Not sure this is possible, but looking to write a script that would return
for sure this is not the best title. I'm creating a system to generate
Im sure this question is so easy for all you experts, but I am
Im sure this is simple but newbie here. I have 5 URLS cards.php&type=one cards.php&type=two
I'm sure this is a fairly trivial problem, but I'm not sure what to
I think the title for this question is probably wrong, but I'm not sure
This should be straight forward for a guru. I don't have any code really

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.