我如何设置NSScroll视图的默认位置?

Jav*_*rán 11 xcode cocoa objective-c nsview nsscrollview

我在我的应用程序中遇到了NSScrollview的问题,因为它总是从窗口的底部开始.怎么能让它从顶部开始?

Ann*_*nne 12

尝试这样的事情:

NSPoint pointToScrollTo = NSMakePoint (  ,  );  // Any point you like.
[[scrollView contentView] scrollToPoint: pointToScrollTo];
[scrollView reflectScrolledClipView: [scrollView contentView]];
Run Code Online (Sandbox Code Playgroud)