//
//  TTNewsDetailController.h
//  DFTTFramework_Base
//
//  Created by 小软 on 2018/6/12.
//  Copyright © 2018年 路鹏. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "TTNewsListModel.h"
#import "TTNewsWebDetailcfg.h"
#import "TTNewsWebDetailView.h"

@interface TTNewsDetailController : UIViewController
@property (nonatomic, weak) id delegate;

- (instancetype)initWithNewsWebDetailcfg:(TTNewsWebDetailcfg *)webDetailcfg withNewsListModel:(TTNewsListModel *)newsListModel withSuccess:(TTNewsWebDetailSuccessBlock)successBlock withFail:(TTNewsWebDetailFailBlock)failBlock;
@end

@protocol TTNewsDetailControllerDelegate<NSObject>;
@optional
//第一次加载完成返回总高度和当前时间戳（精确到秒
- (void)newsDetailViewControllerDidFirstFinishLoad:(TTNewsDetailController *)vc withAllHeight:(CGFloat)allHeight withTime:(NSString *)timeStr;
//控制器关闭返回当前时间戳
- (void)newsDetailViewControllerDidClose:(TTNewsDetailController *)vc withTime:(NSString *)timeStr;
//web滑动行为返回总高度，滑动距离，滑动方向
- (void)newsDetailViewControllerDidScroll:(TTNewsDetailController *)vc withAllHeight:(CGFloat)allHeight withScrollHeight:(CGFloat)scrollHeight withDirection:(BOOL)isDown;
@end
