Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Blakeasd

macrumors 6502a
Original poster
Dec 29, 2009
643
0
Is there any way to use a content inset such as the one available with iOS's WebView. In iOS you can do:

Code:
 webView.scrollView.contentInset

and set that property.



I know how to get the NSScrollView itself like this in my WebView subclass:

Code:
 - (NSScrollView *)mainScrollView {
return [[[[self mainFrame] frameView] documentView] enclosingScrollView]; // can be nil

}

and then get an instance of that NSScrollView:

Code:
NSScrollView *mainScrollView = [self.webView mainScrollView];

Now as stated before I need to set the WebView to be inset in the ScrollView so I can have the content show up under my translucent navigation bar. Currently, the translucent navigation bar covers up the top of the WebView on start, so I need the WebView to sit lower in the NSScrollView.
I need to do this with Mac's WebView as I have a translucent type navigation bar that the WebView goes under.

Any ideas and help is greatly appreciated!
 
Any takers? I wish Apple would make some of the APIs more up-to-date with iOS :mad:
 
After several hours I've found RMSecondaryScroller. This did the trick! Hopefully someone in the future will find this useful!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.