I am using UIPickerView with storyboard. When I link the Datasource and delegate of PickerView with my view, the simulator throw an error (EXC_BAD_ACCESS). This happens when I try to access the PickerView in my ViewDidLoad to move it to a specific row.
When I remove the datasource and the delegate. The error disappears but I do not see the PickerView anymore.
the simulator goes to main.m at this code and stops
in main)int argc, char *argv[])
{
@autoreleasepool{
return UIApplicationMain(argc,argv,nil, NSStringFromClass([AppDelegate class]));
}
}
This was because of an error in one of the methods that sets the title of the columns. I wrote it as
NSIntegerwhile it should beNSString.