+ Reply
Results 1 to 5 of 5
  1. #1
    What's Jailbreak?
    Join Date
    Aug 2007
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Interface Builder Help

    Hi,
    I was just wondering if anyone has found out how to implement an interface built by Interface Builder into the xcode project.

    I have tried modifying the AppDelegate.m to this (see below),

    Code:
    - (void)applicationDidFinishLaunching:(UIApplication *)application {	
    self.window = [[[NSBundle mainBundle] loadNibNamed:@”MainWindow” owner:self options:nil] objectAtIndex:0];
    [window makeKeyAndVisible]; 
    }
    but I have had no success. I get compiler errors, but yet i cant see anything wrong with it.

    Does anyone have any tips on how to get this working?

    Thanks

    Can someone just point me in the right direction? That is all I need
    Last edited by alexskiing; 03-30-2008 at 04:04 PM. Reason: Automerged Doublepost

  2. #2
    iPhone? More like MyPhone
    Join Date
    Nov 2007
    Posts
    206
    Thanks
    8
    Thanked 32 Times in 29 Posts

    go to /Developer/Applications

    Interface Builder will be there.
    hit thanks if thanks are due.

  3. #3
    Green Apple spliket's Avatar
    Join Date
    Aug 2007
    Posts
    81
    Thanks
    5
    Thanked 11 Times in 10 Posts

    Cocoa Touch Support
    FAQ: How do I configure my Cocoa Touch application to load a NIB file automatically?

    *

    Add a new key to your Info.plist called NSMainNibFile.
    *

    The value of this key should be a string containing the name of the nib file you would like to use—such as "MainWindow".
    *

    The naming convention of this nib is typically along the lines of MainWindow.
    *

    The .nib extension is not required in the Info.plist.
    "Beware the voice without a face."

  4. The Following User Says Thank You to spliket For This Useful Post:

    alexskiing (03-31-2008)

  5. #4
    What's Jailbreak?
    Join Date
    Aug 2007
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Thank you very much, i will try that. I will report my findings in the morning.

    Ok. what i found was that that method does not work. when I add the string to the info.plist it seems to have not effect. I also tried putting the code i had in testAppDelagate.m back in, but with no success.
    I dont know quite what is going wrong, but thanks for the suggestions. If anyone has any more, please tell me.
    Last edited by alexskiing; 03-31-2008 at 08:55 AM. Reason: Automerged Doublepost

  6. #5
    Green Apple
    Join Date
    Apr 2008
    Posts
    77
    Thanks
    0
    Thanked 7 Times in 6 Posts

    Did you remove all the other stuff that was already in there? (the view commands and such) Because I have what you have and it works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts