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

The Archive Base Latest Questions

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

I have a UIView with a bunch of subviews, all positioned using layoutSubviews .

  • 0

I have a UIView with a bunch of subviews, all positioned using layoutSubviews. When the view is resized, the relative positions all change. I’d like these re-calculations to happen during an animated resize (using +[UIView beginAnimations:] calls). This doesn’t seem to be happening. Any ideas?

  • 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-16T18:27:42+00:00Added an answer on May 16, 2026 at 6:27 pm

    Assumption: You want to have multiple animation steps (i.e. position doesn’t change linearly with frame size).

    This isn’t possible with a single “standard” UIView animations. Why? The frame/bounds is only set once.

    Core Animation has three “layer trees”:

    • The model tree is where your app thinks things are.
    • The presentation tree is approximately what’s being displayed on screen.
    • The render tree is approximately what Core Animation is compositing.

    UIView is a (somewhat thin) wrapper around the model layer. During a UIView animation, Core Animation updates the presentation/render tree — the model tree represents the endpoint of animations. The upshot is that your code can (for the most part) treat animations as instantaneous — moving a view from A to B instantly moves it to B; the change just happens to be animated to the user.

    There are more complicated things you can do with CALayer/CAAnimation directly, but I haven’t investigated this much.

    You could chain multiple animations together using -[UIView setAnimationDidStopSelector:]. (You could also try using multiple animations together with setAnimationDelay:, but I’m not sure what happens with multiple animations on the same property; you might have luck with setAnimationBeginsFromCurrentState:.)

    If you want really fine-grained control, CADisplayLink (OS 3.1+) is a timer that fires after each screen refresh. A fallback option (for 3.0 support) is to use an NSTimer at 30/60 Hz or so.

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

Sidebar

Related Questions

I have a UIView that I'm sliding in using a UIScrollView. Code looks like
I have a bunch of UIView on my main view. I have added the
I have a UIView which has a bunch of subviews. The subviews should be
I have a UIView, it is not inside UIScrollView. I would like to move
I have a UIView that gets added to my UITableView .view as a subview.
I have a little UIView object, CircleColorView.m, that simply creates a view with a
I have an xib with a single UIView containing a bunch of images and
Say you have a UIView on top of which you have a bunch of
I have a UIView that contains my UIScrollView (with a bunch of elements inside)
I have an UIView with many UIImageViews as subviews. The app runs on iOS4

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.