Skip to content

Commit 90afed5

Browse files
Fix user and text input pages
1 parent a5c35c2 commit 90afed5

File tree

2 files changed

+55
-32
lines changed

2 files changed

+55
-32
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import UIKit
2+
3+
@IBDesignable
4+
class TextInputTextView: UITextView {
5+
@IBInspectable
6+
var textPadding: CGFloat = 20 { didSet { padText() } }
7+
8+
override func awakeFromNib() {
9+
super.awakeFromNib()
10+
padText()
11+
}
12+
13+
override func prepareForInterfaceBuilder() {
14+
super.prepareForInterfaceBuilder()
15+
padText()
16+
}
17+
18+
private func padText() {
19+
textContainerInset.left = textPadding
20+
textContainerInset.right = textPadding
21+
}
22+
}

0 commit comments

Comments
 (0)