Code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.viewController = [[SearchViewController alloc] initWithNibName:@"SearchViewController" bundle:nil];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
UIImage *barImage = [UIImage imageNamed:@"BarTexture"];
[[UISearchBar appearance] setBackgroundImage:barImage];
}
My rootviewcontroller has a UISearchBar object. Why doesn't my UISearchBar object load the 'BarTexture' image?