//
//  TTNewsWebDetileVC.h
//  DFTTDemo
//
//  Created by 路鹏 on 2016/12/28.
//  Copyright © 2016年 高欣研究院. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "TTNewsListModel.h"
#import "TTNewsWebDetailcfg.h"
typedef NS_ENUM(NSInteger,TTWebDetailFontSize) {
    TTWebDetailFontSizeSmall = 1,
    TTWebDetailFontSizeMidum,
    TTWebDetailFontSizeBig,
    TTWebDetailFontSizeSuperBig
};
typedef void(^TTNewsWebDetailSuccessBlock)(NSString *success);
typedef void(^TTNewsWebDetailFailBlock)(NSString *fail);
@protocol NewsWebDelegate<NSObject>;
@optional
- (BOOL)newsWebView:(UIWebView *)webview shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigateType;
- (void)newsWebView:(UIWebView *)webView didFailLoadWithError:(NSError *)error;
- (void)newswebViewDidFinishLoad:(UIWebView *)webView;
- (void)newswebViewDidFirstFinishLoad:(UIWebView *)webView;
- (void)newswebViewDidScroll:(UIScrollView *)scrollView;
- (void)newswebViewWillBeginDragging:(UIScrollView *)scrollView;
@end
@interface TTNewsWebDetailView : UIView
@property (nonatomic, copy) void (^hasLoadUrl)();
@property (nonatomic, readonly) NSString * shareUrl;
@property (nonatomic, strong) NSString * topic;
@property (nonatomic, assign) BOOL isNotify;
- (instancetype)initWithFrame:(CGRect)frame withNewsWebDetailcfg:(TTNewsWebDetailcfg *)webDetailcfg withNewsListModel:(TTNewsListModel *)newsListModel withSuccess:(TTNewsWebDetailSuccessBlock)successBlock withFail:(TTNewsWebDetailFailBlock)failBlock;
- (void)goBackWithWebViewNotCanGoBackBlock:(void(^)(void))notCanGoBackblock;
- (void)refresh;
- (void)changeFontsize:(TTWebDetailFontSize)fontsize;
@property (nonatomic, weak) id <NewsWebDelegate> delegate;
@property (nonatomic, weak) id <UIScrollViewDelegate> webScrollDelegate;
    
@end
