I'm trying for 2 hours now to get my scrollview to scroll a specific point. Its frustrating and I cant tell you why it wont work.
I have a scrollview and in it is a NSClipView. They are getting created in my AppDelegate right before my scrollPoint.
but either
[myclipview scrollPoint:NSMakePoint(1000.0, 0.0)];
works, neither
[[self.scrollView documentView] scrollPoint:NSMakePoint(1000.0, 0.0)];
(I want it to scroll all the way to the right,but not with any flip method or sth.)
Found this question Why is [[NSScrollView documentView] scrollPoint:] not working in loadView method?
And did not help me, I dont try it in the loadView method either. scrollView and myclipview arent nil either. Any tips for me? The scrollview works fine except it wont scroll to my position.
EDIT
just to be shure, i made this small test project:
NSScrollView* myscrollview = [[NSScrollView alloc] initWithFrame:NSMakeRect(0, 0, 200, 200)];
NSClipView* myclipview = [[NSClipView alloc] initWithFrame:NSMakeRect(0, 0, 500, 400)];
[myscrollview setHasVerticalScroller:YES];
[myscrollview setHasHorizontalScroller:YES];
[myscrollview setDocumentView:myclipview];
[[myscrollview documentView] scrollPoint:NSMakePoint(400, 300)];
[self.window.contentView addSubview:myscrollview];
and it doesnt scroll anywhere, i think i'm missing something here...?