티스토리 뷰

  투명하게 만들면 Flexible 아이템을 사용해서 정렬 편하게 할수 있어서...

http://stackoverflow.com/questions/2468831/couldnt-uitoolbar-be-transparent

http://blog.blackwhale.at/2010/07/transparent-uitoolbar/

@interface TransparentToolbar : UIToolbar
@end
 
@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



공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함