Transparent UIToolBar
来源:互联网 发布:短文翻译的软件 编辑:程序博客网 时间:2024/04/30 06:40
Sometimes it is really necessary to have a transparent A quick and pragmatic solution is to subclass UIToolBar and do some modifications. The following code is everything you need to get a really transparent tool bar: To apply a color to the including That’s all for today,UIToolBar
within you iPhone app. Especially if you want to add a UIToolBar
to your UINavigationBar
you get some problems with overlaying backgrounds (UIBarStyleBlackOpaque
did not work for a toolbar on a black opaque navigation bar).@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
UIBarButtonItem
s you can set the bar style as usual.
Andreas
- Transparent UIToolBar
- Transparent UIToolBar
- Making UIToolbar and UINavigationBar’s background totally transparent
- UIToolBar
- UIToolbar
- UIToolbar
- UIToolbar
- UIToolbar
- UIToolBar
- UIToolbar
- UIToolBar
- UIToolbar
- UIToolBar,UIBarButtonItem
- UIToolBar使用
- swift--- uitoolbar
- UIBarButtonItem,UIToolBar
- IOS UIToolbar
- IOS UIToolBar
- 6.16head first html学习手记
- 6/24/2011 12:55:54 PM
- DCOM列集散集的内部具体实现的研究初探
- 6.23head first html学习手记
- COM原理及应用----命名和绑定技术
- Transparent UIToolBar
- Mysqld_multi在一台服务器上运行多个mysql实例及操作
- IT人励志经典,计算机学习方法宝典
- Android开发Sqlite数据库初体验
- oracle 导入 导出表
- Android中的Dialog用法讲解大全
- spring 回调jdbc 进行大批量数据 查询,修改,添加
- div内图文垂直居中对齐
- C# 统计员工上下班情况