Closed akatreyt closed 8 years ago
Currently there's no way to set only placeholder label's inset, because placeholder label is intended to follow textview's own text properties. You can set textContainerInset
property of UITextView.
Alternatively, you can use textView.attributedPlaceholer
to set NSAttributedString with attribute:
let paragraph = NSMutableParagraphStyle()
paragraph.firstLineHeadIndent = 20
let textView = UITextView()
textView.attributedText = NSAttributedString(
string: "Hello, World!",
attributes: [NSParagraphStyleAttributeName: paragraph]
)
I'm using this in a custom cell and would like to have the placeholder text have a x padding of 16. Any ways to get this done?
Thanks