【发布时间】:2014-08-15 22:20:50
【问题描述】:
我正在尝试找到一种在 NSTextField 末尾自动向下滚动的方法。 textField 循环更新,所以我想知道如何通过向下滚动显示每次输入的最后一个文本。
这是我的代码:
var tmp = consoleView.stringValue.utf16Count
if tmp >= 25000
{
consoleView.stringValue = "";
}
consoleView.stringValue = //[..longStringHere..]
consoleView.//SCROLLDOWN
我在objective-c中看到了一些答案,但我从来没有在其中做过任何程序,所以我不太了解它......
谢谢
【问题讨论】:
标签: swift nstextfield autoscroll