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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:07:42+00:00 2026-06-14T15:07:42+00:00

I am working in Xcode 4.5.2. I have the following problem: When i make

  • 0

I am working in Xcode 4.5.2.
I have the following problem:
When i make projects from non-empty projects – that is the views are initialised from the storyboard, sometimes when i add the code

[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
UIButton *b = [UIButton buttonWithType:UIButtonTypeRoundedRect];
b.frame = CGRectMake(20, 20, 100, 100);
[self.view addSubview:b];

to the viewDidLoad method it is recursively called again after the addSubview method call and sometimes (bless the sky) it doesn’t.
Can anyone tell me what’s the problem and how to solve it?
My gratitude.

  • 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-14T15:07:43+00:00Added an answer on June 14, 2026 at 3:07 pm

    Edit: As @WDUK correctly states, the following answer is wrong. It would explain recursive in loadView, not viewDidLoad.

    Old, wrong answer:

    Recursive calls occur when after the call to -[super viewDidLoad]
    the view property has not been set and you then call self.view.

    You probably just forgot to connect the view to the file’s owner’s
    view outlet.

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

Sidebar

Related Questions

I have been working with Xcode 4.2.1, but following some tutorials and videos from
Working in Xcode on Mac OS X Leopard in C++: I have the following
I've recently downloaded Xcode 4 and now two of my projects that were working
I have the following code that loads a plist file from the resource folder
I have an existing iPhone app that was working fine in Xcode 4.0 prior
I have a small c++ project I've been working on in XCode, that I'd
I have following problem and only could solve it partially yet. I am working
HELLO, I am working on XCODE 3.1.4 , my iphone have 3.1.2 os...But as
My Xcode's snapshot feature isn't working well. (version 4.2.1) I have used the snapshot
I have made a ViewController in XCode for an iPhone project I'm working on,

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.