Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extension ViewController : UITextViewDelegate {
- func textViewDidChange(_ textView: UITextView) {
- let expendSize = CGSize(width: textView.frame.width, height : .infinity)
- let estimatedSize = textView.sizeThatFits(expendSize)
- let heightOffset = estimatedSize.height - CGFloat(37.verticalValueAppliedScreenSize)
- self.ratingInputView.snp.updateConstraints { (make) in
- make.height.equalTo(heightOffset + CGFloat(95.verticalValueAppliedScreenSize))
- }
- UIView.animate(withDuration: 0.2) {
- self.view.layoutIfNeeded()
- }
- }
- }
Add Comment
Please, Sign In to add comment