Created
October 8, 2015 16:47
-
-
Save danielgomezrico/75a9a02cb27f02c4b35f to your computer and use it in GitHub Desktop.
iOS - Swift - UITextView scroll to bottom extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
extension UITextView { | |
func scrollToBotom() { | |
let range = NSMakeRange(text.characters.count - 1, 1); | |
scrollRangeToVisible(range); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works perfectly! Thank you!