iOS UIPickerView为什么在[pickerView removeFromSuperview]之后没有删除Pickerview区域;

时间:2014-10-11 16:00:09

标签: ios uipickerview

为什么在调用[pickerView removeFromSuperview]后没有删除UIPickerView区域? 选择器视图在此代码中创建:

 UIPickerView *pickerAirport = [[UIPickerView alloc] init];
pickerAirport.tag=0;
pickerAirport.dataSource = self;
pickerAirport.delegate = self;
_Airport.inputView = pickerAirport;

删除代码为:

- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component {
if (pickerView.tag == 0)
   {
    NSDictionary * ptr_airport=[self.AllairportsDictionary objectAtIndex:row];
    _Airport.text  =  ptr_airport[@"name"];
   }
else
     _State.text= ptr_aircraftState.StateAircraft[row];;
[pickerView removeFromSuperview];

self.view.center = originalCenter;   

}

谢谢

0 个答案:

没有答案