+ [[self view] addSubview:list_];
+
+ if ([self allowsSearch]) {
+ search_ = [[UISearchBar alloc] init];
+ [search_ sizeToFit];
+ [search_ setDelegate:self];
+ [search_ setPlaceholder:UCLocalize("SEARCH_EX")];
+ if ([search_ respondsToSelector:@selector(setUsesEmbeddedAppearance:)]) // 3.0+
+ [search_ setUsesEmbeddedAppearance:YES];
+
+ UITextField *textField;
+ if ([search_ respondsToSelector:@selector(searchField)])
+ textField = [search_ searchField];
+ else
+ textField = MSHookIvar<UITextField *>(search_, "_searchField");
+ [textField setEnablesReturnKeyAutomatically:NO];
+
+ [list_ setTableHeaderView:search_];
+
+ CGRect topframe = CGRectMake(
+ 0.0f,
+ -[list_ bounds].size.height,
+ [list_ bounds].size.width,
+ [list_ bounds].size.height
+ );
+ UIView *top = [[[UIView alloc] initWithFrame:topframe] autorelease];
+ [top setAutoresizingMask:UIViewAutoresizingFlexibleBoth];
+ [top setBackgroundColor:[UIColor
+ colorWithRed:(226.0f / 255.0f)
+ green:(231.0f / 255.0f)
+ blue:238.0f / 255.0f
+ alpha:1.0f]];
+ [list_ addSubview:top];
+ }