kirax
kirax

Reputation: 143

linking header and main files to story board xcode

I am pretty new to xcode and for the life of me I cannot figure this one out. I am adding a view controller to a storyboard and I am trying to add a picker to that controller, I have the code in a header and main file I created but how do I link those files to the viewcontroller in my storyboard?

Upvotes: 1

Views: 817

Answers (1)

foundry
foundry

Reputation: 31745

Here is how:

  • Create a custom UIViewController subclass for your code, eg MyViewController.h and MyViewController.m

  • in the storyboard drag out a ViewController

(i think you have done both of these steps)

  • in the Identity Inspector (panel 3 of left-hand side Utilities panels), under 'Custom Class' you should see your class in the scrolling list. Select it.

Then you will want to make links between your picker in the storyboard and your code....

Upvotes: 3

Related Questions