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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:16:27+00:00 2026-05-28T05:16:27+00:00

I need something like this + scrollview | |__ moving content | |__ non

  • 0

I need something like this

+ scrollview
|
|__ moving content
|
|__ non moving content

The tricky part is that I’m modifying an existing piece of code where I can’t use the
scrollview parent to set the “non moving content” as it’s child. The non moving content
must be a scrollview child. I was thinking of attaching it to the background view but
I don’t know how to access the UIScrollview’s background view.

  • 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-28T05:16:27+00:00Added an answer on May 28, 2026 at 5:16 am

    I believe the “recommended” way to do this is to override layoutSubviews in a custom UIScrollView subclass. This was covered (IIRC) in a 2010 WWDC session you ought to be able to get if you are a developer program member.

    Assuming you can’t subclass UIScrollView (given your restrictions on modifying existing code), you can do something like the following.

    Let “staticView” be the “non moving content” you wish to keep fixed:

    UIView *staticView;
    

    Create an ivar (probably in your view controller) to hold its initial center:

    CGPoint staticViewDefaultCenter = [staticView center]; // Say, in viewDidLoad
    

    Make your view controller the scroll view’s delegate if it isn’t already, then implement something like the following:

    - (void)scrollViewDidScroll:(UIScrollView *)scrollView {
        CGPoint contentOffset = [scrollView contentOffset];
        CGPoint newCenter = CGPointMake(staticViewDefaultCenter.x + contentOffset.x,
                                        staticViewDefaultCenter.y + contentOffset.y);
        [staticView setCenter:newCenter];
     }
    

    This will cover the simple case of a scrollable view. Handling a zoomable view gets a little trickier and will depend in part on how you have implemented your viewForZoomingInScrollView: method, but follows an analogous procedure (this time in scrollViewDidZoom: of course).

    I haven’t thought through the implications of having a transform on your staticView – you may have to do some manipulations in that case too.

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

Sidebar

Related Questions

In some part of my code I need something like this: $product_type = $product->type;
What I need is something like this: /<[\w\d]+ ([\w\d]+\=[w\d])+\/>/ Something that would match several
I need to create an XML schema that looks something like this: <xs:element name=wrapperElement>
Following Problem: I need something like an empty scope. Which means that this scope
I need something like this http://jonraasch.com/blog/a-simple-jquery-slideshow but w/o the absolute positioning. Is it possible?
Ok, I need something like this: datediff(second, date_one, date_two) < 1 dates are stored
I need to do something like this: <input type=button value=click id=mybtn onclick=myfunction('/myController/myAction', 'myfuncionOnOK('/myController2/myAction2', 'myParameter2');',
I guess this is a simple question. I need to do something like this:
i want something like this the user enter a website link i need check
I need(for rapid prototyping and libraries integration) something like this(extensions for usual arrays) double[]

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.