iOS系统自带毛玻璃效果
2016-03-03 10:34
525 查看
UIImageView
* imageview = [[UIImageView
alloc]
initWithImage:[UIImage
imageNamed:@"屏幕快照
2015-12-18
下午10.51.33"]];
imageview.userInteractionEnabled
=
YES;
imageview.contentMode
=
UIViewContentModeScaleAspectFit;
imageview.frame
=
CGRectMake(0,
0,
375,
668);
[self.view
addSubview:imageview];
UIBlurEffect * blur = [UIBlurEffect
effectWithStyle:UIBlurEffectStyleDark];
UIVisualEffectView * effectview = [[UIVisualEffectView
alloc]
initWithEffect:blur];
effectview.frame
=
CGRectMake(0,
0, imageview.frame.size.width,
imageview.frame.size.height);
[imageview
addSubview:effectview];
UIButton *button = [UIButton
buttonWithType:UIButtonTypeSystem];
button.frame
=
CGRectMake(10,
50,
60,
60);
[button
setTitle:@"btn"
forState:UIControlStateNormal];
[effectview.contentView
addSubview:button];
* imageview = [[UIImageView
alloc]
initWithImage:[UIImage
imageNamed:@"屏幕快照
2015-12-18
下午10.51.33"]];
imageview.userInteractionEnabled
=
YES;
imageview.contentMode
=
UIViewContentModeScaleAspectFit;
imageview.frame
=
CGRectMake(0,
0,
375,
668);
[self.view
addSubview:imageview];
UIBlurEffect * blur = [UIBlurEffect
effectWithStyle:UIBlurEffectStyleDark];
UIVisualEffectView * effectview = [[UIVisualEffectView
alloc]
initWithEffect:blur];
effectview.frame
=
CGRectMake(0,
0, imageview.frame.size.width,
imageview.frame.size.height);
[imageview
addSubview:effectview];
UIButton *button = [UIButton
buttonWithType:UIButtonTypeSystem];
button.frame
=
CGRectMake(10,
50,
60,
60);
[button
setTitle:@"btn"
forState:UIControlStateNormal];
[effectview.contentView
addSubview:button];
相关文章推荐
- iOS开发中对于一些常用的相对路径(持续更新)
- iOS数组和字典的使用----大坑
- iOS设备中WiFi、蓝牙和飞行模式的开启与关闭
- iOS-动画进阶之路Core Animation
- iOS 字符转换
- iOS滑动返回问题
- iOS Please verify that your device’s clock is properly set, and that your signing certificate is not
- iOS 集成银联支付
- iOS 【两个控制器的view互为父子关系,那么这两个控制器一定也要互为父子关系】
- iOS ARC下内存泄露的几种情况和解决办法
- ios要求检测飞行模式
- ios url 请求头添加参数及自定义cookie(转)
- iOS 中的“健康”应用是如何整合来自不同来源的同一项数据的?
- [iOS]解决 Navigation 滑动返回手势丢失问题
- 类库管理工具cocoaPods
- 技术分享
- iOS 拨打电话
- Git仓库的使用
- Xcode的基本使用
- iOS icon上线图标注意事项