我使用下列庫:LBBlurredImage NSInvalidArgumentException
https://github.com/lukabernardi/LBBlurredImage
這是我使用的是模糊的是我加入到一個視圖控制器我的背景圖像的代碼:
var background = UIImage(named: "bg")
var backgroundImageView = UIImageView(image: background)
backgroundImageView.contentMode = .ScaleAspectFill;
backgroundImageView.setImageToBlur(background, blurRadius: 10, completionBlock: {() -> Void in
println("The blurred image has been set")
})
self.view.addSubview(backgroundImageView)
我收到以下錯誤,但我不知道爲什麼:
-[UIImageView setImageToBlur:blurRadius:completionBlock:]: unrecognized selector sent to instance 0x7ff08a802390
2015-01-27 10:50:44.326 TestApp[9289:66346] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView setImageToBlur:blurRadius:completionBlock:]: unrecognized selector sent to instance 0x7ff08a802390'
更新:
看起來像我不是唯一一個收到the error。
無需指定圖像的完整路徑。 – Rajat 2015-08-27 17:46:06