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.
- press cmd+n or go file > new file
- select objective-c class , hit next
- type uiviewcontroller second box , type name new class in first box (which myclassviewcontroller)
- go storyboard, select view controller dragged out, @ inspector , go custom class tab , set custom class newly created view controller (e.g. myclassviewcontroller)
Comments
Post a Comment