Skip to content

Commit 0cb8511

Browse files
committed
Fixed up the init methods for better consistency
1 parent 072e299 commit 0cb8511

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

BlurUIKit/VariableBlurView.swift

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class VariableBlurView: UIVisualEffectView {
3838
case right // Right. iPadOS sidebar in right-to-left locales
3939
}
4040

41-
/// An absolute or relative amount of sizing used to customize the appearence of the blur and gradient views.
41+
/// An absolute or relative amount of sizing used to customize the appearance of the blur and gradient views.
4242
public enum GradientSizing {
4343
// The amount of on-screen UI points starting from the origin, as a static value.
4444
case absolute(position: CGFloat)
@@ -117,11 +117,16 @@ public class VariableBlurView: UIVisualEffectView {
117117
commonInit()
118118
}
119119

120-
public init(frame: CGRect) {
121-
super.init(effect: UIBlurEffect(style: .regular))
120+
public override init(effect: UIVisualEffect?) {
121+
super.init(effect: effect)
122122
commonInit()
123123
}
124124

125+
public convenience init(frame: CGRect) {
126+
self.init(effect: UIBlurEffect(style: .regular))
127+
self.frame = frame
128+
}
129+
125130
required init?(coder: NSCoder) {
126131
super.init(effect: UIBlurEffect(style: .regular))
127132
commonInit()

0 commit comments

Comments
 (0)