I must be missing something (really simple)

Discussion in 'iOS Development' started by cybohemia, Feb 18, 2009.

  1. cybohemia

    cybohemia New Member

    Joined:
    Jan 25, 2009
    Messages:
    49
    Likes Received:
    0
    Device:
    iPhone 3G (Black)
    I created a small project to test some simple animation I'm trying to learn but, at some point, the screen in the simulator just came up as totally blank (white).

    I couldn't figure out what I had done wrong and just decided to start from scratch. This time, carefully, I did some basic coding and...suddenly...it happened again!

    I looked through the files and IB to try to figure out where I might have done something to cause it to show me a blank screen but there isn't much of anything in the files - I simply haven't done enough so there isn't much to look at.

    Please Register or Log in to view images



    I can't seem to re-create it consistently but I was able to take a project and pare it down to basically the default skeletal files given for a new project - except for one button and and bg color in the view (neither of which are visible cuz of the white screen).

    I'm hoping this is one of those things where some experienced coder would say, "Oh yeah - that's probably just [...]"

    If anyone has any ideas - or want to challenge their chops at figuring out something that may be basic but is driving me nuts - I've uploaded a zip of the project at http://www.cybohemia.com/iphone/tmp/AniHuh.zip

    Thanks!
  2. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    I'm downloading your app now. Know though, that a lot of things don't work on the simulator. [Aside from the most basic] Animations are one of those things.
  3. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    Problem solved:

    Code:
    - (void)loadView {
    	NSLog(@"loadView");
    }
    should be

    Code:
    - (void)loadView {
    	[super loadView];
    	NSLog(@"loadView");
    }

    If you don't call [super loadView], then what you are doing is: Overriding the message without passing the message on to the super object. Meaning, it isn't actually able to load the view.
  4. cybohemia

    cybohemia New Member

    Joined:
    Jan 25, 2009
    Messages:
    49
    Likes Received:
    0
    Device:
    iPhone 3G (Black)
    You're a life saver - or, at least a super time-saver - Skylar EC!

    Thank you thank you thank you!!!

    Please Register or Log in to view images

Share This Page