ios - Blur Effect using Swift language in iPhone -
i've been trying implement blur effect using uiimageview in xcode 6 (swift language), i'm trying implement below imageview blurred.
i cannot make work, i'm asking guys stack overflow me, please.
how can done?
the code wrote far is:
class blurimage: uiimageview { init(frame: cgrect) { super.init(frame: frame) var blur:uiblureffect = uiblureffect(style: uiblureffectstyle.light) var effectview:uivisualeffectview = uivisualeffectview (effect: blur) } }
you need assign frame effect blur view , add subview
class blurimage: uiimageview {
init(frame: cgrect) { super.init(frame: frame) var blur:uiblureffect = uiblureffect(style: uiblureffectstyle.light) var effectview:uivisualeffectview = uivisualeffectview (effect: blur) effectview.frame = frame addsubview(effectview) } }
Comments
Post a Comment