2013-09-21 3 views
0

Я использую следующий код [[UITableViewHeaderFooterView appearance] setTintColor:[UIColor whiteColor]]; в конце didFinishLaunchingWithOptions установить оттенок цвета обычая UITableViewHeaderFooterView моей главная проблема, когда я прокрутку вида таблицы и, например, раздел 0 сбивается экран, затем возвращается по умолчанию серый цвет любые идеи, как исправить это мой повторно используемый код очень простойUITableViewHeaderFooterView появление

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section 
{ 
    ListSectionHeaderView *sectionHeaderView = [self.tableView dequeueReusableHeaderFooterViewWithIdentifier:@"ListSectionHeaderView"]; 
} 

ответ

1

вы должны создать колонтитулы первого запуска затем повторно его

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section 
{ 

    ListSectionHeaderView *sectionHeaderView = [self.tableView dequeueReusableHeaderFooterViewWithIdentifier:@"ListSectionHeaderView"]; 
    if (!sectionHeaderView) 
    { 
     //// initialize the header here if the reuse return nil 
     sectionHeaderView = .... 
    } 
    ///// also you have to return it 
    return sectionHeaderView; 
} 
+0

я делаю то же самое – sger

Смежные вопросы