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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:31:15+00:00 2026-05-22T14:31:15+00:00

I am pretty fresh in ios dev world. just wondering should I always do

  • 0

I am pretty fresh in ios dev world. just wondering should I always do it in viewDidLoad method?
Also is it a good idea to always release it in viewDidUnload? Thank you.

  • 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-22T14:31:16+00:00Added an answer on May 22, 2026 at 2:31 pm

    Usually either in awakeFromNib, viewDidLoad, or viewWillAppear. Beginners usually start by putting everything in viewDidLoad which is fine for a simple view but there are reasons to use the other methods.

    awakeFromNib is called when the nib is unpacked. Here you can add any additional views or set attributes that aren’t available in IB. If you’re not using IB then this doesn’t get called.

    viewDidLoad is called when the “view” is loaded (obvio). This should be used for adding view objects (typically subclasses of UIView) or updating them with current data. Any objects allocated here should be released in viewDidUnload (which may be called when memory is low). This gets called when a view is put into a window (triggered by UIViewController’s view getter method) and isn’t currently loaded (views get unloaded on a memory warning if they are not currently visible).

    viewWillAppear is called anytime the view is going to appear in the window. This is the best place to update the data in your view with current data. This always gets called when you return from another modal view or pop another view controller or switch back to this app from the background or come back from a phone call, etc. Make sure you data is updated here or you may be showing stale data. Be sure to call [super viewWillAppear] at some point in this method.

    See also these SO answers: here and here

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

Sidebar

Related Questions

I'm pretty fresh to database handling, but now completely without experience. However, I have
Pretty simple question. I'm quite certain I have the Class, method, codebehind, etc linked
pretty new to HTML and I was wondering why this snippet of code doesn't
I am pretty fresh into working with mobile at all here but i am
Pretty straight forward... I have just setup a Windows Server 2008 r2 Virtual Machine
I've just done a fresh install of Magento but I'm getting some bizarre errors:
Just wondering how I would insert the date 01/01/4000BC into oracle Have tried the
Just did a fresh Install of Eclipse 3.5 and the Android Platform (SDK's and
Pretty basic question ... I can not find the compatibility table (was looking at
Pretty much I need to detect when the scrollView is at 320 x to

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.