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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:35:36+00:00 2026-06-12T16:35:36+00:00

There’s a way to preload a modal view controller without showing it? I’m asking

  • 0

There’s a way to preload a modal view controller without showing it?
I’m asking because when I’m displaying the modal view controller (allocating and initializing the view controller class), the view have a little delay to load and display.
After it, when I try to show it again, the delay stops.

I’m using a UITableView, and inside the method scrollViewDidEndDragging I check if the contentOffset.y is less than -90. If so, the user basically “pulled to refresh”, then I’m loading the 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-06-12T16:35:38+00:00Added an answer on June 12, 2026 at 4:35 pm
    • You can use UINib to preload the XIB into memory.

    It will pre-decode the object-tree of the XIB into memory, but won’t instantiate the objects in the XIB. Then you can call the instantiate method of UINib to instanciate the view.

    • You can also force the view of a UIViewController to be loaded by calling its view getter method (as the view is lazy-loaded, so it will be loaded from the XIB the first time it is accessed).

    But as you can only instantiate UI objects (from your XIB) on the main thread — as every UI component and UI action has to be done in the main thread — your app will still “freeze” (block the main thread) while you load the view. You can’t for example load the root UIView of your XIB in a separate thread or queue (you will have an runtime exception if you try that).


    Use Instruments and its “Time Profiler” tool to check where exactly the loading process of your XIB file takes time. (Maybe it is easy enough to resolve, or maybe you will have some component that you can lazy-load only after the view has been displayed, etc.)

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

Sidebar

Related Questions

There is any way to set the generic type (T) of class in the
There was a similar question posted asking in general about alternatives to Qt. Well,
There was an issue in getting an global data into an BroadCast receiver Class,
There is a table view with three sections. The last section may contain many
There is previous little on the google on this subject other than people asking
There are a few ways to get class-like behavior in javascript, the most common
There is a ScrollView and which has many children views. Is there any way
There is a moment in my app, that I need to force to show
There is a column that exists in 2 tables. In table 1, this column
There's a Rails 3.2.3 web application which doesn't use any database. But in spite

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.