嗯,这就是我想要做的但到目前为止没有成功。
这就是我的尝试:
- (void)awakeFromNib
{
[[_myScrollView contentView] scrollToPoint:NSMakePoint(0,[[_myScrollView contentView] bounds].size.height)];
}
有什么想法吗?
答案 0 :(得分:0)
怎么样:
[[_myScrollView contentView] scrollToPoint:NSMakePoint(0,0)];
答案 1 :(得分:0)
试试这个
NSPoint newScrollOrigin = NSMakePoint(0.0,NSMaxY([[_myScrollView documentView] frame])
-NSHeight([[_myScrollView contentView] bounds]));
[[_myScrollView documentView] scrollPoint:newScrollOrigin];
要了解更多信息,请参阅此链接 -