Guest User

Untitled

a guest
Mar 23rd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. extension ViewController : UITextViewDelegate {
  2.  
  3. func textViewDidChange(_ textView: UITextView) {
  4.  
  5. let expendSize = CGSize(width: textView.frame.width, height : .infinity)
  6. let estimatedSize = textView.sizeThatFits(expendSize)
  7.  
  8. let heightOffset = estimatedSize.height - CGFloat(37.verticalValueAppliedScreenSize)
  9.  
  10. self.ratingInputView.snp.updateConstraints { (make) in
  11. make.height.equalTo(heightOffset + CGFloat(95.verticalValueAppliedScreenSize))
  12. }
  13.  
  14. UIView.animate(withDuration: 0.2) {
  15. self.view.layoutIfNeeded()
  16. }
  17. }
  18.  
  19. }
Add Comment
Please, Sign In to add comment