<|start_filename|>Example/Pods/Target Support Files/CDHorizontalScrollView/CDHorizontalScrollView-umbrella.h<|end_filename|>
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif

#import "CDHorizontalScrollCell.h"
#import "CDHorizontalScrollView.h"

FOUNDATION_EXPORT double CDHorizontalScrollViewVersionNumber;
FOUNDATION_EXPORT const unsigned char CDHorizontalScrollViewVersionString[];



<|start_filename|>Example/CDHorizontalScrollView/HomeViewController.h<|end_filename|>
//
//  HomeViewController.h
//  HorizontalScrollView_Example
//
//  Created by cqz on 2019/7/30.
//  Copyright © 2019 cqzhong. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface HomeViewController : UIViewController

@end

NS_ASSUME_NONNULL_END


<|start_filename|>CDHorizontalScrollView/CDHorizontalScrollCell.h<|end_filename|>
//
//  CDHorizontalScrollCell.h
//  CDHorizontalScrollView_Example
//
//  Created by cqz on 2019/8/5.
//  Copyright © 2019 cqzhong. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface CDHorizontalScrollCell : UICollectionViewCell

@property (nonatomic, strong) id obj;

-(UIViewController *)cd_viewController;
-(void)cellSelectRowAtIndexPath:(NSIndexPath *)indexPath;


@end


<|start_filename|>Example/CDHorizontalScrollView/HomeCollectionViewCell.h<|end_filename|>
//
//  HomeCollectionViewCell.h
//  HorizontalScrollView_Example
//
//  Created by cqz on 2019/8/5.
//  Copyright © 2019 cqzhong. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "HomeHorizontalCollectionViewCell.h"

@interface HomeCollectionViewCell : UICollectionViewCell



- (void)setupModel;

-(void)cellSelectRowAtIndexPath:(NSIndexPath *)indexPath;

@end


<|start_filename|>Example/CDHorizontalScrollView/HomeHorizontalCollectionViewCell.h<|end_filename|>
//
//  HomeHorizontalCollectionViewCell.h
//  HorizontalScrollView_Example
//
//  Created by cqz on 2019/8/5.
//  Copyright © 2019 cqzhong. All rights reserved.
//


#define __MAIN_SCREEN_HEIGHT__      MAX([UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)
#define __MAIN_SCREEN_WIDTH__       MIN([UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)
#define __MAIN_SCREEN_BOUNDS__      [[UIScreen mainScreen] bounds]

#define  CDSCALE_W                 (__MAIN_SCREEN_WIDTH__ / 375.0) //(IS_IPHONE ? (__MAIN_SCREEN_WIDTH__ / 375.0) : (__MAIN_SCREEN_WIDTH__ / 768.0))
#define  CDSCALE_H                 (__MAIN_SCREEN_WIDTH__ / 375.0) //(IS_IPHONE ? (__MAIN_SCREEN_WIDTH__ / 375.0) : (__MAIN_SCREEN_HEIGHT__ / 1024.0))

#define  CDREALVALUE_WIDTH(w)      (CDSCALE_W * w)
#define  CDREALVALUE_HEIGHT(h)     (CDSCALE_H * h)



#import "CDHorizontalScrollCell.h"


@interface HomeHorizontalCollectionViewCell : CDHorizontalScrollCell


@end


<|start_filename|>CDHorizontalScrollView/CDHorizontalScrollView.h<|end_filename|>
//
//  CDHorizontalScrollView.h
//  CDHorizontalScrollView_Example
//
//  Created by cqz on 2019/8/5.
//  Copyright © 2019 cqzhong. All rights reserved.
//

#import <UIKit/UIKit.h>
@protocol CDHorizontalScrollViewDelegate;

@interface CDHorizontalScrollView : UIView

@property (nonatomic, strong, readonly) UICollectionView *collectionView;

- (instancetype)initWithFrame:(CGRect)frame withClassCell:(Class)classCell
                 withDelegate:(id<CDHorizontalScrollViewDelegate>)deleagte;

/**
 *  重新加载
 */
- (void)reloadData;


- (void)scrollToIndex: (NSInteger)index;

//- (void)addRefreshEvent;

@end



@protocol CDHorizontalScrollViewDelegate <NSObject>

@optional
/**
 *  总列数
 */
- (NSArray *)numberOfColumnsInCollectionView:(CDHorizontalScrollView *)collectionView;

//每个item大小
- (CGSize)cellSizeForItemAtIndexPath:(NSIndexPath *)indexPath;
//上左下右
- (UIEdgeInsets)collectionViewInsetForSectionAtIndex:(NSInteger)section;
//每个item之间的间距
- (CGFloat)collectionViewMinimumInteritemSpacingForSectionAtIndex:(NSInteger)section;

- (void)willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:( NSIndexPath *)indexPath;

- (void)didselectItemAtIndexPath:(NSIndexPath *)indexPath;

- (void)hotizontalScrollViewDidScroll: (UIScrollView *)scrollView;


@end



<|start_filename|>Example/CDHorizontalScrollView/CDAppDelegate.h<|end_filename|>
//
//  CDAppDelegate.h
//  CDHorizontalScrollView
//
//  Created by cqzhong on 08/05/2019.
//  Copyright (c) 2019 cqzhong. All rights reserved.
//

@import UIKit;

@interface CDAppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@end
