title: Adding a UI Picker to a UITextView
body: <p>I'm trying to add a <code>UIPicker</code> to a <code>UITextView</code> when it is selected to choose an age. I found a previous <a href="https://stackoverflow.com/questions/9064367/adding-uipicker-to-textfield">thread</a> and trued to implement the code but I can't get it to work properly. When I build the program the picker shows up, but there are no values in it. Any ideas as to what I'm doing wrong? Also, I'm getting two yellow errors here saying "Assigning to 'id' from incompatible type 'ViewController *const __strong" here:</p>
  
  <pre><code>pickerView.delegate = self;
  pickerView.dataSource = self;
  </code></pre>
  
  <p>Thank you. </p>
  
  <pre><code>@interface ViewController ()
  
  @property (weak, nonatomic) IBOutlet UITextField *ageTextField;
  
  @end
  
  @implementation ViewController
  @synthesize ageTextField;
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
          // Do any additional setup after loading the view, typically from a nib.
  
      UIPickerView *pickerView =[[UIPickerView alloc]init];
      pickerView.delegate = self;
      pickerView.dataSource = self;
      pickerView.showsSelectionIndicator=YES;
      ageTextField.inputView=pickerView;
  }
  
  - (void)pickerView:(UIPickerView *)PickerView
        didSelectRow:(NSInteger)row
         inComponent:(NSInteger)component {
  
      NSMutableArray *ageArray = [[NSMutableArray alloc]init];
  
      [ageArray addObject:@"1"];
      [ageArray addObject:@"2"];
      [ageArray addObject:@"3"];
      [ageArray addObject:@"4"];
  
      ageTextField.text=[ageArray objectAtIndex:row];
  }
  </code></pre>