Documentation shows scrollView property but cannot access in code.
I get this error:
.../MasterViewController.m:106:20: Property 'scrollView' not found on object of type 'WKWebView *'
Any ideas?
This is for OS X not iOS; sorry about the tag before.
the .h file-
#import <Cocoa/Cocoa.h>
@import WebKit;
#import <WebKit/WebFrameLoadDelegate.h>
@interface MasterViewController : NSViewController
@property (strong) WKWebView *buildLog;
the .m file code-
self.buildLog.scrollView setContentOffset:100 animated:YES];
...l/MasterViewController.m:126:20: Property 'scrollView' not found on object of type 'WKWebView *'
The scrollView property is only part of the iOS version of WKWebView.
On OS X this is simply not available. It may be more an internal implementation detail there. You can probably find the NSScrollView by walking the WKWebView child views, but this is a bit of a grey area that may break at one point.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With