I need some help coding to views in Cocoa/Obj-C, specifically, NSView, NSScrollView & NSClipView.
What I want to do is be able to programmatically scroll an NSView inside an NSScrollView. What I've done is create my NSView, and placed that in an NSSCrollView. I did all this in Interface Builder.
Now if I allow the scrollbars to be visible I can scroll my NSView around so I know this part is working. What I want to do is keep the bars invisible and scroll the view in code using the scrollToPoint: method. My problem is how do I do this in code?
I've tried using the scrollToPoint: method in my NSScrollView's drawRect method but that didn't work. Do I need to make a controller class, then assign outlets to my views?
Do I need to explicitly define an NSClipView to do this?