Remove the storyboard

Create a new Single View application with story board.

Delete LaunchScreen.storyboard and Main.storyboard.

Screen Shot 2016-12-15 at 8.05.38 AM.png

Remove Launch screen and Main plist entries

Screen Shot 2016-12-15 at 8.06.06 AM.png

Screen Shot 2016-12-15 at 8.11.27 AM.png

Add the following to AppDelegate.m

#import "ViewController.h"</code>

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.rootViewController = [[ViewController alloc] init];
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
return YES;
}

And add a new plist entry list so.

Add the xib

Create a xib

Screen Shot 2016-12-15 at 8.16.45 AM.png

Screen Shot 2016-12-15 at 8.17.03 AM.png

Screen Shot 2016-12-15 at 8.17.18 AM.png

Hook the View.xib up to the ViewController by clicking File’s Ownder

Screen Shot 2016-12-15 at 8.23.30 AM.png

Then click Identity inspector and type in your ViewController class.

Screen Shot 2016-12-15 at 8.25.59 AM.png

Then hookup the outlet by dragging the File’s Owners view outlet

Screen Shot 2016-12-15 at 8.27.50 AM.png

Screen Shot 2016-12-15 at 8.27.53 AM.png

To the View

Screen Shot 2016-12-15 at 8.27.17 AM.png

It’s not a control drag. Just a regular drag from the view dot in the outlet to the View on the left.

Add a label to xib if you just want to see something visually and test.

Then Run

Screen Shot 2016-12-15 at 8.31.09 AM.png

To get rid of black bars make your ViewController the new Launch Screen

Project -> General

Screen Shot 2016-12-15 at 8.38.26 AM.png

Screen Shot 2016-12-15 at 8.40.15 AM.png

or try

http://stackoverflow.com/questions/25817562/black-bars-appear-in-app-when-targeting-ios7-1-or-7-0-in-xcode6

Advertisements