I can use the UIWebView to transfer WKWebView.
And then I use the web server.
So I read and action html from there.
That code is like this.
#import "ViewController.h"
/*If your header file has not UIKit.h imported */
#import
@interface ViewController ()
@property (weak, nonatomic) IBOutlet UIWebView *webView;
@property (weak, nonatomic) IBOutlet UIButton *button1;
- (IBAction)button1:(UIButton *)sender;
@end
@imprementation ViewController
- (void)viewDidLoad{
[super viewDidLoad];
/*webView and replay button's left of margin, top of margin, width, height on view as set */
_webView.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.hight-200);
_button1.frame = CGRectMake(0, self.view.frame.size.height-200, self.view.frame.size.width, 200);
/*The replay button of title and color is set */
[_button1 setTitle:@"Replay" forState:UIControleStateNormal];
[_button1 setTitleColor:[UIColor redColor].CGColor];
_button1.backgroundColor = [UIColor cyanColor];
/* Server's URL set */
NSURL *url = {NSURL URLWithString:@"https://www.url.com/index.html"];
/*URL load and request */
[_webView loadRequest:[NSURLRequest requestWithURL:url]];
}
- (IBAction)button1:(UIButton *)sender{
NSURL *url = {NSURL URLWithString:@"https://www.url.com/index.html"];
[_webView loadRequest:[NSURLRequest requestWithURL:url]];
}
This code is for html file to load from outer server.
Original webview has not contextmenu, So Any contents can not copy without letter.