Skip to content

Commit 7f4cacc

Browse files
authored
Merge pull request #6 from jrsaruo/hotfix/auto-layout
Fixed the placeholder layout
2 parents 6e16ca7 + 5beac3c commit 7f4cacc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ textView.textContainer.lineFragmentPadding = 0
3030
To use the `UIKitComponents` library in a SwiftPM project, add the following line to the dependencies in your `Package.swift` file:
3131

3232
```swift
33-
.package(url: "https://github.com/jrsaruo/UIKitComponents", from: "1.0.0"),
33+
.package(url: "https://github.com/jrsaruo/UIKitComponents", from: "1.0.1"),
3434
```
3535

3636
and add `UIKitComponents` as a dependency for your target:

Sources/UIKitComponents/TextViewWithPlaceholder.swift

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ open class TextViewWithPlaceholder: UITextView {
2323

2424
private let placeholderTextView: UITextView = {
2525
let textView = UITextView()
26+
textView.translatesAutoresizingMaskIntoConstraints = false
2627
textView.backgroundColor = .clear
2728
textView.textColor = .placeholderText
2829
textView.isScrollEnabled = false

0 commit comments

Comments
 (0)