Teacup
12-17-2007, 12:27 PM
Trying to create a simple full screen application, initially without any text, image or buttons / bars. Just to get the basic hang of windowing.

When I run this application however, it displays nothing. Any suggestions welcome.

#import "MyApplication.h"

@implementation MyApplication

- (void) applicationDidFinishLaunching: (id) unused
{
UIWindow *window;
struct CGRect rect = [UIHardware fullScreenApplicationContentRect];
rect.origin.x = rect.origin.y = 0.0f;

window = [[UIWindow alloc] initWithContentRect: rect];
mainDisplay = [[UIView alloc] initWithFrame: rect];

[window orderFront: self];
[window makeKey: self];
[window _setHidden: NO];
[window setContentView: mainDisplay];


}

@end

SkylarEC
12-17-2007, 03:11 PM
The problem is that you aren't putting anyhting into the main window, so nothing shows up. Don't forget UIView.

Take a look at the Bluetooth.app source I posted in this same subforum.

EDITL Link to the Bluetooth.app source code.
http://www.ipodtouchfans.com/forums/showthread.php?t=13483

nudded
12-17-2007, 11:24 PM
its fullscreen not fullScreen.
and i think you need to add UIView *mainDisplay

Teacup
12-18-2007, 10:09 AM
Thanks Skylar. I thought it must be something like that, but was hopeful that I could initialise screens without the need to put anything in them. Alas that's not the case.

Anyway, onwards and upwards and thanks for the code.