UITextView is not scrolled to top when loaded

后端 未结 12 1289
别跟我提以往
别跟我提以往 2020-12-03 02:39

When I have text that does not fill the UITextView, it is scrolled to the top working as intended. When there is more text than will fit on screen, the UITextView is scrolle

12条回答
  •  星月不相逢
    2020-12-03 02:55

    Swift

    self.textView.scrollRangeToVisible(NSMakeRange(0, 0))
    

    Objective-C

    [self.textView scrollRangeToVisible:(NSMakeRange(0, 0))];
    

提交回复
热议问题