Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 639
foobar5512 Avatar asked Dec 07 '13 21:12

foobar5512


1 Answers

You should try something like this  

scrollView.automaticallyAdjustsContentInsets = NO;
scrollView.contentInsets = NSEdgeInsetsMake(offset, 0, 0, 0);
like image 172
Marcel Derks Avatar answered Sep 28 '22 22:09

Marcel Derks