title: Xcode iPhone Time picker
body: <p>I'm trying to set up an NSArray class for a time picker, I was wondering if I could use a <code>UIDatePicker</code> and just import the NSArray? </p>
  
  <p>This is what I have for code:</p>
  
  <pre><code>- (IBAction)showActionTime:(id)sender {
      NSString *title2 = UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation) ? @"\n\n\n\n\n\n\n\n\n" : @"\n\n\n\n\n\n\n\n\n\n\n\n" ;
      UIActionSheet *actSheet = [[UIActionSheet alloc]
                                 initWithTitle:[NSString stringWithFormat:@"%@", title2, NSLocalizedString(@"Please Select A Time", @"")]
                                 delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:@"I've Made My Choice", nil];
      [actSheet showInView:self.view];
      UIPickerView *timePicker = [[[UIPickerView alloc] init] autorelease];
      [timePicker setTag: time1];
      //timePicker.
      [actSheet addSubview:time1];
      [timePicker addTarget:self
                     action:@selector(updateTimeLabel:)
           forControlEvents:UIControlEventValueChanged];
      [actSheet release];
  }
  
  
  - (void)updateTimeLabel:(UIActionSheet *) actSheet{
      NSLog(@"Button Pressed");
      NSArray *times = [[NSArray alloc] initWithObjects:@"8:00-11:00",@"2:00-5:00",nil];
      UIPickerView *timePicker2 = (UIPickerView *) [actSheet viewWithTag:time1];
      [times release];
  
  
      //[formatter release];; 
      //UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Date" message:selectedDate delegate:nil cancelButtonTitle:@"Dismiss" otherButtonTitles:nil];
      //label1.text = msg;
      //[dateFormatter release];
  
      //[alert show];
      //[alert release];
      //[msg release];
  }   
  </code></pre>
  
  <p>But it doesn't even try to load the ActionSheet to begin with.It just crashes immediately. What could possibly be the problem?</p>
  
  <p>*UPDATE:</p>
  
  <p>Here is one of my warnings: </p>
  
  <p>@implementation AppointmentController and the warning is "Incomplete Implementation"</p>
  
  <p>and on this line:</p>
  
  <pre><code>[timePicker addTarget:self action:@selector(updateTimeLabel)
  </code></pre>
  
  <p>I'm getting "Program received signal: "SIGABRT"</p>