Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

zachsilvey

macrumors 6502
Original poster
Feb 5, 2008
444
3
Battle Ground
Why is it that when I use this code in the AppDelegate the gap between the UILabel and the top of the view I created in the xib goes away. Am I adding the subview the wrong way?

Code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
    
	MainViewController *mainView = [[MainViewController alloc]initWithNibName:@"MainViewController" bundle:nil];
	
	[self.window addSubview:mainView.view];
	
	[mainView release];
    
    [self.window makeKeyAndVisible];
    
    return YES;
}
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.