0

I created a controller called Login with the xib file. I'm wanna make it the start screen. so in my app delegate,

H file:

UIWindow *login;
@property (nonatomic, retain) IBOutlet UIWindow *login;

M file:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

    // Override point for customization after application launch.
[self.login makeKeyAndVisible];
    return YES;
}

am I missing anything like linking to interface builder? am getting a blank screen

user2514963
  • 156
  • 3
  • 19

1 Answers1

0

I think you need to create a UIViewController subclass together with your login nib file and then alloc and init this view controller so that you can then make the UIViewController's view the main view.

Even better would probably be the use of storyboard, where you can easily set the initial view controller all on your storyboard.

There is a good Tutorial about iOS Storyboards. I personally find the use of storyboards very convenient. In this SO question I listed some of the pros and cons of storyboards (IMHO):

Does storyboard eliminate the need for .nib

Community
  • 1
  • 1
Besi
  • 22,579
  • 24
  • 131
  • 223