Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Commit

Permalink
[UI][Core] - fix comment for TTDeprecation and Fix for TTTableViewHea…
Browse files Browse the repository at this point in the history
…der disappearing on reuse. Closes #408
  • Loading branch information
jwang committed Feb 16, 2011
1 parent 0229e7e commit aeaa06a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Three20Core/Headers/NSStringAdditions.h
Expand Up @@ -30,7 +30,7 @@

/**
* Determines if the string is empty or contains only whitespace.
* @deprecated Use TTIsStringWithAnyText: instead.
* @deprecated Use TTIsStringWithAnyText() instead.
*/
- (BOOL)isEmptyOrWhitespace __TTDEPRECATED_METHOD;

Expand Down
7 changes: 6 additions & 1 deletion src/Three20UI/Sources/TTTableViewDelegate.m
Expand Up @@ -92,7 +92,12 @@ - (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:
// We reset the the opacity to 1, UITableView could set this property to 0 after remove it.

This comment has been minimized.

Copy link
@jverkoey

jverkoey Feb 17, 2011

Contributor

I'm not sold that this is the safest solution to this problem. Can we add some form of a prepareForReuse method to the TTTableHeaderView? This will allow any subclasses of the header view to handle their own reuse properly.

if (header) {

This comment has been minimized.

Copy link
@jverkoey

jverkoey Feb 17, 2011

Contributor

Let's use the new style of nil != header if we are intending to go with that.

header.alpha = 1;
}
else if (nil == header) {

This comment has been minimized.

Copy link
@jverkoey

jverkoey Feb 17, 2011

Contributor

This can simply be: } else {

if (nil == _headers) {
_headers = [[NSMutableDictionary alloc] init];
}
Expand Down

0 comments on commit aeaa06a

Please sign in to comment.