I am developing Mac app. In this app, I am using a NSScrollView\'s instance as scrollView. And I have set a customView which is an instance of NSView in this ScrollView as:
I have solved my problem by setting the scrollToPoint property of ScrollView's ContentView. Here is the code:
[[scrollView verticalScroller] setFloatValue:0.0];
[[scrollView contentView] scrollToPoint:NSMakePoint(0.0, y)];
// here y = (difference b/w scrollView's content size height and scrollView's height)