• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

JagCesar/iOS-blur: Blur a UIView

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

JagCesar/iOS-blur

开源软件地址:

https://github.com/JagCesar/iOS-blur

开源编程语言:

Objective-C 94.9%

开源软件介绍:

iOS-blur

In iOS 7 a new view is shown in several places that is transparent and has a nice blur effect. However Apple hasn't given us a public API to use this amazing view.

Apple gave us some sample code at WWDC that blurs an UIImage object. It looks great, but isn't as cool as a view that blurs the views behind it in realtime.

I needed this in one of my projects, so after some thinking I came up with a brilliant and simple idea. It only works for iOS 7.

Screenshot

Screenshot

How is it done?

I simply took a UIToolbar, placed it as a subview and voila!

Awesome! So, how do I use it?

You just use it as any normal UIView object. I wanted it to be as simple as possible, and I think I've managed to do just that.

To use it you copy JCRBlurView.h and JCRBlurView.m to your project. Make sure to import it, initialise it, set a frame and add it to your view. That's it! :)

JCRBlurView *blurView = [JCRBlurView new];
[blurView setFrame:CGRectMake(0.0f,0.0f,100.0f,100.0f)];
[self.view addSubview:blurView];

If you prefer using Auto Layout that works great too!

What about using it as a cocoapod? It would be SO much easier!

Just add: pod 'iOS-blur' to your Podfile and run pod install

License

iOS-blur is released under the WTFPL-license (see the LICENSE file)




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
jVirus/ios-learning-materials: 发布时间:2022-06-21
下一篇:
saiwu-bigkoo/Android-AlertView: 仿iOS的AlertViewController发布时间:2022-06-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap