Skip to content

Commit ae25fe7

Browse files
committed
Changing "public" for "open". This reads kind of weird now
1 parent 0c60b93 commit ae25fe7

File tree

11 files changed

+121
-121
lines changed

11 files changed

+121
-121
lines changed

TextFieldEffects/TextFieldEffects/AkiraTextField.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import UIKit
1111
/**
1212
An AkiraTextField is a subclass of the TextFieldEffects object, is a control that displays an UITextField with a customizable visual effect around the edges of the control.
1313
*/
14-
@IBDesignable public class AkiraTextField : TextFieldEffects {
14+
@IBDesignable open class AkiraTextField : TextFieldEffects {
1515

1616
private let borderSize: (active: CGFloat, inactive: CGFloat) = (1, 2)
1717
private let borderLayer = CALayer()
@@ -23,7 +23,7 @@ import UIKit
2323

2424
This property applies a color to the bounds of the control. The default value for this property is a clear color.
2525
*/
26-
@IBInspectable dynamic public var borderColor: UIColor? {
26+
@IBInspectable dynamic open var borderColor: UIColor? {
2727
didSet {
2828
updateBorder()
2929
}
@@ -34,7 +34,7 @@ import UIKit
3434

3535
This property applies a color to the complete placeholder string. The default value for this property is a black color.
3636
*/
37-
@IBInspectable dynamic public var placeholderColor: UIColor = .black {
37+
@IBInspectable dynamic open var placeholderColor: UIColor = .black {
3838
didSet {
3939
updatePlaceholder()
4040
}
@@ -45,35 +45,35 @@ import UIKit
4545

4646
This property determines the size of the placeholder label relative to the font size of the text field.
4747
*/
48-
@IBInspectable dynamic public var placeholderFontScale: CGFloat = 0.7 {
48+
@IBInspectable dynamic open var placeholderFontScale: CGFloat = 0.7 {
4949
didSet {
5050
updatePlaceholder()
5151
}
5252
}
5353

54-
override public var placeholder: String? {
54+
override open var placeholder: String? {
5555
didSet {
5656
updatePlaceholder()
5757
}
5858
}
5959

60-
override public var bounds: CGRect {
60+
override open var bounds: CGRect {
6161
didSet {
6262
updateBorder()
6363
}
6464
}
6565

6666
// MARK: TextFieldEffects
6767

68-
override public func drawViewsForRect(_ rect: CGRect) {
68+
override open func drawViewsForRect(_ rect: CGRect) {
6969
updateBorder()
7070
updatePlaceholder()
7171

7272
addSubview(placeholderLabel)
7373
layer.addSublayer(borderLayer)
7474
}
7575

76-
override public func animateViewsForTextEntry() {
76+
override open func animateViewsForTextEntry() {
7777
UIView.animate(withDuration: 0.3, animations: {
7878
self.updateBorder()
7979
self.updatePlaceholder()
@@ -82,7 +82,7 @@ import UIKit
8282
})
8383
}
8484

85-
override public func animateViewsForTextDisplay() {
85+
override open func animateViewsForTextDisplay() {
8686
UIView.animate(withDuration: 0.3, animations: {
8787
self.updateBorder()
8888
self.updatePlaceholder()
@@ -122,19 +122,19 @@ import UIKit
122122

123123
// MARK: - Overrides
124124

125-
public override func placeholderRect(forBounds bounds: CGRect) -> CGRect {
125+
open override func placeholderRect(forBounds bounds: CGRect) -> CGRect {
126126
if isFirstResponder || text!.isNotEmpty {
127127
return CGRect(x: placeHolderInsets.x, y: placeHolderInsets.y, width: bounds.width, height: placeholderHeight)
128128
} else {
129129
return textRect(forBounds: bounds)
130130
}
131131
}
132132

133-
public override func editingRect(forBounds bounds: CGRect) -> CGRect {
133+
open override func editingRect(forBounds bounds: CGRect) -> CGRect {
134134
return textRect(forBounds: bounds)
135135
}
136136

137-
override public func textRect(forBounds bounds: CGRect) -> CGRect {
137+
override open func textRect(forBounds bounds: CGRect) -> CGRect {
138138
return bounds.offsetBy(dx: textFieldInsets.x, dy: textFieldInsets.y + placeholderHeight/2)
139139
}
140140
}

TextFieldEffects/TextFieldEffects/HoshiTextField.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ import UIKit
1111
/**
1212
An HoshiTextField is a subclass of the TextFieldEffects object, is a control that displays an UITextField with a customizable visual effect around the lower edge of the control.
1313
*/
14-
@IBDesignable public class HoshiTextField: TextFieldEffects {
14+
@IBDesignable open class HoshiTextField: TextFieldEffects {
1515

1616
/**
1717
The color of the border when it has no content.
1818

1919
This property applies a color to the lower edge of the control. The default value for this property is a clear color.
2020
*/
21-
@IBInspectable dynamic public var borderInactiveColor: UIColor? {
21+
@IBInspectable dynamic open var borderInactiveColor: UIColor? {
2222
didSet {
2323
updateBorder()
2424
}
@@ -29,7 +29,7 @@ import UIKit
2929

3030
This property applies a color to the lower edge of the control. The default value for this property is a clear color.
3131
*/
32-
@IBInspectable dynamic public var borderActiveColor: UIColor? {
32+
@IBInspectable dynamic open var borderActiveColor: UIColor? {
3333
didSet {
3434
updateBorder()
3535
}
@@ -40,7 +40,7 @@ import UIKit
4040

4141
This property applies a color to the complete placeholder string. The default value for this property is a black color.
4242
*/
43-
@IBInspectable dynamic public var placeholderColor: UIColor = .black {
43+
@IBInspectable dynamic open var placeholderColor: UIColor = .black {
4444
didSet {
4545
updatePlaceholder()
4646
}
@@ -51,19 +51,19 @@ import UIKit
5151

5252
This property determines the size of the placeholder label relative to the font size of the text field.
5353
*/
54-
@IBInspectable dynamic public var placeholderFontScale: CGFloat = 0.65 {
54+
@IBInspectable dynamic open var placeholderFontScale: CGFloat = 0.65 {
5555
didSet {
5656
updatePlaceholder()
5757
}
5858
}
5959

60-
override public var placeholder: String? {
60+
override open var placeholder: String? {
6161
didSet {
6262
updatePlaceholder()
6363
}
6464
}
6565

66-
override public var bounds: CGRect {
66+
override open var bounds: CGRect {
6767
didSet {
6868
updateBorder()
6969
updatePlaceholder()
@@ -79,7 +79,7 @@ import UIKit
7979

8080
// MARK: - TextFieldsEffects
8181

82-
override public func drawViewsForRect(_ rect: CGRect) {
82+
override open func drawViewsForRect(_ rect: CGRect) {
8383
let frame = CGRect(origin: CGPoint.zero, size: CGSize(width: rect.size.width, height: rect.size.height))
8484

8585
placeholderLabel.frame = frame.insetBy(dx: placeholderInsets.x, dy: placeholderInsets.y)
@@ -93,7 +93,7 @@ import UIKit
9393
addSubview(placeholderLabel)
9494
}
9595

96-
override public func animateViewsForTextEntry() {
96+
override open func animateViewsForTextEntry() {
9797
if text!.isEmpty {
9898
UIView.animate(withDuration: 0.3, delay: 0.0, usingSpringWithDamping: 0.8, initialSpringVelocity: 1.0, options: .beginFromCurrentState, animations: ({
9999
self.placeholderLabel.frame.origin = CGPoint(x: 10, y: self.placeholderLabel.frame.origin.y)
@@ -113,7 +113,7 @@ import UIKit
113113
activeBorderLayer.frame = rectForBorder(borderThickness.active, isFilled: true)
114114
}
115115

116-
override public func animateViewsForTextDisplay() {
116+
override open func animateViewsForTextDisplay() {
117117
if text!.isEmpty {
118118
UIView.animate(withDuration: 0.35, delay: 0.0, usingSpringWithDamping: 0.8, initialSpringVelocity: 2.0, options: UIViewAnimationOptions.beginFromCurrentState, animations: ({
119119
self.layoutPlaceholderInTextRect()
@@ -179,11 +179,11 @@ import UIKit
179179

180180
// MARK: - Overrides
181181

182-
override public func editingRect(forBounds bounds: CGRect) -> CGRect {
182+
override open func editingRect(forBounds bounds: CGRect) -> CGRect {
183183
return bounds.offsetBy(dx: textFieldInsets.x, dy: textFieldInsets.y)
184184
}
185185

186-
override public func textRect(forBounds bounds: CGRect) -> CGRect {
186+
override open func textRect(forBounds bounds: CGRect) -> CGRect {
187187
return bounds.offsetBy(dx: textFieldInsets.x, dy: textFieldInsets.y)
188188
}
189189

TextFieldEffects/TextFieldEffects/IsaoTextField.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ import UIKit
1111
/**
1212
An IsaoTextField is a subclass of the TextFieldEffects object, is a control that displays an UITextField with a customizable visual effect around the lower edge of the control.
1313
*/
14-
@IBDesignable public class IsaoTextField: TextFieldEffects {
14+
@IBDesignable open class IsaoTextField: TextFieldEffects {
1515

1616
/**
1717
The color of the border when it has no content.
1818

1919
This property applies a color to the lower edge of the control. The default value for this property is a clear color. This value is also applied to the placeholder color.
2020
*/
21-
@IBInspectable dynamic public var inactiveColor: UIColor? {
21+
@IBInspectable dynamic open var inactiveColor: UIColor? {
2222
didSet {
2323
updateBorder()
2424
}
@@ -29,7 +29,7 @@ import UIKit
2929

3030
This property applies a color to the lower edge of the control. The default value for this property is a clear color.
3131
*/
32-
@IBInspectable dynamic public var activeColor: UIColor? {
32+
@IBInspectable dynamic open var activeColor: UIColor? {
3333
didSet {
3434
updateBorder()
3535
}
@@ -40,19 +40,19 @@ import UIKit
4040

4141
This property determines the size of the placeholder label relative to the font size of the text field.
4242
*/
43-
@IBInspectable dynamic public var placeholderFontScale: CGFloat = 0.7 {
43+
@IBInspectable dynamic open var placeholderFontScale: CGFloat = 0.7 {
4444
didSet {
4545
updatePlaceholder()
4646
}
4747
}
4848

49-
override public var placeholder: String? {
49+
override open var placeholder: String? {
5050
didSet {
5151
updatePlaceholder()
5252
}
5353
}
5454

55-
override public var bounds: CGRect {
55+
override open var bounds: CGRect {
5656
didSet {
5757
updateBorder()
5858
updatePlaceholder()
@@ -66,7 +66,7 @@ import UIKit
6666

6767
// MARK: - TextFieldsEffects
6868

69-
override public func drawViewsForRect(_ rect: CGRect) {
69+
override open func drawViewsForRect(_ rect: CGRect) {
7070
let frame = CGRect(origin: CGPoint.zero, size: CGSize(width: rect.size.width, height: rect.size.height))
7171

7272
placeholderLabel.frame = frame.insetBy(dx: placeholderInsets.x, dy: placeholderInsets.y)
@@ -79,14 +79,14 @@ import UIKit
7979
addSubview(placeholderLabel)
8080
}
8181

82-
override public func animateViewsForTextEntry() {
82+
override open func animateViewsForTextEntry() {
8383
updateBorder()
8484
if let activeColor = activeColor {
8585
performPlacerholderAnimationWithColor(activeColor)
8686
}
8787
}
8888

89-
override public func animateViewsForTextDisplay() {
89+
override open func animateViewsForTextDisplay() {
9090
updateBorder()
9191
if let inactiveColor = inactiveColor {
9292
performPlacerholderAnimationWithColor(inactiveColor)
@@ -166,12 +166,12 @@ import UIKit
166166

167167
// MARK: - Overrides
168168

169-
override public func editingRect(forBounds bounds: CGRect) -> CGRect {
169+
override open func editingRect(forBounds bounds: CGRect) -> CGRect {
170170
let newBounds = CGRect(x: 0, y: 0, width: bounds.size.width, height: bounds.size.height - font!.lineHeight + textFieldInsets.y)
171171
return newBounds.insetBy(dx: textFieldInsets.x, dy: 0)
172172
}
173173

174-
override public func textRect(forBounds bounds: CGRect) -> CGRect {
174+
override open func textRect(forBounds bounds: CGRect) -> CGRect {
175175
let newBounds = CGRect(x: 0, y: 0, width: bounds.size.width, height: bounds.size.height - font!.lineHeight + textFieldInsets.y)
176176

177177
return newBounds.insetBy(dx: textFieldInsets.x, dy: 0)

TextFieldEffects/TextFieldEffects/JiroTextField.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ import UIKit
1111
/**
1212
A JiroTextField is a subclass of the TextFieldEffects object, is a control that displays an UITextField with a customizable visual effect around the background of the control.
1313
*/
14-
@IBDesignable public class JiroTextField: TextFieldEffects {
14+
@IBDesignable open class JiroTextField: TextFieldEffects {
1515

1616
/**
1717
The color of the border.
1818

1919
This property applies a color to the lower edge of the control. The default value for this property is a clear color.
2020
*/
21-
@IBInspectable dynamic public var borderColor: UIColor? {
21+
@IBInspectable dynamic open var borderColor: UIColor? {
2222
didSet {
2323
updateBorder()
2424
}
@@ -29,7 +29,7 @@ import UIKit
2929

3030
This property applies a color to the complete placeholder string. The default value for this property is a black color.
3131
*/
32-
@IBInspectable dynamic public var placeholderColor: UIColor = .black {
32+
@IBInspectable dynamic open var placeholderColor: UIColor = .black {
3333
didSet {
3434
updatePlaceholder()
3535
}
@@ -40,19 +40,19 @@ import UIKit
4040

4141
This property determines the size of the placeholder label relative to the font size of the text field.
4242
*/
43-
@IBInspectable dynamic public var placeholderFontScale: CGFloat = 0.65 {
43+
@IBInspectable dynamic open var placeholderFontScale: CGFloat = 0.65 {
4444
didSet {
4545
updatePlaceholder()
4646
}
4747
}
4848

49-
override public var placeholder: String? {
49+
override open var placeholder: String? {
5050
didSet {
5151
updatePlaceholder()
5252
}
5353
}
5454

55-
override public var bounds: CGRect {
55+
override open var bounds: CGRect {
5656
didSet {
5757
updateBorder()
5858
updatePlaceholder()
@@ -66,7 +66,7 @@ import UIKit
6666

6767
// MARK: - TextFieldsEffects
6868

69-
override public func drawViewsForRect(_ rect: CGRect) {
69+
override open func drawViewsForRect(_ rect: CGRect) {
7070
let frame = CGRect(origin: CGPoint.zero, size: CGSize(width: rect.size.width, height: rect.size.height))
7171

7272
placeholderLabel.frame = frame.insetBy(dx: placeholderInsets.x, dy: placeholderInsets.y)
@@ -79,7 +79,7 @@ import UIKit
7979
addSubview(placeholderLabel)
8080
}
8181

82-
override public func animateViewsForTextEntry() {
82+
override open func animateViewsForTextEntry() {
8383
borderLayer.frame.origin = CGPoint(x: 0, y: font!.lineHeight)
8484

8585
UIView.animate(withDuration: 0.2, delay: 0.3, usingSpringWithDamping: 0.8, initialSpringVelocity: 1.0, options: .beginFromCurrentState, animations: ({
@@ -92,7 +92,7 @@ import UIKit
9292
})
9393
}
9494

95-
override public func animateViewsForTextDisplay() {
95+
override open func animateViewsForTextDisplay() {
9696
if text!.isEmpty {
9797
UIView.animate(withDuration: 0.35, delay: 0.0, usingSpringWithDamping: 0.8, initialSpringVelocity: 2.0, options: .beginFromCurrentState, animations: ({
9898
self.layoutPlaceholderInTextRect()
@@ -158,11 +158,11 @@ import UIKit
158158

159159
// MARK: - Overrides
160160

161-
override public func editingRect(forBounds bounds: CGRect) -> CGRect {
161+
override open func editingRect(forBounds bounds: CGRect) -> CGRect {
162162
return bounds.offsetBy(dx: textFieldInsets.x, dy: textFieldInsets.y)
163163
}
164164

165-
override public func textRect(forBounds bounds: CGRect) -> CGRect {
165+
override open func textRect(forBounds bounds: CGRect) -> CGRect {
166166
return bounds.offsetBy(dx: textFieldInsets.x, dy: textFieldInsets.y)
167167
}
168168

0 commit comments

Comments
 (0)