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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:24:19+00:00 2026-06-10T02:24:19+00:00

Quick question: my ViewController has an IBOutlet for a UILabel would the ViewController’s view

  • 0

Quick question: my ViewController has an IBOutlet for a UILabel would the ViewController's view automatically hold a strong reference to the label? And also, if I programmatically create a UIPopoverController ivar in ViewController and put the UIPopoverController ivar on the screen programmatically too would ViewController's view automatically hold a strong reference to that too?

  • 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-10T02:24:21+00:00Added an answer on June 10, 2026 at 2:24 am

    You should keep a strong reference to any views that are not part of the view hierarchy. Your view controller already has a strong reference to its view property (the main view) and all subviews will be retained by their superview, so you don’t actually need to hold a strong reference to them you can hold a weak reference to those views.

    However, if you have any view which is not in the main view (for example an additional view defined in the .xib file that you might add to your main view at some point later, or one of the child views that you want to remove and re-add programatically) then you should hold a strong reference to these views.

    Also note that when you hold a strong reference to a view in your view controller, you should set self.strongViewRef = nil in viewDidUnload because you don’t need it when the view is unloaded (for example when the view controller is in the background eg. obscured by another full-screen view). The property will be automatically re-set to a new instance of that view when the view is loaded again.

    Regarding the popover, it will be retained while it is presented (by the window I think) but I would recommend holding a strong reference to it while you need it and then setting that pointer to nil once you are done with it. This way you guarantee that you can access it when you need to, which in some cases may be just before it is presented or just after it is dismissed.

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

Sidebar

Related Questions

Quick question - if a textfield in a webform, does not automatically has the
Quick question, has anyone done a benchmark on random number generation between javascript and
here is a quick question, i have my couple view controllers classes, and have
Quick question: Would it be a good or a bad idea to implement my
Quick question. I read my csv file into the variable data . It has
Quick question which I thought would be easily answered. I have a .net website,
Quick question, I have the following string which is a coma separated list of
Quick question. If i am trying to clear multiple divs with the same class
Quick question, indexof() find the first occur position of the string character? what about
Quick question, I was wondering if there is a way to use Solr's API

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.