Created
December 22, 2012 11:26
-
-
Save patelrohan/4358517 to your computer and use it in GitHub Desktop.
Add for loop to make searchbar color same as navgation controller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
searchBar.delegate = self; | |
searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0.0, 0.0, 200.0, 44.0)]; | |
searchBar.placeholder = @"Search Files"; | |
searchBar.userInteractionEnabled=YES; | |
//searchBar.tintColor=[UIColor clearColor]; | |
//Mark : For Loop for Searchbar Color change | |
for (UIView *view in self.searchBar.subviews) | |
{ | |
if ([view isKindOfClass:NSClassFromString(@"UISearchBarBackground")]) | |
{ | |
[view removeFromSuperview]; | |
break; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment