Im upgrading my UI to iOS 7, and have been using a custom tab bar which has a CAShapeLayer used as a mask. Ive been trying to add dynamic blur by having a UIToolBar underneath, but if i try setting the layer.mask property on the toolbar translucency is gone, and i just have it semi transparent (but masking works of course). Is there a way to get this working? Ive also seen this behavior when adding a subview to these classes.
相关问题
- @objc protocol crashes the swift compiler
- Getting UITableViewCell from its superview iOS 7 i
- Access paging in iOS - previous and next : retriev
- Install Ad Hoc distributed app on iOS via USB, usi
- UITableViewCell top shadow is covered by UITableVi
相关文章
- didBeginContact:(SKPhysicsContact *)contact not in
- ios7 new pan gesture to go back in navigation stac
- Navigation bar disappears when typing in UISearchC
- IOS UICollectionview Dynamically change Cell's
- How to set different navigationbar color for diffe
- PhoneGap iOS 7 and localStorage
- UINavigationBar with buttons as title.
- Add UITextField to title view of navigation item
If "translucency is gone" means it becomes totally transparent and if you tested just on simulator, it is a known bug of simulator. If you run it on devices, it should work as expected.
You may need AMDraggableBlurView.
I came across this same issue. My solution isn't ideal, but it will work in all cases that don't need a dynamic background. After reading the following comment in, How can I produce an effect similar to the iOS 7 blur view?. I realized that trying to find a way to alter the toolbar will get me nowhere. So lets use an image!
In Apples Developer Downloads site you can search for
ImageEffects
and find the code we're going to be using. It comes with the iOS 8 blur effects your familiar with,Light
,ExtraLight
andDark
.Here's the .h file with our own class extension at the bottom to make things a bit easier.
And the .m file.
Now you can simply import the header and call something like this.
Apply your mask to the layer and you're good to go!