Trying to get a UILabel to Show in a View, without a NIB
<p>I'm new to iPhone programming, and I'm trying to make a simple program without a NIB. I have worked through some NIB tutorials, but I'd like to try some things programmatically.</p>

<p>My code loads without errors, makes the status bar black, and makes the background white. But, I don't think I'm loading my view with a label correctly after that. I presume I'm doing something just fundamentally wrong, so if you could point me in the right direction, I'd appreciate it. I think if I can get the label to show, I'll get some understanding. Here's my code:</p>

<pre><code>//helloUAppDelegate.h
#import &lt;UIKit/UIKit.h&gt;
#import "LocalViewController.h"

@interface helloUAppDelegate : NSObject &lt;UIApplicationDelegate&gt; {
    UIWindow *window;
    LocalViewController *localViewController;
}

@property (nonatomic, retain) UIWindow *window;
@property (nonatomic, retain) LocalViewController *localViewController;

@end


//helloUApDelegate.m
#import "helloUAppDelegate.h"

@implementation helloUAppDelegate

@synthesize window, localViewController;

- (void)applicationDidFinishLaunching:(UIApplication *)application {   
    application.statusBarStyle = UIStatusBarStyleBlackOpaque;
    window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    if (!window) {
        [self release];
        return;
    }
    window.backgroundColor = [UIColor whiteColor];

    localViewController = [[LocalViewController alloc] init];

    [window addSubview:localViewController.view];

    // Override point for customization after application launch
    [window makeKeyAndVisible];
}


//LocalViewController.h
#import &lt;UIKit/UIKit.h&gt;

@interface LocalViewController : UIViewController {
    UILabel *myLabel;   
}

@property (nonatomic, retain) UILabel *myLabel;

@end


//LocalViewController.m
#import "LocalViewController.h"

@implementation LocalViewController

@synthesize myLabel;

// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
    self.myLabel = [[UILabel alloc] initWithFrame:CGRectMake(50, 100, 200, 100)];      
    self.myLabel.text = @"Lorem...";
    self.myLabel.textColor = [UIColor redColor];
}

- (void)dealloc {
    [super dealloc];
    [myLabel release];
}
</code></pre>
