Edit: forgot to assign delegate, works now.

```
    self.timePickerView.delegate = self;
        self.timePickerView.dataSource = self;

```

Ok so I had this working with a UIDatePicker and it worked fine, however I wanted to include seconds and so had to try and use a custom picker. Right Now My action sheet and buttons popup but the space where my custom picker should be is just black, I know I am missing something or just flat out taking the wrong approach to this. The goal is for the user to user the custom picker to select an hour / minute/ second to record for their time spent on a run etc..... 

My main question here is simply how do I make my custom picker appear when the textfield is clicked, i know I am missing something in the implementation for the picker itself, perhaps this custom picker doesn't follow the default methods for component/rows? I know the date one I was using before didn't need those?. Thanks in advance for any insight.

Header

```
@property (strong, nonatomic) UIPickerView *timePickerView;
@property (strong, nonatomic) UIActionSheet *datePickerViewPopup;
@property (retain, nonatomic) NSMutableArray *hoursArray;
@property (retain, nonatomic) NSMutableArray *minutesArray;
@property (retain, nonatomic) NSMutableArray *secondsArray;

```

view did load

```
       NSString *stringValue = [[NSString alloc]init];
self.hoursArray = [[NSMutableArray alloc]init];
self.minutesArray = [[NSMutableArray alloc]init];
self.secondsArray = [[NSMutableArray alloc]init];
for (int i = 0; i < 61; i++) {
    stringValue = [NSString stringWithFormat:@"%d", i];
    if (i < 13) {
        [self.hoursArray addObject:stringValue];
    }
    [self.minutesArray addObject:stringValue];
    [self.secondsArray addObject:stringValue];
}

```

The cell that calls my popup

```
    - (void)textFieldDidBeginEditing:(UITextField *)textField
{
   switch (textField.tag) {
    case 1003:
        [textField resignFirstResponder];

        NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init];
        [dateFormatter setTimeZone:[NSTimeZone systemTimeZone]];
        [dateFormatter setDateFormat:@"HH:mm:ss"];

        self.datePickerViewPopup = [[UIActionSheet alloc]init];
        const CGFloat toolBarHeight = 44.0f;
        self.timePickerView = [[UIPickerView alloc]initWithFrame:CGRectMake(0, toolBarHeight, 0, 0)];
        self.timePickerView.hidden = NO;

        UIToolbar *pickerToolbar = [[UIToolbar alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, toolBarHeight)];
        pickerToolbar.barStyle = UIBarStyleBlackOpaque;
        [pickerToolbar sizeToFit];
        NSMutableArray *toolBarItems = [[NSMutableArray alloc]init];

        UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(cancelButtonPressed:)];
        [toolBarItems addObject:cancelButton];

        UIBarButtonItem *flexSpace = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:nil];
        [toolBarItems addObject:flexSpace];

        UIBarButtonItem *doneButton = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(doneButtonPressed:)];
        [toolBarItems addObject:doneButton];

        NSDateComponents *comps = [[NSDateComponents alloc]init];
        comps.hour = [self.timePickerView selectedRowInComponent:0];
        comps.minute = [self.timePickerView selectedRowInComponent:1];
        comps.second = [self.timePickerView selectedRowInComponent:2];
        NSCalendar *calerdar = [NSCalendar currentCalendar];
        NSDate *cardioTime = [calerdar dateFromComponents:comps];

        textField.text = [dateFormatter stringFromDate:cardioTime];

        [pickerToolbar setItems:toolBarItems animated:NO];

        [self.datePickerViewPopup addSubview:pickerToolbar];
        [self.datePickerViewPopup addSubview:self.timePickerView];
        [self.datePickerViewPopup showInView:self.view.superview];
        [self.datePickerViewPopup setBounds:CGRectMake(0, 0, self.view.frame.size.width, 464)];

        break;
}

```

}

picker methods

```
   #pragma mark - Picker Methods

- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView
{
return 3;
}

- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component
{
if (component == 0) {
    return [self.hoursArray count];
} else if (component == 1) {
    return [self.minutesArray count];
} else {
    return [self.secondsArray count];
}
}

- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component
{
switch (component) {
    case 0:
        return [self.hoursArray objectAtIndex:row];
        break;
    case 1:
        return [self.minutesArray objectAtIndex:row];
        break;
    case 2:
        return [self.secondsArray objectAtIndex:row];
    default:
        break;
}
return nil;
}

```