/** * Author: Timothy Prepscius * License: BSD + keep my name in the code! */ #import "UITransparentToolbar.h" // http://stackoverflow.com/questions/2468831/couldnt-uitoolbar-be-transparent @implementation UITransparentToolbar // Override draw rect to avoid // background coloring - (void)drawRect:(CGRect)rect { // do nothing in here } // Set properties to make background // translucent. - (void) applyTranslucentBackground { self.backgroundColor = [UIColor clearColor]; self.opaque = NO; self.translucent = YES; } // Override init. - (id) init { self = [super init]; [self applyTranslucentBackground]; return self; } // Override initWithFrame. - (id) initWithFrame:(CGRect) frame { self = [super initWithFrame:frame]; [self applyTranslucentBackground]; return self; } @end