I'm having problems with UITextView . I saw that other people had this problem before, but whenever my application loads on my phone, all UITextViews start from the bottom of their text, and I have to scroll up.
I tried many solutions, but I need a solution for use only on the storyboard, since I have some views without assigned classes.
EDIT
I think this happens when scrolling is on - so how can I turn on scrolling but not stop it?
iOS 9.2,
contentOffset
, , Storyboard., , TextView
Storyboard
TextView
TextView UIViewController
UIViewController
- (void)viewWillAppear:(BOOL)animated { [self.myTextView setContentOffset:CGPointZero]; }
TextView UIView
UIView
- (void)layoutSubviews{ [self.myTextView setContentOffset:CGPointZero]; }
Have you tried something like:
[self.textView scrollRangeToVisible:NSMakeRange(0, 0)];
Source: https://habr.com/ru/post/1621610/More articles:Onchange adds data to table row using ajax - javascriptС# Basic OOP - создание словаря класса с конструкторами - dictionaryTypescript: Function Types - javascriptconvert shortdate to LocalDate - javatext-align does not work on chrome - htmlДинамический порядок JPA с помощью API критериев - jpaText between RegEx Python pattern matching - pythonИзбавьтесь от лестницы if-else при создании запроса критериев JPA на основе полей sort/filter в LazyDataModel - javaInstagram API does not provide more than 100 followers of the user? - apiPassing Two BSTs in Order - algorithmAll Articles