Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在创建一个游戏,根据可用的提示计数,我想在 textview 中向玩家显示提示。现在我想给 textview 自动滚动,因为每当新提示添加到以前的提示中时,我需要滚动 textview 才能看到提示。这意味着每当添加新提示时,我都想自动滚动到 textview 的底部。
像这样的东西应该可以解决问题......
[myTextView scrollRangeToVisible:NSMakeRange([myTextView.text length], 0)];