2012-04-04 10 views

答えて

1
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ 
UITextField *txt = [[UITextField alloc] init]; 
txt.text = @"header"; 
txt.enabled =TableView.editing; 
return txt; 

}

-(IBAction)buttonTap:(id)sender{ 
if (TableView.editing) { 
    TableView.editing = NO; 
}else TableView.editing = YES; 
[TableView reloadData]; 

}

+0

THXて、Priyanka、私はself.tableView.tableHeaderViewに、ないセクションヘッダに私のTextFieldを置きます。私は自分のテキストフィールドのためだけに、1つの行で別々のセクションを作成するという面倒を踏み出したくなかった。私がそうすることができるかどうか分かりませんか? – Arwed

+0

私はそれを1行のセクションを追加することで "解決"しました。 tableHeaderViewを使用することが可能であると考えました。 – Arwed

関連する問題