Skip to content

Commit

Permalink
Remove trailing and bottom constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
MoZhouqi committed Mar 15, 2016
1 parent 289c685 commit d670bb3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions KMPlaceholderTextView/KMPlaceholderTextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,11 @@ public class KMPlaceholderTextView: UITextView {
}

private func updateConstraintsForPlaceholderLabel() {
var newConstraints = NSLayoutConstraint.constraintsWithVisualFormat("H:|-left-[placeholder]-right-|",
var newConstraints = NSLayoutConstraint.constraintsWithVisualFormat("H:|-(\(textContainerInset.left + textContainer.lineFragmentPadding))-[placeholder]",
options: [],
metrics: [
"left" : textContainerInset.left + textContainer.lineFragmentPadding,
"right" : textContainerInset.right + textContainer.lineFragmentPadding
],
metrics: nil,
views: ["placeholder": placeholderLabel])
newConstraints += NSLayoutConstraint.constraintsWithVisualFormat("V:|-(\(textContainerInset.top))-[placeholder]-(>=\(textContainerInset.bottom))-|",
newConstraints += NSLayoutConstraint.constraintsWithVisualFormat("V:|-(\(textContainerInset.top))-[placeholder]",
options: [],
metrics: nil,
views: ["placeholder": placeholderLabel])
Expand Down

0 comments on commit d670bb3

Please sign in to comment.