iOS极端模糊效果

时间:2014-01-10 22:30:13

标签: ios objective-c uiimage core-image

我正在尝试实现这样的模糊效果:

This is the iOS 7 version of Rdio

正如您所看到的,背景图像是专辑封面,但它非常模糊。我曾尝试使用Apples UIImage + ImageEffects类别,但它并没有接近我需要的模糊量。有谁知道如何做到这一点,或任何可以实现这种效果的库?

1 个答案:

答案 0 :(得分:0)

我使用LBBlurredImage来实现终极模糊

self.backgroundImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"bg"]];
self.backgroundImageView.contentMode = UIViewContentModeScaleAspectFill;
[self.backgroundImageView setImageToBlur: [UIImage imageNamed:@"bg"] blurRadius: 50 completionBlock: nil];
[self.view addSubview:self.backgroundImageView];

夫特:

let backgroundImageView = UIImageView(image: UIImage(named: "bg"))
backgroundImageView.contentMode = .ScaleAspectFill
backgroundImageView.setImageToBlur(UIImage(named: "bg"), blurRadius: 50, completionBlock: nil)
self.view.addSubview(backgroundView)