Advertisement
neatekFb

Scroll UITextView to top - Swift 3

Nov 2nd, 2016
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.34 KB | None | 0 0
  1. // Vladimir Zhelnov - neatek.pw - Web/iOS dev
  2.  
  3. //viewDidLoad is called when the NIB finished loading. At this time the view is not visible on screen.
  4. //viewDidAppear is called when the view is visible on screen.
  5.  
  6. override func viewDidAppear(_ animated: Bool) {
  7.     self.textview.scrollRangeToVisible(NSRange(location:0, length:0))
  8. }
  9. // UIView Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement