foobar5512
foobar5512

Reputation: 2490

How to Do a contentInset on a NSScrollView on a Mac

I am trying to do a contentInset on an NSScrollView the same way as iOS in a UIScrollView. There is no method to do this though. Is there anyway to achieve this? this picture should describe what I am trying to do:

enter image description here

If anyone knows of a solution I would absolutely love to hear!! It's driving me nuts

Upvotes: 13

Views: 3140

Answers (1)

Marcel Derks
Marcel Derks

Reputation: 789

You should try something like this  

scrollView.automaticallyAdjustsContentInsets = NO;
scrollView.contentInsets = NSEdgeInsetsMake(offset, 0, 0, 0);

Upvotes: 24

Related Questions