uivisualeffectview

How to implement Visual Effect Views in Interface Builder?

若如初见. 提交于 2019-12-02 20:05:54
How do you use Visual Effect Views with Blur and Vibrancy in Interface Builder? I've dragged this item out into the View, then dragged a UILabel onto the last view in the hierarchy - the vibrant effect's contentView I assume. This results in a blurred view overtop but there is no label visible. Anywhere else I place the label in the hierarchy it does become visible but it's just solid black text. Finally figured it out. In a UIViewController change the view's background to blue Drag a Visual Effect Views with Blur and Vibrancy object into the view, so it's added as a subview In the first

Animate the fractionComplete of UIViewPropertyAnimator for blurring the background

依然范特西╮ 提交于 2019-12-01 18:26:04
So I'm using the new UIViewPropertyAnimator and UIVisualEffectView to achieve the same thing as the Spotlight search when you scrolling down on the home screen and it blurs the background. I'm using the fractionComplete property to set the procent of how much to blur when panning a UIView. animator = UIViewPropertyAnimator(duration: 1, curve: .linear) { self.blurEffectView.effect = nil } And the amount of blurriness is changed with a value between 0.0 - 1.0. animator?.fractionComplete = blurValue But when I cancel the pan gesture I want the blur to animate back from where it is to no blur (e.g

Animate the fractionComplete of UIViewPropertyAnimator for blurring the background

余生长醉 提交于 2019-12-01 04:03:50
问题 So I'm using the new UIViewPropertyAnimator and UIVisualEffectView to achieve the same thing as the Spotlight search when you scrolling down on the home screen and it blurs the background. I'm using the fractionComplete property to set the procent of how much to blur when panning a UIView. animator = UIViewPropertyAnimator(duration: 1, curve: .linear) { self.blurEffectView.effect = nil } And the amount of blurriness is changed with a value between 0.0 - 1.0. animator?.fractionComplete =

Detect if device properly displays UIVisualEffectView?

ぃ、小莉子 提交于 2019-11-30 17:40:06
My app utilizes UIVisualEffectView to blur the background just like Control Center. But I discovered the iPad 2 (and Retina iPad) which can run iOS 8 isn't powerful enough to display that effect so it reverts to a gray color. I would like to be able to detect if the device the app is running on is powerful enough to display the blur effect, and if not I won't apply it, instead I'll change the background color to something that looks much better than that gray color. But I don't want to just check if the device is an iPad 2 or iPad 3rd gen (does it affect 4th as well?). Is there a better way to

Vibrancy Effect on UIButton in Interface Builder

一笑奈何 提交于 2019-11-30 15:31:10
问题 I have some visual effect views with blur and vibrancy in one of my view controllers. I have labels working correctly with vibrancy, but every time i try to add a UIButton to the view, the text appears to be transparent, and the background of the button appears to have vibrancy. I am looking for the effect the "Edit" button has in notification center. I have attached some photos for reference. What I want: What is happening: If there is no way to accomplish this in IB, can it be done with

Vibrancy Effect on UIButton in Interface Builder

六月ゝ 毕业季﹏ 提交于 2019-11-30 14:54:13
I have some visual effect views with blur and vibrancy in one of my view controllers. I have labels working correctly with vibrancy, but every time i try to add a UIButton to the view, the text appears to be transparent, and the background of the button appears to have vibrancy. I am looking for the effect the "Edit" button has in notification center. I have attached some photos for reference. What I want: What is happening: If there is no way to accomplish this in IB, can it be done with code? I am using Swift. EDIT Now here is what happening, it appears with vibrancy, but the text is not

How to make a Navigation Bar and Status Bar blurred (UIBlurEffect)? iOS, Swift 3

这一生的挚爱 提交于 2019-11-30 14:24:03
问题 How to make the Navigation Bar and Status Bar blurred (UIBlurEffect)? When I'm by clicking on the image to scroll down (Scroll View) to other pictures, this picture (in this case with a white machine) is simply lost under the Navigation Bar, and it is necessary that this figure would be visible under the Navigation Bar with effect UIBlurEffect. NO UIBlurEffect I have tried so, but did not work: func addBlurEffect() { // Add blur view let bounds = self.navigationController?.navigationBar

How to fade a UIVisualEffectView and/or UIBlurEffect in and out?

白昼怎懂夜的黑 提交于 2019-11-30 06:13:01
问题 I want to fade a UIVisualEffectsView with a UIBlurEffect in and out: var blurEffectView = UIVisualEffectView() blurEffectView = UIVisualEffectView(effect: UIBlurEffect(style: .dark)) I use a normal animation within a function called by a UIButton to fade it in, same for fading out but .alpha = 0 & hidden = true : blurEffectView.hidden = false UIView.animate(withDuration: 1, delay: 0, options: .curveEaseOut) { self.blurEffectView.alpha = 1 } Now, fading in both directions does work but it

Less Blur with `Visual Effect View with Blur`?

冷暖自知 提交于 2019-11-30 01:34:45
Title pretty much asks it all... I'm playing with the iOS8 Visual Effect View with Blur . It's over a UIImageView that shows a user choosable background photo. The view placed in the contentView itself is my own custom view, shows a sort of graph/calendar. Most of said calendar graph is transparent. The blur it applies to the photo behind it is really heavy. I'd like to let more of the detail leak through. But Apple only seems to give three canned values: typedef enum { UIBlurEffectStyleExtraLight, UIBlurEffectStyleLight, UIBlurEffectStyleDark } UIBlurEffectStyle; I've monkied around with

UIVisualEffectView in iOS 10

戏子无情 提交于 2019-11-29 23:51:58
I am presenting a UIViewController that contains a UIVisualEffectView as follows: -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { [self performSegueWithIdentifier:@"segueBlur" sender:nil]; } -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if([segue.identifier isEqualToString:@"segueBlur"]) { ((UIViewController *)segue.destinationViewController).providesPresentationContextTransitionStyle = YES; ((UIViewController *)segue.destinationViewController).definesPresentationContext = YES; ((UIViewController *)segue