mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-20 05:14:44 +00:00
44 lines
No EOL
797 B
Objective-C
44 lines
No EOL
797 B
Objective-C
//
|
|
// TransparentToolbar.m
|
|
// NewsBlur
|
|
//
|
|
// Created by Samuel Clay on 8/13/11.
|
|
// Copyright 2011 NewsBlur. All rights reserved.
|
|
//
|
|
|
|
#import "TransparentToolbar.h"
|
|
|
|
@implementation TransparentToolbar
|
|
|
|
// 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 |