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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:35:52+00:00 2026-06-17T05:35:52+00:00

When using Storyboards, why does viewWillAppear not draw my subviews and viewDidLayoutSubviews does and

  • 0

When using Storyboards, why does viewWillAppear not draw my subviews and viewDidLayoutSubviews does and more importantly to access the frame.size value from subviews of subviews I have to call [self.scroller layoutIfNeeded] inside of viewDidLayoutSubviews? I’m interested in understanding the page life cycle of a view controller and what changed in going from xibs to storyboards.

screenshot of view hierarchy

  • 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-17T05:35:54+00:00Added an answer on June 17, 2026 at 5:35 am

    Storyboards are actually implemented as collections of xib files, with additional information about transitions (segues) between them. So the view controller life cycle should not be radically different if we’re just talking about a single view controller.

    It’s very difficult to answer your specific question without understanding how your view controller and its view hierarchy are set up. It sounds like you have a view inside of a scroll view and you want to know when you can access its frame property.

    UIKit follows these steps (roughly):

    1. It loads all the views described in the storyboard/xib file and connects all the actions and outlets as needed. viewDidLoad is called after this step.
    2. It calls viewWillAppear: to indicate that it is about to display the view.
    3. It adds the view to the window, sizing it to fit. The sizing propagates down the view hierarchy, so each view lays out its subviews (if it is configured to autoresize subviews). These changes occur inside an animation block, so once everything is set up the user sees the new view animated into place.
    4. Once animations are complete, viewDidAppear: is called.

    It’s possible you are seeing something strange if a view has autoresizesSubviews set to NO; that may be why you have to call layoutIfNeeded on self.scroller. Note that the documentation for layoutIfNeeded says:

    When this message is received, the layer’s super layers are traversed until a ancestor layer is found that does not require layout. Then layout is performed on the entire layer-tree beneath that ancestor.

    So it could potentially be triggering the layout of other unrelated views.

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

Sidebar

Related Questions

I created an app for iPad (not using StoryBoards), with a UITabBarController. I added
(Apologies for not being able to embed my images yet). Using iOS storyboards, I
I am using storyboard for my map application. MKMapview does not appear when Autolayout
I am using Storyboards for a fairly simple MasterDetail app. The Master shows a
This is my first app using storyboards/segues, and I'm pretty sure the answer to
I've set up a really simple project using storyboards including two views as shown
I have an iOS 5 Tabbed Application, using Storyboards. My Tabbar Controller points to
I'm writing an iOS 5 app (in Xcode 4.3, using Storyboards and ARC) that
Using: iOS 5, ARC, StoryBoards. Have 1 image and text on every cell. Images
I am creating an iPad app using XCode 4 and Storyboards. I have a

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.