I am invoking PickerView from Employee View.
Following is code in my didSelect method of tableView in Employee class.
pickView = [[PickerView alloc] initWithNibName:@"PickerView" bundle:nil];
[pickView.pickerView setHidden:YES];
[pickView.datePicker setHidden:YES];
switch (indexPath.row)
{
case 0:
pickView.pickerArray = [[NSMutableArray alloc] initWithObjects:@"ML",@"M",@"M SL",@"ME",@"ME SL",@"S",@"SB",@"SH",@"ST",@"S SL",@"SH SL",@"ST SL",@"ND",@"CAE",@"EDW",@"NSW", nil];
pickView.title = @"Select Taxcode";
[pickView.pickerView setHidden:NO];
break;
case 1:
[pickView.datePicker setHidden:NO];
pickView.title = @"Pay Period";
break;
default:
break;
}
[self.navigationController pushViewController:pickView animated:YES];
I am not able to see the controls in PickerView. I have kept all controls Hidden from IB. Now when I click 1st cell in Employee’s table View then only 1 control should be visible.
What could be the problem?
Try this code in Switch case. Le me know if you still have some problems with this.