开发者

User interface is not visible when the app runs (only in interface builder)

开发者 https://www.devze.com 2023-04-08 12:36 出处:网络
I\'m stuck on a very stupid issue. I\'ve built my mac osx app user interface with Interface Builder (and xcode3).

I'm stuck on a very stupid issue. I've built my mac osx app user interface with Interface Builder (and xcode3).

Now when I run my app I can't see the app window (but only the menu on top).

The MyDocument.xib file is correctly loaded (from xCode navigation sidebar) and I can see my user interface in interface builder.

In my code I haven't changed this method:

- (NSString *)windowNibName
{
    // Override returning the nib file name of the document
    /开发者_JS百科/ If you need to use a subclass of NSWindowController or if your document supports multiple NSWindowControllers, you should remove this method and override -makeWindowControllers instead.
    return @"MyDocument";
}

What am I doing wrong ?

thanks


Check out the following methods in the NSApplicationDelegate documentation:

  • (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender

  • (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag


Each window has an option (checkbox) called visible at start (or something like that; can't check ATM). Doublecheck if that's activated.


It was a bad configured ArrayController!

No error messages.. just the interface not showing up

0

精彩评论

暂无评论...
验证码 换一张
取 消