У меня есть следующий код, который добавляет метку в нижний колонтитул UITableView, чтобы я мог отформатировать текст (белый и т. Д.)
Работает нормально, но выдает предупреждение об утечке для headerLabel при анализе в строке с возвратом
// create the parent view that will hold header Label
UIView* customView = [[UIView alloc] initWithFrame:CGRectMake(0.0, 15.0, 300.0, 44.0)];
// create the button object
UILabel * headerLabel = [[UILabel alloc] initWithFrame:CGRectZero];
headerLabel.backgroundColor = [UIColor clearColor];
headerLabel.opaque = NO;
headerLabel.textColor = [UIColor whiteColor];
headerLabel.highlightedTextColor = [UIColor whiteColor];
headerLabel.font = [UIFont systemFontOfSize:14];
headerLabel.textAlignment=UITextAlignmentCenter;
headerLabel.frame = CGRectMake(10.0, 0.0, 300.0, 75.0);
headerLabel.numberOfLines=4;
if (section==0) {
headerLabel.text = @"If turned off, the last used settings will be used on the next session\n\n"; // i.e. array element
}
[customView addSubview:headerLabel];
//[headerLabel release];
return customView;
// [customView release];
Я пытался выложить релиз тут и там, но он всегда один и тот же.
Буду признателен за отзывы, ребята.