Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[Core] Fix for TTTableViewHeader disappearing on reuse.

Closes #408
  • Loading branch information...
commit d65fa67c6a108f43a6b2eac5c8af8cbfad94c5c4 1 parent 843becd
@jverkoey jverkoey authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/Three20UI/Sources/TTTableViewDelegate.m
View
10 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];
}
Please sign in to comment.
Something went wrong with that request. Please try again.