Removing the Storyboard

Delete your storyboard

Screen Shot 2017-01-03 at 3.57.32 PM.png

Delete the main interface in plist

Screen Shot 2017-01-03 at 3.58.23 PM.png

If you try running now you will see

Screen Shot 2017-01-03 at 4.00.49 PM.png

Add a plist entry with key NSExtensionPrincipalClass and value the name of your view controller.

Screen Shot 2017-01-03 at 4.02.26 PM.png

Adding the xib

Now create a new view as a xib

Screen Shot 2017-01-03 at 4.05.21 PM.png

Screen Shot 2017-01-03 at 4.06.06 PM.png

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

Screen Shot 2017-01-03 at 4.10.52 PM.png

Then click Identity inspector and type in your ViewController class.

Screen Shot 2017-01-03 at 4.11.50 PM.png

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

Screen Shot 2017-01-03 at 4.12.36 PM.png

Screen Shot 2017-01-03 at 4.14.35 PM.png

 

To the View

Screen Shot 2017-01-03 at 4.16.11 PM.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 2017-01-03 at 4.18.07 PM.png

 

Advertisements