I want to make my UIToolBar have a transparent background (similar to iBooks) but I'm having no luck with setting the translucent
property.
Here's my code:
UIToolbar *toolBar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 320, 44)];
NSMutableArray *toolBarItems = [[NSMutableArray alloc] init];
[toolBarItems addObject:[[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStyleBordered target:nil action:nil]];
[toolBarItems addObject:[[UIBarButtonItem alloc] initWithTitle:@"Source" style:UIBarButtonItemStyleBordered target:nil action:nil]];
[toolBarItems addObject:[[UIBarButtonItem alloc] initWithTitle:@"Aa" style:UIBarButtonItemStyleBordered target:nil action:nil]];
[toolBarItems addObject:[[UIBarButtonItem alloc] initWithTitle:@"Rabbit" style:UIBarButtonItemStyleBordered target:nil action:nil]];
toolBar.items = toolBarItems;
toolBar.translucent = YES;
[self.view addSubview:toolBar];
It still comes out like this: