//
//  TTNewsView.h
//  DFTTFramework
//
//  Created by 路鹏 on 2017/4/6.
//  Copyright © 2017年 路鹏. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "TTNewscfg.h"
#import "DFTTNS_ENUM.h"

typedef void(^TTNewsViewSuccessBlock)(NSString *success);
typedef void(^TTNewsViewFailBlock)(NSString *fail);

@interface TTNewsView : UIView
@property (nonatomic, weak) id delegate;
@property (nonatomic, assign) BOOL isScroll;            //是否可以滑动(动态控制)


/** 初始化方法 */
- (instancetype)initWithFrame:(CGRect)frame withNewsType:(TTNewscfg *)newscfg withSuccessBlock:(TTNewsViewSuccessBlock)successBlock withFailBlock:(TTNewsViewFailBlock)failBlock;
///** 刷新方法(刷新当前所展示的列表) */
- (void)refreshInfolist;
- (void)scrollToIndex:(NSInteger)idx;
@end


@protocol TTNewsViewDelegate <NSObject>

@optional
/** 新闻列表点击代理回调 */
- (void)TTNewsView:(TTNewsView *)newsView CellClickWithNewsListModel:(id)newsListModel withNewsListCellType:(TTNewsListViewCellPushViewType)pushViewType;
/** 返回按钮点击 */
- (void)TTNewsViewBackBtnClick:(TTNewsView *)newsView;
/** 执行返回顶部方法回调 */
- (void)TTNewsViewBackToTop:(TTNewsView *)newsView;
- (void)TTnewsViewDidScroll:(UIScrollView *)newsView;
@end
