UI Picker View is not displayed

advertisements

I have added a UI Picker in my code programmatically:

            UIPickerView *categoryList = [[UIPickerView alloc] initWithFrame:CGRectMake(10, 200, 300, 200)];
            categoryList.showsSelectionIndicator = YES;
            categoryList.hidden = NO;
            categoryList.delegate = self;  

            [cell.contentView addSubview:categoryList];

But, its not displaying when i run it on simulator.


set to textField inputView

Don't add subview.