- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view {
UILabel *retval = (id)view;
if (!retval) {
retval= [[UILabel alloc] initWithFrame:CGRectMake(0.0f, 0.0f, [pickerView rowSizeForComponent:component].width, [pickerView rowSizeForComponent:component].height)];
}
NSDictionary *destination = [appDelegate.destinations objectAtIndex:row];
retval.text = [destination objectForKey:@"name"];
retval.font = [UIFont systemFontOfSize:18];
return retval;
}
См. Способ. После выполнения Product> Analyze в XCode я получу следующее предупреждение по номеру строки
return retval;
Potential leak of an object allocated on line 213 and stored into 'retval'
Дайте мне знать, что это такое, как мне выпустить,
Пожалуйста, отредактируйте этот код и объясните мне, что вы в нем изменили, Спасибо