Search code examples
objective-ccocoaxcodensviewnsscrollview

How I set the default position of a NSScroll view?


I have a trouble with a NSScrollview in my aplication because it always start at the bottom of the window. How could make it start in the top?


Solution

  • Try something like this:

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