I created my app using StoryBoard. Then, I added objective-c class to have .h and .m files for one of the views.
The problem is that I do not get ViewDidLoad because they are UIView types. xcode keep giving me errors when it sees any [super xxx] when I try to write viewDidLoad by my self.
I tried (id)initWithCoder:(NSCoder *)aDecoder but stil does not do what I want. because I am loading a UIPickerView and I want to move one of the components to specific row as follow:
[datepick selectRow:1433 inComponent:2 animated:YES]
which does not work if this code is in-(id)initWithCoder:(NSCoder *)aDecoder
Any idea?
Anybody knows how can I add a UIViewController and have the xib shown in my storyboard? or how to fix my issue?
I am really struggling with them.
Since you built your app using Storyboard, I think the problem you’re having is that you ‘drag and dropped’ the object VIEW from the object column on the right, instead of VIEW CONTROLLER.
In a View Controller, you do have ViewDidLoad.
If this is not an answer to your problem, tell me so that I can help you furthermore!