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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:22:04+00:00 2026-05-23T18:22:04+00:00

I am converting an iPhone app to a Universal app. I have a NIB

  • 0

I am converting an iPhone app to a Universal app. I have a NIB view which I want to use on the iPad as is but resized and positioned. On the iPhone I am initializing normally with initWithNibName…

 EventEditViewController *eventEditViewController = [[EventEditViewController alloc] initWithNibName:@"EventEditViewController" bundle:nil];

I found that this did not work well for me on the iPad for various reasons. So I created my own initialization method to call instead when running on the iPad…

EventEditViewController *eventEditViewControllerForIPad = [[EventEditViewController alloc] initWithFrame:iPadFrame eventDate:longDate event:eventName delegate:self];

This solved a couple of problems. One how to resize and position the view where I wanted it and how to properly initialize certain variables. I am actually passing more variables than you see here.

It works really well, but I just now noticed that, unlike initWithNibName viewDidLoad fires before my initWithFrame method. I only found this out because a variable I was trying to access in viewDidLoad was showing up as a zombie and I thought I was initializing it in my initWithFrame method.

I was surprised by this behavior. Is it normal? It doesn’t make sense to me that the view would be loaded before the named initMethod in the alloc/init call.

I am now wondering if what I am doing might not be a good thing. Like I said it works really well, but should I not use my own initialization method here?

If it’s ok to do it this way, maybe someone can explain why the view loads before the init method.

Thanks,

John

  • 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-23T18:22:05+00:00Added an answer on May 23, 2026 at 6:22 pm

    If your -initWithFrame:... method is accessing the view controller’s view property, -viewDidLoad will be called before the init method completes because the view accessor will cause the view to be loaded.

    As for whether it’s okay to use your own method, it should be fine provided that your init method calls the designated initializer for the class.

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

Sidebar

Related Questions

Im converting an Iphone app to a universal App, I have created an Ipad
I have an iPhone app that I want to change into an iPad app.
We are converting our website to mobile view (iPhone), but we have no iPhone
I have some .swf files I want to use in an iphone app for
I have an iPhone application that I am currently converting to a universal binary
I'm converting a landscape (UIInterfaceOrientationLandscapeRight) iPhone app to be a universal app. So far
I'm converting an iPhone app to be a universal app, and it's been mostly
I am converting my iPhone app to a universal app and just added the
I'm converting my iPhone app to an iPad version, creating new XIBs for the
I have some image data (jpeg) I want to send from my iPhone app

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.