title: customize uipickerview inside uitableviewcell
body: <p>I have a fully functional UIPickerView inside a UITableViewCell and would like to accomplish two things.</p>
  
  <p>The UIPickerView displays 4 components, but the first will be seldom referred to.  As a result, I would like to either A (preferred) have it display a blank for 0 and scroll to 1, or B modify the color so the 0 is not so dominant.</p>
  
  <p>Secondly, I would like to hide the UIPickerView until selected.</p>
  
  <p>I found both options, but all reside in a UIViewController and do not work within a UITableViewCell.</p>
  
  <pre><code>import UIKit
  
  class DiveDurationTableViewCell: UITableViewCell, UIPickerViewDelegate, UIPickerViewDataSource
  
  {
      @IBOutlet var textfieldBizCat: UITextField!
      @IBOutlet var pickerBizCat: UIPickerView! = UIPickerView()
  
  
      // ---------------------------------------------------------------------------------------------
      // MARK: - Internal Constant
  
      let numberOfComponents: Int             = 4
      let FirstDigitComponentRows: Int        = 2
      let SecondDigitComponentRows: Int       = 10
      let ThirdDigitComponentRows: Int        = 10
      let DisplayMinuteComponentRows: Int     = 1
  
      let Minutes: String                     = "Min"
      let MinNumber                           = 0
      let MaxNumber                           = 9
  
  
      private var diveTime: Array&lt;Int&gt;        = [Int]()
  
      var FirstDigit: Int                     = 0
      var SecondDigit: Int                    = 0
      var ThirdDigit: Int                     = 0
      var DisplayMinutes: String              = "Min"
  
  
      // ---------------------------------------------------------------------------------------------
      // MARK: - IBOutlets
  
      @IBOutlet var diveTimePicker: UIPickerView!
  
  
      // ---------------------------------------------------------------------------------------------
      // MARK: - UITableVieCell Methods
  
  
      //
      //  Called when we are initialized from a storyboard or nib file.
      //
      override func awakeFromNib()
      {
          super.awakeFromNib()
  
  
          //
          //  We create an array of integers from 0 to 9.
          //
  
          for i in self.MinNumber ..&lt; self.MaxNumber+1
          {
              self.diveTime.append(i)
          }
  
          self.diveTimePicker.selectRow(0, inComponent: 0, animated: true)
          self.diveTimePicker.selectRow(0, inComponent: 1, animated: true)
          self.diveTimePicker.selectRow(0, inComponent: 2, animated: true)
  
      }
  
      //
      //  The item has been selected in the table.
      //
  
      override func setSelected(selected: Bool, animated: Bool)
      {
          super.setSelected(selected, animated: animated)
      }
  
  
  
      // ---------------------------------------------------------------------------------------------
      // MARK: - UIPickerViewDataSource Methods
  
  
      //
      //  Number of components in the picker.
      //
  
      func numberOfComponentsInPickerView(pickerView: UIPickerView) -&gt; Int
      {
          return self.numberOfComponents
      }
  
      //
      //  Number of rows in each component.
      //
      func pickerView(pickerView: UIPickerView, numberOfRowsInComponent component: Int) -&gt; Int
      {
          if component == 0
          {
              return self.FirstDigitComponentRows
          } else if component == 1   {
              return self.SecondDigitComponentRows
          } else if component == 2   {
              return self.ThirdDigitComponentRows
          } else  {
              return self.DisplayMinuteComponentRows
          }
      }
  
      func pickerView(pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -&gt; String?
      {
  
          if component == 0
          {
              return String(self.diveTime[row])
          }
          if component == 1
          {
              return String(self.diveTime[row])
          }
          if component == 2
          {
              return String(self.diveTime[row])
          }
  
          else
          {
           return self.DisplayMinutes
              }
          }
  
  
      //
      //  The user has selected in item in the picker view.
      //
      func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int)
      {
      }
  }
  </code></pre>
  
  <p>UPDATE:
  I am not asking how to create a picker view, as the above code works great.  I am only asking how to customize it to make it more attractive.</p>