iphone - Classes for new View Controller in Storyboard -


in storyboard drag on new view controller. storyboard has 2 view controllers: main 1 came when created file, , 1 dragged on.

when go 'assistant editor' , select main view controller, viewcontroller.h class. when select other controller uiviewcontroller.h apple file.

how link/create these classes each view controller? there automated way this, or not doing right.

you need create own subclass of uiviewcontroller , set newly created view controller custom class in storyboard.

  1. press cmd+n or go file > new file
  2. select objective-c class , hit next
  3. type uiviewcontroller second box , type name new class in first box (which myclassviewcontroller)
  4. go storyboard, select view controller dragged out, @ inspector , go custom class tab , set custom class newly created view controller (e.g. myclassviewcontroller)

Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -