Skip to content

Instantly share code, notes, and snippets.

@tototti
Last active August 29, 2015 14:11
Show Gist options
  • Save tototti/f50b31053ecc81833d32 to your computer and use it in GitHub Desktop.
Save tototti/f50b31053ecc81833d32 to your computer and use it in GitHub Desktop.
TOTWebView.h
//
// TOTWebView.h
// WebKitResearch
//
// Created by tototti on 2014/12/13.
// Copyright (c) 2014 tototti. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Webkit/WebKit.h>
@protocol TOTWebViewDelegate
- (BOOL)shouldStartLoadWithURL:(NSURL*)url;
- (void)didStartLoading;
- (void)didFinishLoading;
- (void)didFailLoadingWithError:(NSError*)error;
@end
@interface TOTWebView : UIView <UIWebViewDelegate, WKUIDelegate, WKNavigationDelegate>
@property (assign) id<TOTWebViewDelegate> delegate;
- (instancetype)initWithFrame:(CGRect)frame;
- (void)loadRequest:(NSURLRequest *)request;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment