uivisualeffectview

How can blurriness of UIVisualEffectView be modified while dragging in iOS?

痞子三分冷 提交于 2019-12-09 11:03:33
问题 Currently, I'm using a UIVisualEffectView to apply a blur to an image. I have a UIScrollView. As I pull down on the scrollView, in my "scrollViewDidScroll" method, I'm changing the alpha of the UIVisualEffectView. The current behavior of this is that the blur radius changes smoothly as I drag around in the view. The problem is, of course, I'm not supposed to be doing this. Getting warnings about changing the alpha value of a UIVisualEffectView. I've seen people say to do a smooth transition

UIVisualEffectView in iOS 10

♀尐吖头ヾ 提交于 2019-12-08 22:49:25
问题 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; (

Adding a UIVisualEffectView to button

家住魔仙堡 提交于 2019-12-08 12:27:05
问题 i have a transparent delete UIButton added to a story board scene, which has a picture as a background, and i have added some auto layout constraints to it. i want the button background to be a UIVisualEffectView so i was thinking of programatically adding the view to where the button is, then removing the button and adding it back so it's on top of the UIVisualEffectView . Question 1) is this a good idea - or should i find the position in the view hierarchy and place it one level before the

xCode - UIVisualEffectView animating

泪湿孤枕 提交于 2019-12-07 12:26:57
问题 I've an issue while animating a VisualEffetView. Here is the code where I declare it. UIBlurEffect* blur = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]; effectView = [[UIVisualEffectView alloc] initWithEffect:blur]; effectView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; effectView.frame = self.bounds; self.layer.borderWidth = 1; [self addSubview:effectView]; When I animate the superview to make it grow, the Visual Effect follow the animation

Fix UIVisualEffectView extra light blur being gray on white background

微笑、不失礼 提交于 2019-12-05 17:29:48
问题 Apple provides this live blurring view class UIVisualEffectView and you use it with a UIBlurEffect which takes one of three available UIBlurEffectStyles: enum UIBlurEffectStyle : Int { case ExtraLight case Light case Dark } Now for demo purposes I set up two effect views with the styles Light and ExtraLight : let lightBlur = UIBlurEffect(style: UIBlurEffectStyle.Light) let extraLightBlur = UIBlurEffect(style: UIBlurEffectStyle.ExtraLight) let lightView = UIVisualEffectView(effect: lightBlur)

How to make a transparent cut on UIVisualEffectView?

让人想犯罪 __ 提交于 2019-12-05 08:00:51
In my app , I made a see through UIView by subclassing simple UIView's. However, If I try to do the same using UIVisualEffectView , I am not able to do it. Here is what I am able to do using normal UIView : When I use the UIVisualEffectView in place of green UIView ,I cannot see the see through UIView , even though see through UIView is added to the UIVisualEffectView as subview . Code: - (void)drawRect:(CGRect)rect { //this is same for the UIVIew and for the UIVisualEffectView [super drawRect:rect]; CGContextRef context = UIGraphicsGetCurrentContext(); // Clear any existing drawing on this

UIAlertController Action Sheet without Blurry View Effect

时光毁灭记忆、已成空白 提交于 2019-12-04 11:54:54
I'm using UIAlertController for some actions. But I'm not a big fan of the Blurry View Effect in the actions group view (see screenshot below). I'm trying to remove this blurry effect. I made some research online, and I couldn't find any API in UIAlertController that allows to remove this blurry effect. Also, according to their apple doc here : The UIAlertController class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private and must not be modified. I see that Instagram also removes this blurry view effect : The only way I could find to

Fix UIVisualEffectView extra light blur being gray on white background

懵懂的女人 提交于 2019-12-04 02:27:42
Apple provides this live blurring view class UIVisualEffectView and you use it with a UIBlurEffect which takes one of three available UIBlurEffectStyle s : enum UIBlurEffectStyle : Int { case ExtraLight case Light case Dark } Now for demo purposes I set up two effect views with the styles Light and ExtraLight : let lightBlur = UIBlurEffect(style: UIBlurEffectStyle.Light) let extraLightBlur = UIBlurEffect(style: UIBlurEffectStyle.ExtraLight) let lightView = UIVisualEffectView(effect: lightBlur) lightView.frame = CGRectMake(10, 30, 150, 150) self.view.addSubview(lightView) let extraLightView =

How can blurriness of UIVisualEffectView be modified while dragging in iOS?

本秂侑毒 提交于 2019-12-03 14:04:25
Currently, I'm using a UIVisualEffectView to apply a blur to an image. I have a UIScrollView. As I pull down on the scrollView, in my "scrollViewDidScroll" method, I'm changing the alpha of the UIVisualEffectView. The current behavior of this is that the blur radius changes smoothly as I drag around in the view. The problem is, of course, I'm not supposed to be doing this. Getting warnings about changing the alpha value of a UIVisualEffectView. I've seen people say to do a smooth transition of blurring using an animation, like this here: How to fade a UIVisualEffectView and/or UIBlurEffect in

How to implement Visual Effect Views in Interface Builder?

我们两清 提交于 2019-12-03 06:30:17
问题 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. 回答1: Finally figured it out. In a UIViewController change the view's background to blue Drag a