나름 프로그래밍?/ Objective-C
UIToolBar 투명하게 만들기
-Dong-
2011. 6. 29. 22:24
투명하게 만들면 Flexible 아이템을 사용해서 정렬 편하게 할수 있어서...
http://stackoverflow.com/questions/2468831/couldnt-uitoolbar-be-transparent
http://blog.blackwhale.at/2010/07/transparent-uitoolbar/
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