Is there any way to use a content inset such as the one available with iOS's WebView. In iOS you can do:
and set that property.
I know how to get the NSScrollView itself like this in my WebView subclass:
and then get an instance of that NSScrollView:
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!
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!