title: Decrease the margin of content of UIPickerView ios
body: <p><strong>Modification due to the first 2 answers : what I want to modify is not the height of the UIPickerview. What I want is to make the content of UIPicker begins from the upper side of UIPicker. Here is an example:</strong>
  <img src="https://i.stack.imgur.com/DlNwG.png" alt="enter image description here"></p>
  
  <p>I want to delete the margin shown in the image here attached.<img src="https://i.stack.imgur.com/LMHbB.png" alt="I want to Kg(s) to be located at the upper border of UIPickerView, no the middle part"></p>
  
  <p>Any idea?</p>
  
  <p>With a toolbar, the UIPickerView is embedded in a UIView. So the view hierarchy is : View(parent)->Toolbar(child), UIPickerView(child)</p>
  
  <p>The View is declared as customPicker in my viewController. 
  Here is the code:
  In <strong>viewController.h</strong> :</p>
  
  <pre><code>@interface myViewController:UIViewController&lt;UIPickerViewDataSource, UIPickerViewDelegate&gt;
  
  @property (weak, nonatomic) IBoutlet UIView *customPicker;
  
  @end
  </code></pre>
  
  <p>In <strong>viewController.m</strong> :</p>
  
  <pre><code>- (void) viewDidLoad{
  self.customPicker.frame = CGRectMake(0, CGRectGetMaxY(self.view.frame), CGRectGetWidth(self.customPicker.frame), CGRectGetHeight(self.customPicker.frame));
      [self.view addSubview:self.customPicker];
  }
  </code></pre>
  
  <p>Then I use a setPickerHidden method to animate the View in order to show or hide it. </p>
  
  <p>Thanks in advance for your help!</p>