Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Customize UISearchDisplayController

Tags:

alt text http://img210.imageshack.us/img210/5992/searchdisplaycontroller.png

Are the following objects customizable?

1. UISearchBar Scope Buttons (UISegmentedController)

2. UIResultsTableView

3. Keyboard (at least so it's colored black)

like image 608
Mark Avatar asked Oct 13 '09 11:10

Mark


1 Answers

alt text http://img527.imageshack.us/img527/9775/searchdisplaycontrollerz.png

I was able to change the segmented control by a sort-of hack code:

- (void)searchDisplayControllerWillBeginSearch:(UISearchDisplayController *)controller {
for (UIView *subview in self.view.subviews) {
    for (UIView *subview2 in subview.subviews) {
        if ([subview2 isKindOfClass:[UISegmentedControl class]]) {
            UISegmentedControl *segmentedControl = (UISegmentedControl *)subview2;
            segmentedControl.tintColor = [UIColor blackColor];
            segmentedControl.segmentedControlStyle = UISegmentedControlStyleBar;
        }           
    }
}}

However the buttons are HUGE, how could I fix it so they are just as pretty as the original?

like image 108
Mark Avatar answered Oct 04 '22 19:10

Mark