Permalink
Browse files

[Core] Fix for TTTableViewHeader disappearing on reuse.

Closes #408
  • Loading branch information...
jverkoey committed Feb 26, 2011
1 parent 843becd commit d65fa67c6a108f43a6b2eac5c8af8cbfad94c5c4
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/Three20UI/Sources/TTTableViewDelegate.m
@@ -92,7 +92,15 @@ - (UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)
NSString* title = [tableView.dataSource tableView:tableView titleForHeaderInSection:section];
if (title.length > 0) {
TTTableHeaderView* header = [_headers objectForKey:title];
- if (nil == header) {
+
+ // If retrieved from cache, prepare for reuse here.
+ // We reset the the opacity to 1 because UITableView might set this property to 0 after
+ // removing it.
+ // TODO (jverkoey Feb 26, 2011): When does this happen, exactly?
+ if (nil != header) {
+ header.alpha = 1;
+
+ } else {
if (nil == _headers) {
_headers = [[NSMutableDictionary alloc] init];
}

0 comments on commit d65fa67

Please sign in to comment.