मेरे आवेदन में मैं uiview पर धुंध प्रभाव लागू करना चाहता हूं। तो मैं धुंध प्रभाव कैसे प्राप्त कर सकता हूं। मैं कोड के नीचे से करने की कोशिश की: इस कोड का उपयोगआईओएस में UIView पर ब्लर प्रभाव कैसे लागू करें?
UIGraphicsBeginImageContext(scrollview.bounds.size);
[scrollview.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
//Blur the UIImage with a CIFilter
CIImage *imageToBlur = [CIImage imageWithCGImage:viewImage.CGImage];
CIFilter *gaussianBlurFilter = [CIFilter filterWithName: @"CIGaussianBlur"];
[gaussianBlurFilter setValue:imageToBlur forKey: @"inputImage"];
[gaussianBlurFilter setValue:[NSNumber numberWithFloat:3] forKey: @"inputRadius"];
CIImage *resultImage = [gaussianBlurFilter valueForKey: @"outputImage"];
UIImage *endImage = [[UIImage alloc] initWithCIImage:resultImage];
//Place the UIImage in a UIImageView
UIImageView *newView = [[UIImageView alloc] initWithFrame:scrollview.bounds];
newView.image = endImage;
[scrollview addSubview:newView];
लेकिन होने समस्या। जब धुंध प्रभाव लागू होता है तो समय दृश्य छोटा हो जाता है।