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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:37:06+00:00 2026-06-04T00:37:06+00:00

I am using a UIScrollView with an extended content size and have placed many

  • 0

I am using a UIScrollView with an extended content size and have placed many objects within it. It scrolls like a map. Clicking on a button within the UIScrollView will perform a Segue and takes the user to another Scene (another UIView embedded within a UINavigationController). Within the second Scene, clicking on another button will perform another Segue to bring back to the original Scene (the UIScrollView which scrolls like a map).

Everything works fine, EXCEPT that when it returns to the original Scene, it goes back to the default position. HOW do I make it remember the original position? Imagine that it is a map, and by return to it, it should be showing where it left off and users don’t need to re-scroll to the previous place. How can I do that?

I am using Storyboard on iOS 5.

  • 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-04T00:37:07+00:00Added an answer on June 4, 2026 at 12:37 am

    When you perform a segue, that will push the “new” scene on to your navigation stack. If that scene is subsequently “popped” (which would be the default behavior of the UINavigationController’s back button in the new scene), the user should be returned to the original view at the desired content offset automatically. If this is not happening, you may accidentally be pushing a new instance of the original view controller. You should not be performing an additional segue, rather you should be popping the top view controller off of the navigation stack. That said, you can use this rather heavy-handed method for making sure the content offset remains regardless:

    Before you perform your segue, set the property to the value of your scrollView’s contentOffset property, e.g.:

    -(void)prepareForSegue
    {
        [self setScrollViewOffset:self.scrollView.contentOffset];
    }
    

    When this view controller prepares to make another appearance, set it’s scrollview’s contentOffset:

    -(void)viewWillAppear
    {
      [[self scrollView] setContentOffset:self.scrollViewContentOffset animated:NO];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UIScrollView which I create and size dynamically using... scrollView.contentSize = CGSizeMake(scrollView.frame.size.width
I have a UIScrollView with pagingEnabled on and I want to (using like a
I'm using UIScrollView in which I have placed a UIImageView and a UITextView .
I have a UIView that I'm sliding in using a UIScrollView. Code looks like
I have added a UIScrollVIew using IB. Then using the following code i add
I have a subclass of UIScrollView that I'm using for images slideshow, with infinite
I'm using an UIScrollView and I have an image that indicates to the user
I have a UIScrollView subclass that I am programmatically scrolling using UIView animations. I'd
Possible Duplicate: UISlider and UIScrollView using iOS SDK 4.3. I've found when I have
I have problem with customizing each page using pagecontrol and UIScrollView. I'm customizing Page

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.