├── .gitignore ├── GHCarouselMap ├── GHCarouselMap.h ├── GHCarouselMap.m ├── GHLoadImagesHelper.h └── GHLoadImagesHelper.m ├── GHCarouselMapDemo.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── GHCarouselMapDemo ├── .DS_Store ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Example │ ├── GHCarouselStyleFirst.h │ ├── GHCarouselStyleFirst.m │ ├── GHCarouselStyleSecond.h │ └── GHCarouselStyleSecond.m ├── Info.plist ├── ViewController.h ├── ViewController.m └── main.m ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | # CocoaPods 32 | # 33 | # We recommend against adding the Pods directory to your .gitignore. However 34 | # you should judge for yourself, the pros and cons are mentioned at: 35 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 36 | # 37 | # Pods/ 38 | 39 | # Carthage 40 | # 41 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 42 | # Carthage/Checkouts 43 | 44 | Carthage/Build 45 | 46 | # fastlane 47 | # 48 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 49 | # screenshots whenever they are needed. 50 | # For more information about the recommended setup visit: 51 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 52 | 53 | fastlane/report.xml 54 | fastlane/Preview.html 55 | fastlane/screenshots/**/*.png 56 | fastlane/test_output 57 | 58 | # Code Injection 59 | # 60 | # After new code Injection tools there's a generated folder /iOSInjectionProject 61 | # https://github.com/johnno1962/injectionforxcode 62 | 63 | iOSInjectionProject/ 64 | -------------------------------------------------------------------------------- /GHCarouselMap/GHCarouselMap.h: -------------------------------------------------------------------------------- 1 | // 2 | // GHCarouselMap.h 3 | // GHKit 4 | // 5 | // Created by zhaozhiwei on 2019/2/6. 6 | // Copyright © 2019年 GHome. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /** 滚动方向枚举 */ 14 | typedef NS_ENUM (NSUInteger,GHCarouselMapScrollDirection) { 15 | GHCarouselMapScrollDirectionHorizontal = 0,/** 横向 默认 */ 16 | GHCarouselMapScrollDirectionVertical/** 纵向 */ 17 | }; 18 | 19 | @class GHCarouselMap; 20 | @protocol GHCarouselMapDataSource 21 | @required 22 | /** 23 | 设置轮播图个数 24 | 25 | @param carouselMap carouselMap 26 | @return 轮播图个数 27 | */ 28 | - (NSInteger)countOfCellForCarouselMap:(GHCarouselMap *)carouselMap; 29 | 30 | - (UIView *)carouselMap:(GHCarouselMap *)carouselMap cellAtIndex:(NSInteger)index; 31 | 32 | @end 33 | @protocol GHCarouselMapDelegate 34 | 35 | - (void)carouselMap: (GHCarouselMap *) carouselMap didSelectRowAtIndex:(NSInteger)index; 36 | @end 37 | 38 | @interface GHCarouselMap : UIView 39 | 40 | @property (nonatomic , weak) id dataSource; 41 | @property (nonatomic , weak) id dalegate; 42 | /** 滚动方向 */ 43 | @property (nonatomic , assign) GHCarouselMapScrollDirection scrollDirection; 44 | /** 滚动建个 */ 45 | @property (nonatomic , assign) NSTimeInterval timeInterval; 46 | 47 | - (void)reloadData; 48 | @end 49 | 50 | NS_ASSUME_NONNULL_END 51 | -------------------------------------------------------------------------------- /GHCarouselMap/GHCarouselMap.m: -------------------------------------------------------------------------------- 1 | // 2 | // GHCarouselMap.m 3 | // GHKit 4 | // 5 | // Created by zhaozhiwei on 2019/2/6. 6 | // Copyright © 2019年 GHome. All rights reserved. 7 | // 8 | 9 | #import "GHCarouselMap.h" 10 | #import "GHLoadImagesHelper.h" 11 | 12 | @interface GHCarouselMap() 13 | @property (nonatomic , strong) UIScrollView *scrollView; 14 | @property (nonatomic , assign) CGFloat preOffsetX; 15 | @property (nonatomic , assign) CGFloat preOffsetY; 16 | @property (nonatomic , assign) NSInteger pageCount; 17 | @property (nonatomic , strong) UIPageControl *pageControl; // 分页控件 18 | @property (nonatomic, strong) NSTimer *timer; 19 | 20 | @end 21 | @implementation GHCarouselMap 22 | 23 | - (instancetype)initWithFrame:(CGRect)frame { 24 | if (self == [super initWithFrame: frame]) { 25 | [self configuration]; 26 | } 27 | return self; 28 | } 29 | 30 | - (instancetype)init { 31 | if (self == [super init]) { 32 | [self configuration]; 33 | } 34 | return self; 35 | } 36 | 37 | - (void)configuration { 38 | self.scrollDirection = GHCarouselMapScrollDirectionHorizontal; 39 | self.timeInterval = 3.0; 40 | } 41 | 42 | - (void)setTimeInterval:(NSTimeInterval)timeInterval { 43 | _timeInterval = timeInterval; 44 | } 45 | - (void)setScrollDirection:(GHCarouselMapScrollDirection)scrollDirection { 46 | _scrollDirection = scrollDirection; 47 | } 48 | 49 | - (void)reloadData { 50 | if (self.dataSource && [self.dataSource respondsToSelector:@selector(countOfCellForCarouselMap:)]) { 51 | self.pageCount = [self.dataSource countOfCellForCarouselMap:self]; 52 | } 53 | 54 | if (self.scrollDirection == GHCarouselMapScrollDirectionHorizontal) { 55 | _scrollView.contentSize = CGSizeMake(CGRectGetWidth(self.frame) * (self.pageCount + 2), CGRectGetHeight(self.frame)); 56 | } else { 57 | _scrollView.contentSize = CGSizeMake(0, CGRectGetHeight(self.frame) * (self.pageCount + 2)); 58 | } 59 | 60 | for (int i = 0; i < self.pageCount + 2; i++) { 61 | // 添加control,设置偏移位置 62 | CGFloat x = 0; 63 | CGFloat y = 0; 64 | if (self.scrollDirection == GHCarouselMapScrollDirectionHorizontal) { 65 | x = self.frame.size.width * i; 66 | y = 0; 67 | 68 | } else { 69 | _scrollView.contentSize = CGSizeMake(0, CGRectGetHeight(self.frame) * (self.pageCount + 2)); 70 | x = 0; 71 | y = self.frame.size.height * i; 72 | 73 | } 74 | 75 | UIControl *control = [[UIControl alloc] initWithFrame:CGRectMake(x,y, self.frame.size.width, self.frame.size.height)]; 76 | 77 | UIView *pageView = nil; 78 | if (i == 0) { 79 | pageView = [self.dataSource carouselMap:self cellAtIndex:self.pageCount - 1]; 80 | } else if (i == _pageCount + 1){ 81 | pageView = [self.dataSource carouselMap:self cellAtIndex:0]; 82 | }else{ 83 | pageView = [self.dataSource carouselMap:self cellAtIndex:i - 1]; 84 | } 85 | pageView.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height); 86 | 87 | [control addTarget:self action:@selector(clickControl:) forControlEvents:UIControlEventTouchUpInside]; 88 | 89 | [control addSubview:pageView]; 90 | 91 | [_scrollView addSubview:control]; 92 | } 93 | } 94 | - (void)layoutSubviews { 95 | 96 | [super layoutSubviews]; 97 | [self addSubview:self.scrollView]; 98 | self.pageControl.currentPage = 0; 99 | if (self.scrollDirection == GHCarouselMapScrollDirectionVertical) { 100 | self.scrollView.contentOffset = CGPointMake(0,self.frame.size.height); 101 | self.timer = [NSTimer scheduledTimerWithTimeInterval:self.timeInterval target:self selector:@selector(changePageBottom) userInfo:nil repeats:YES]; 102 | 103 | } else { 104 | [self addSubview:self.pageControl]; 105 | 106 | self.scrollView.contentOffset = CGPointMake(self.frame.size.width,0); 107 | self.timer = [NSTimer scheduledTimerWithTimeInterval:self.timeInterval target:self selector:@selector(changePageLeft) userInfo:nil repeats:YES]; 108 | 109 | } 110 | [[NSRunLoop currentRunLoop] addTimer:self.timer forMode:NSRunLoopCommonModes]; 111 | } 112 | 113 | - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView { 114 | self.preOffsetX = scrollView.contentOffset.x; 115 | self.preOffsetY = scrollView.contentOffset.y; 116 | [self.timer setFireDate:[NSDate distantFuture]]; 117 | 118 | } 119 | 120 | - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { 121 | 122 | if (self.scrollDirection == GHCarouselMapScrollDirectionHorizontal) { 123 | CGFloat leftEdgeOffsetX = 0; 124 | CGFloat rightEdgeOffsetX = self.frame.size.width * (self.pageCount + 1); 125 | 126 | if (scrollView.contentOffset.x < self.preOffsetX){ 127 | // 左滑 128 | if (scrollView.contentOffset.x > leftEdgeOffsetX) { 129 | self.pageControl.currentPage = scrollView.contentOffset.x / self.frame.size.width - 1; 130 | } 131 | else if (scrollView.contentOffset.x == leftEdgeOffsetX) { 132 | self.pageControl.currentPage = self.pageCount - 1; 133 | } 134 | 135 | if (scrollView.contentOffset.x == leftEdgeOffsetX) { 136 | self.scrollView.contentOffset = CGPointMake(self.frame.size.width * _pageCount, 0); 137 | } 138 | } else { 139 | if (scrollView.contentOffset.x < rightEdgeOffsetX) { 140 | self.pageControl.currentPage = scrollView.contentOffset.x / self.frame.size.width - 1; 141 | } else if (scrollView.contentOffset.x == rightEdgeOffsetX) { 142 | self.pageControl.currentPage = 0; 143 | } 144 | 145 | if (scrollView.contentOffset.x == rightEdgeOffsetX) { 146 | self.scrollView.contentOffset = CGPointMake(self.frame.size.width, 0); 147 | } 148 | } 149 | } else { 150 | 151 | CGFloat topEdgeOffsetY = 0; 152 | CGFloat bottomEdgeOffsetY = self.frame.size.height * (self.pageCount + 1); 153 | 154 | if (scrollView.contentOffset.y < self.preOffsetY){ 155 | // 左滑 156 | if (scrollView.contentOffset.y > topEdgeOffsetY) { 157 | self.pageControl.currentPage = scrollView.contentOffset.y / self.frame.size.height - 1; 158 | } 159 | else if (scrollView.contentOffset.y == topEdgeOffsetY) { 160 | self.pageControl.currentPage = self.pageCount - 1; 161 | } 162 | 163 | if (scrollView.contentOffset.y == topEdgeOffsetY) { 164 | self.scrollView.contentOffset = CGPointMake(0,self.frame.size.height * _pageCount); 165 | } 166 | } else { 167 | // 右滑 168 | // 设置小点 169 | if (scrollView.contentOffset.y < bottomEdgeOffsetY) { 170 | self.pageControl.currentPage = scrollView.contentOffset.x / self.frame.size.height - 1; 171 | } else if (scrollView.contentOffset.y == bottomEdgeOffsetY) { 172 | self.pageControl.currentPage = 0; 173 | } 174 | 175 | if (scrollView.contentOffset.y == bottomEdgeOffsetY) { 176 | self.scrollView.contentOffset = CGPointMake(0,self.frame.size.height); 177 | } 178 | } 179 | } 180 | [self.timer setFireDate:[NSDate dateWithTimeInterval:self.timeInterval sinceDate:[NSDate date]]]; 181 | } 182 | 183 | - (void)clickControl: (UIControl *)control { 184 | 185 | if (self.dalegate && [self.dalegate respondsToSelector:@selector(carouselMap:didSelectRowAtIndex:)]) { 186 | [self.dalegate carouselMap:self didSelectRowAtIndex:self.pageControl.currentPage]; 187 | } 188 | } 189 | - (void)changePageBottom { 190 | // 设置当前需要偏移的量,每次递增一个page宽度 191 | CGFloat offsetY = _scrollView.contentOffset.y + CGRectGetHeight(self.frame); 192 | 193 | // 根据情况进行偏移 194 | CGFloat edgeOffsetY = self.frame.size.height * (_pageCount + 1); // 最后一个多余页面右边缘偏移量 195 | 196 | // 从多余页往右边滑,赶紧先设置为第一页的位置 197 | if (offsetY > edgeOffsetY) 198 | { 199 | // 偏移量,不带动画,欺骗视觉 200 | self.scrollView.contentOffset = CGPointMake( 0,self.frame.size.height); 201 | // 这里提前改变下一个要滑动到的位置为第二页 202 | offsetY = self.frame.size.height * 2; 203 | } 204 | 205 | // 带动画滑动到下一页面 206 | [self.scrollView setContentOffset:CGPointMake(0,offsetY) animated:YES]; 207 | if (offsetY < edgeOffsetY) 208 | { 209 | self.pageControl.currentPage = offsetY / self.frame.size.height - 1; 210 | } 211 | else if (offsetY == edgeOffsetY) 212 | { 213 | // 最后的多余那一页滑过去之后设置小点为第一个 214 | self.pageControl.currentPage = 0; 215 | } 216 | } 217 | 218 | - (void)changePageTop{ 219 | // 设置当前需要偏移的量,每次递减一个page宽度 220 | CGFloat offsetY = _scrollView.contentOffset.y - CGRectGetHeight(self.frame); 221 | 222 | // 根据情况进行偏移 223 | CGFloat edgeOffsetY = 0; // 最后一个多余页面左边缘偏移量 224 | 225 | // 从多余页往左边滑动,先设置为最后一页 226 | if (offsetY < edgeOffsetY) { 227 | self.scrollView.contentOffset = CGPointMake(0,self.frame.size.height * _pageCount); 228 | offsetY = self.frame.size.height * (_pageCount - 1); 229 | } 230 | 231 | // 带动画滑动到前一页面 232 | [self.scrollView setContentOffset:CGPointMake(0, offsetY) animated:YES]; 233 | if (offsetY > edgeOffsetY) { 234 | self.pageControl.currentPage = offsetY / self.frame.size.height - 1; 235 | } else if (offsetY == edgeOffsetY) { 236 | // 最后的多余那一页滑过去之后设置小点为最后一个 237 | self.pageControl.currentPage = _pageCount - 1; 238 | } 239 | } 240 | 241 | // 往左边滑 242 | - (void)changePageLeft { 243 | // 设置当前需要偏移的量,每次递减一个page宽度 244 | CGFloat offsetX = _scrollView.contentOffset.x - CGRectGetWidth(self.frame); 245 | 246 | // 根据情况进行偏移 247 | CGFloat edgeOffsetX = 0; // 最后一个多余页面左边缘偏移量 248 | 249 | // 从多余页往左边滑动,先设置为最后一页 250 | if (offsetX < edgeOffsetX) { 251 | self.scrollView.contentOffset = CGPointMake(self.frame.size.width * _pageCount, 0); 252 | offsetX = self.frame.size.width * (_pageCount - 1); 253 | } 254 | 255 | // 带动画滑动到前一页面 256 | [self.scrollView setContentOffset:CGPointMake(offsetX, 0) animated:YES]; 257 | if (offsetX > edgeOffsetX) { 258 | self.pageControl.currentPage = offsetX / self.frame.size.width - 1; 259 | } else if (offsetX == edgeOffsetX) { 260 | // 最后的多余那一页滑过去之后设置小点为最后一个 261 | self.pageControl.currentPage = _pageCount - 1; 262 | } 263 | } 264 | 265 | - (UIScrollView *)scrollView { 266 | if (_scrollView == nil) { 267 | _scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; 268 | _scrollView.pagingEnabled = YES; 269 | _scrollView.showsHorizontalScrollIndicator = NO; 270 | _scrollView.showsVerticalScrollIndicator = NO; 271 | _scrollView.bounces = NO; 272 | _scrollView.backgroundColor = [UIColor clearColor]; 273 | self.pageCount = [self.dataSource countOfCellForCarouselMap:self]; 274 | if (self.scrollDirection == GHCarouselMapScrollDirectionHorizontal) { 275 | _scrollView.contentSize = CGSizeMake(CGRectGetWidth(self.frame) * (self.pageCount + 2), CGRectGetHeight(self.frame)); 276 | } else { 277 | _scrollView.contentSize = CGSizeMake(0, CGRectGetHeight(self.frame) * (self.pageCount + 2)); 278 | } 279 | 280 | _scrollView.delegate = self; 281 | for (int i = 0; i < self.pageCount + 2; i++) { 282 | // 添加control,设置偏移位置 283 | CGFloat x = 0; 284 | CGFloat y = 0; 285 | if (self.scrollDirection == GHCarouselMapScrollDirectionHorizontal) { 286 | x = self.frame.size.width * i; 287 | y = 0; 288 | 289 | } else { 290 | _scrollView.contentSize = CGSizeMake(0, CGRectGetHeight(self.frame) * (self.pageCount + 2)); 291 | x = 0; 292 | y = self.frame.size.height * i; 293 | 294 | } 295 | 296 | UIControl *control = [[UIControl alloc] initWithFrame:CGRectMake(x,y, self.frame.size.width, self.frame.size.height)]; 297 | 298 | UIView *pageView = nil; 299 | if (i == 0) { 300 | pageView = [self.dataSource carouselMap:self cellAtIndex:self.pageCount - 1]; 301 | } else if (i == _pageCount + 1){ 302 | pageView = [self.dataSource carouselMap:self cellAtIndex:0]; 303 | }else{ 304 | pageView = [self.dataSource carouselMap:self cellAtIndex:i - 1]; 305 | } 306 | pageView.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height); 307 | 308 | [control addTarget:self action:@selector(clickControl:) forControlEvents:UIControlEventTouchUpInside]; 309 | 310 | [control addSubview:pageView]; 311 | 312 | [_scrollView addSubview:control]; 313 | } 314 | } 315 | return _scrollView; 316 | } 317 | 318 | - (UIPageControl *)pageControl { 319 | if (_pageControl == nil) { 320 | _pageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(0, self.frame.size.height - 50, self.frame.size.width, 50)]; 321 | _pageControl.numberOfPages = _pageCount; 322 | _pageControl.currentPage = 0; 323 | _pageControl.pageIndicatorTintColor = [UIColor whiteColor]; 324 | _pageControl.currentPageIndicatorTintColor = [UIColor orangeColor]; 325 | _pageControl.enabled = YES ; 326 | [_pageControl setBackgroundColor:[[UIColor blackColor] colorWithAlphaComponent:0.2]]; 327 | // [_pageControl addTarget:self action:@selector(pageControlTouched) forControlEvents:UIControlEventValueChanged]; 328 | } 329 | return _pageControl; 330 | } 331 | 332 | 333 | @end 334 | 335 | -------------------------------------------------------------------------------- /GHCarouselMap/GHLoadImagesHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // GHLoadImagesHelper.h 3 | // GHKit 4 | // 5 | // Created by zhaozhiwei on 2019/2/6. 6 | // Copyright © 2019年 GHome. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | typedef void(^GHLoadImagesHelperBlock)(NSArray *imagesArray); 14 | @interface GHLoadImagesHelper : NSObject 15 | 16 | @property (nonatomic , copy) GHLoadImagesHelperBlock actionBlock; 17 | + (instancetype)sharedManager; 18 | 19 | - (void)loadImagesWithArray: (NSArray *)array actionBlock: (GHLoadImagesHelperBlock)actionBlock; 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /GHCarouselMap/GHLoadImagesHelper.m: -------------------------------------------------------------------------------- 1 | // 2 | // GHLoadImagesHelper.m 3 | // GHKit 4 | // 5 | // Created by zhaozhiwei on 2019/2/6. 6 | // Copyright © 2019年 GHome. All rights reserved. 7 | // 8 | 9 | #import "GHLoadImagesHelper.h" 10 | #define globalQueue dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,0) 11 | #define mainQueue dispatch_get_main_queue() 12 | 13 | @interface GHLoadImagesHelper() 14 | @property (nonatomic , strong) NSMutableArray *images; 15 | @end 16 | @implementation GHLoadImagesHelper 17 | 18 | + (instancetype)sharedManager { 19 | 20 | static GHLoadImagesHelper *_instance = nil; 21 | static dispatch_once_t onceToken; 22 | dispatch_once(&onceToken, ^{ 23 | _instance = [[self alloc] init]; 24 | }); 25 | return _instance; 26 | } 27 | 28 | - (void)loadImagesWithArray: (NSArray *)array actionBlock: (GHLoadImagesHelperBlock)actionBlock { 29 | 30 | NSURLSession *session = [NSURLSession sharedSession]; 31 | 32 | for (NSInteger index = 0; index < array.count; index++) { 33 | NSURLSessionDataTask *task = [session dataTaskWithURL:[NSURL URLWithString:array[index]] completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { 34 | 35 | if (!error) { 36 | UIImage *image = [UIImage imageWithData:data]; 37 | [self.images addObject:image]; 38 | if(image != nil){ 39 | dispatch_async(mainQueue,^{ 40 | NSLog(@"图片下载成功"); 41 | actionBlock(self.images); 42 | }); 43 | } else{ 44 | NSLog(@"图片下载出现错误"); 45 | } 46 | } 47 | }]; 48 | [task resume]; 49 | } 50 | } 51 | 52 | - (NSMutableArray *)images { 53 | if (_images == nil) { 54 | _images = [NSMutableArray array]; 55 | } 56 | return _images; 57 | } 58 | @end 59 | -------------------------------------------------------------------------------- /GHCarouselMapDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | D6D5E9A7220D6CC300AD4CDA /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D6D5E9A6220D6CC300AD4CDA /* AppDelegate.m */; }; 11 | D6D5E9AA220D6CC300AD4CDA /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D6D5E9A9220D6CC300AD4CDA /* ViewController.m */; }; 12 | D6D5E9AD220D6CC300AD4CDA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D6D5E9AB220D6CC300AD4CDA /* Main.storyboard */; }; 13 | D6D5E9AF220D6CC400AD4CDA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D6D5E9AE220D6CC400AD4CDA /* Assets.xcassets */; }; 14 | D6D5E9B2220D6CC400AD4CDA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D6D5E9B0220D6CC400AD4CDA /* LaunchScreen.storyboard */; }; 15 | D6D5E9B5220D6CC400AD4CDA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D6D5E9B4220D6CC400AD4CDA /* main.m */; }; 16 | D6D5E9C0220D6CDE00AD4CDA /* GHCarouselMap.m in Sources */ = {isa = PBXBuildFile; fileRef = D6D5E9BD220D6CDE00AD4CDA /* GHCarouselMap.m */; }; 17 | D6D5E9C1220D6CDE00AD4CDA /* GHLoadImagesHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = D6D5E9BE220D6CDE00AD4CDA /* GHLoadImagesHelper.m */; }; 18 | D6D5E9FD221659D200AD4CDA /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = D6D5E9FC221659D200AD4CDA /* README.md */; }; 19 | D6FDF35B2217EB6800219799 /* GHCarouselStyleFirst.m in Sources */ = {isa = PBXBuildFile; fileRef = D6FDF35A2217EB6800219799 /* GHCarouselStyleFirst.m */; }; 20 | D6FDF35E2217ED6900219799 /* GHCarouselStyleSecond.m in Sources */ = {isa = PBXBuildFile; fileRef = D6FDF35D2217ED6900219799 /* GHCarouselStyleSecond.m */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXFileReference section */ 24 | D6D5E9A2220D6CC200AD4CDA /* GHCarouselMapDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GHCarouselMapDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 25 | D6D5E9A5220D6CC300AD4CDA /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 26 | D6D5E9A6220D6CC300AD4CDA /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 27 | D6D5E9A8220D6CC300AD4CDA /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 28 | D6D5E9A9220D6CC300AD4CDA /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 29 | D6D5E9AC220D6CC300AD4CDA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 30 | D6D5E9AE220D6CC400AD4CDA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 31 | D6D5E9B1220D6CC400AD4CDA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 32 | D6D5E9B3220D6CC400AD4CDA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 33 | D6D5E9B4220D6CC400AD4CDA /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 34 | D6D5E9BC220D6CDE00AD4CDA /* GHLoadImagesHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GHLoadImagesHelper.h; sourceTree = ""; }; 35 | D6D5E9BD220D6CDE00AD4CDA /* GHCarouselMap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GHCarouselMap.m; sourceTree = ""; }; 36 | D6D5E9BE220D6CDE00AD4CDA /* GHLoadImagesHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GHLoadImagesHelper.m; sourceTree = ""; }; 37 | D6D5E9BF220D6CDE00AD4CDA /* GHCarouselMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GHCarouselMap.h; sourceTree = ""; }; 38 | D6D5E9FC221659D200AD4CDA /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; }; 39 | D6FDF3592217EB6800219799 /* GHCarouselStyleFirst.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GHCarouselStyleFirst.h; sourceTree = ""; }; 40 | D6FDF35A2217EB6800219799 /* GHCarouselStyleFirst.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GHCarouselStyleFirst.m; sourceTree = ""; }; 41 | D6FDF35C2217ED6900219799 /* GHCarouselStyleSecond.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GHCarouselStyleSecond.h; sourceTree = ""; }; 42 | D6FDF35D2217ED6900219799 /* GHCarouselStyleSecond.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GHCarouselStyleSecond.m; sourceTree = ""; }; 43 | /* End PBXFileReference section */ 44 | 45 | /* Begin PBXFrameworksBuildPhase section */ 46 | D6D5E99F220D6CC200AD4CDA /* Frameworks */ = { 47 | isa = PBXFrameworksBuildPhase; 48 | buildActionMask = 2147483647; 49 | files = ( 50 | ); 51 | runOnlyForDeploymentPostprocessing = 0; 52 | }; 53 | /* End PBXFrameworksBuildPhase section */ 54 | 55 | /* Begin PBXGroup section */ 56 | D6D5E999220D6CC200AD4CDA = { 57 | isa = PBXGroup; 58 | children = ( 59 | D6D5E9BB220D6CDE00AD4CDA /* GHCarouselMap */, 60 | D6D5E9A4220D6CC200AD4CDA /* GHCarouselMapDemo */, 61 | D6D5E9A3220D6CC200AD4CDA /* Products */, 62 | ); 63 | sourceTree = ""; 64 | }; 65 | D6D5E9A3220D6CC200AD4CDA /* Products */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | D6D5E9A2220D6CC200AD4CDA /* GHCarouselMapDemo.app */, 69 | ); 70 | name = Products; 71 | sourceTree = ""; 72 | }; 73 | D6D5E9A4220D6CC200AD4CDA /* GHCarouselMapDemo */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | D6FDF3582217E96400219799 /* Example */, 77 | D6D5E9A5220D6CC300AD4CDA /* AppDelegate.h */, 78 | D6D5E9A6220D6CC300AD4CDA /* AppDelegate.m */, 79 | D6D5E9A8220D6CC300AD4CDA /* ViewController.h */, 80 | D6D5E9A9220D6CC300AD4CDA /* ViewController.m */, 81 | D6D5E9AB220D6CC300AD4CDA /* Main.storyboard */, 82 | D6D5E9AE220D6CC400AD4CDA /* Assets.xcassets */, 83 | D6D5E9B0220D6CC400AD4CDA /* LaunchScreen.storyboard */, 84 | D6D5E9B3220D6CC400AD4CDA /* Info.plist */, 85 | D6D5E9B4220D6CC400AD4CDA /* main.m */, 86 | ); 87 | path = GHCarouselMapDemo; 88 | sourceTree = ""; 89 | }; 90 | D6D5E9BB220D6CDE00AD4CDA /* GHCarouselMap */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | D6D5E9FC221659D200AD4CDA /* README.md */, 94 | D6D5E9BC220D6CDE00AD4CDA /* GHLoadImagesHelper.h */, 95 | D6D5E9BE220D6CDE00AD4CDA /* GHLoadImagesHelper.m */, 96 | D6D5E9BF220D6CDE00AD4CDA /* GHCarouselMap.h */, 97 | D6D5E9BD220D6CDE00AD4CDA /* GHCarouselMap.m */, 98 | ); 99 | path = GHCarouselMap; 100 | sourceTree = ""; 101 | }; 102 | D6FDF3582217E96400219799 /* Example */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | D6FDF3592217EB6800219799 /* GHCarouselStyleFirst.h */, 106 | D6FDF35A2217EB6800219799 /* GHCarouselStyleFirst.m */, 107 | D6FDF35C2217ED6900219799 /* GHCarouselStyleSecond.h */, 108 | D6FDF35D2217ED6900219799 /* GHCarouselStyleSecond.m */, 109 | ); 110 | path = Example; 111 | sourceTree = ""; 112 | }; 113 | /* End PBXGroup section */ 114 | 115 | /* Begin PBXNativeTarget section */ 116 | D6D5E9A1220D6CC200AD4CDA /* GHCarouselMapDemo */ = { 117 | isa = PBXNativeTarget; 118 | buildConfigurationList = D6D5E9B8220D6CC400AD4CDA /* Build configuration list for PBXNativeTarget "GHCarouselMapDemo" */; 119 | buildPhases = ( 120 | D6D5E99E220D6CC200AD4CDA /* Sources */, 121 | D6D5E99F220D6CC200AD4CDA /* Frameworks */, 122 | D6D5E9A0220D6CC200AD4CDA /* Resources */, 123 | ); 124 | buildRules = ( 125 | ); 126 | dependencies = ( 127 | ); 128 | name = GHCarouselMapDemo; 129 | productName = GHCarouselMapDemo; 130 | productReference = D6D5E9A2220D6CC200AD4CDA /* GHCarouselMapDemo.app */; 131 | productType = "com.apple.product-type.application"; 132 | }; 133 | /* End PBXNativeTarget section */ 134 | 135 | /* Begin PBXProject section */ 136 | D6D5E99A220D6CC200AD4CDA /* Project object */ = { 137 | isa = PBXProject; 138 | attributes = { 139 | LastUpgradeCheck = 1010; 140 | ORGANIZATIONNAME = GHome; 141 | TargetAttributes = { 142 | D6D5E9A1220D6CC200AD4CDA = { 143 | CreatedOnToolsVersion = 10.1; 144 | }; 145 | }; 146 | }; 147 | buildConfigurationList = D6D5E99D220D6CC200AD4CDA /* Build configuration list for PBXProject "GHCarouselMapDemo" */; 148 | compatibilityVersion = "Xcode 9.3"; 149 | developmentRegion = en; 150 | hasScannedForEncodings = 0; 151 | knownRegions = ( 152 | en, 153 | Base, 154 | ); 155 | mainGroup = D6D5E999220D6CC200AD4CDA; 156 | productRefGroup = D6D5E9A3220D6CC200AD4CDA /* Products */; 157 | projectDirPath = ""; 158 | projectRoot = ""; 159 | targets = ( 160 | D6D5E9A1220D6CC200AD4CDA /* GHCarouselMapDemo */, 161 | ); 162 | }; 163 | /* End PBXProject section */ 164 | 165 | /* Begin PBXResourcesBuildPhase section */ 166 | D6D5E9A0220D6CC200AD4CDA /* Resources */ = { 167 | isa = PBXResourcesBuildPhase; 168 | buildActionMask = 2147483647; 169 | files = ( 170 | D6D5E9B2220D6CC400AD4CDA /* LaunchScreen.storyboard in Resources */, 171 | D6D5E9AF220D6CC400AD4CDA /* Assets.xcassets in Resources */, 172 | D6D5E9FD221659D200AD4CDA /* README.md in Resources */, 173 | D6D5E9AD220D6CC300AD4CDA /* Main.storyboard in Resources */, 174 | ); 175 | runOnlyForDeploymentPostprocessing = 0; 176 | }; 177 | /* End PBXResourcesBuildPhase section */ 178 | 179 | /* Begin PBXSourcesBuildPhase section */ 180 | D6D5E99E220D6CC200AD4CDA /* Sources */ = { 181 | isa = PBXSourcesBuildPhase; 182 | buildActionMask = 2147483647; 183 | files = ( 184 | D6D5E9C1220D6CDE00AD4CDA /* GHLoadImagesHelper.m in Sources */, 185 | D6D5E9AA220D6CC300AD4CDA /* ViewController.m in Sources */, 186 | D6FDF35E2217ED6900219799 /* GHCarouselStyleSecond.m in Sources */, 187 | D6D5E9C0220D6CDE00AD4CDA /* GHCarouselMap.m in Sources */, 188 | D6D5E9B5220D6CC400AD4CDA /* main.m in Sources */, 189 | D6D5E9A7220D6CC300AD4CDA /* AppDelegate.m in Sources */, 190 | D6FDF35B2217EB6800219799 /* GHCarouselStyleFirst.m in Sources */, 191 | ); 192 | runOnlyForDeploymentPostprocessing = 0; 193 | }; 194 | /* End PBXSourcesBuildPhase section */ 195 | 196 | /* Begin PBXVariantGroup section */ 197 | D6D5E9AB220D6CC300AD4CDA /* Main.storyboard */ = { 198 | isa = PBXVariantGroup; 199 | children = ( 200 | D6D5E9AC220D6CC300AD4CDA /* Base */, 201 | ); 202 | name = Main.storyboard; 203 | sourceTree = ""; 204 | }; 205 | D6D5E9B0220D6CC400AD4CDA /* LaunchScreen.storyboard */ = { 206 | isa = PBXVariantGroup; 207 | children = ( 208 | D6D5E9B1220D6CC400AD4CDA /* Base */, 209 | ); 210 | name = LaunchScreen.storyboard; 211 | sourceTree = ""; 212 | }; 213 | /* End PBXVariantGroup section */ 214 | 215 | /* Begin XCBuildConfiguration section */ 216 | D6D5E9B6220D6CC400AD4CDA /* Debug */ = { 217 | isa = XCBuildConfiguration; 218 | buildSettings = { 219 | ALWAYS_SEARCH_USER_PATHS = NO; 220 | CLANG_ANALYZER_NONNULL = YES; 221 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 222 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 223 | CLANG_CXX_LIBRARY = "libc++"; 224 | CLANG_ENABLE_MODULES = YES; 225 | CLANG_ENABLE_OBJC_ARC = YES; 226 | CLANG_ENABLE_OBJC_WEAK = YES; 227 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 228 | CLANG_WARN_BOOL_CONVERSION = YES; 229 | CLANG_WARN_COMMA = YES; 230 | CLANG_WARN_CONSTANT_CONVERSION = YES; 231 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 232 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 233 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 234 | CLANG_WARN_EMPTY_BODY = YES; 235 | CLANG_WARN_ENUM_CONVERSION = YES; 236 | CLANG_WARN_INFINITE_RECURSION = YES; 237 | CLANG_WARN_INT_CONVERSION = YES; 238 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 239 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 240 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 241 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 242 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 243 | CLANG_WARN_STRICT_PROTOTYPES = YES; 244 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 245 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 246 | CLANG_WARN_UNREACHABLE_CODE = YES; 247 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 248 | CODE_SIGN_IDENTITY = "iPhone Developer"; 249 | COPY_PHASE_STRIP = NO; 250 | DEBUG_INFORMATION_FORMAT = dwarf; 251 | ENABLE_STRICT_OBJC_MSGSEND = YES; 252 | ENABLE_TESTABILITY = YES; 253 | GCC_C_LANGUAGE_STANDARD = gnu11; 254 | GCC_DYNAMIC_NO_PIC = NO; 255 | GCC_NO_COMMON_BLOCKS = YES; 256 | GCC_OPTIMIZATION_LEVEL = 0; 257 | GCC_PREPROCESSOR_DEFINITIONS = ( 258 | "DEBUG=1", 259 | "$(inherited)", 260 | ); 261 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 262 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 263 | GCC_WARN_UNDECLARED_SELECTOR = YES; 264 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 265 | GCC_WARN_UNUSED_FUNCTION = YES; 266 | GCC_WARN_UNUSED_VARIABLE = YES; 267 | IPHONEOS_DEPLOYMENT_TARGET = 12.1; 268 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 269 | MTL_FAST_MATH = YES; 270 | ONLY_ACTIVE_ARCH = YES; 271 | SDKROOT = iphoneos; 272 | }; 273 | name = Debug; 274 | }; 275 | D6D5E9B7220D6CC400AD4CDA /* Release */ = { 276 | isa = XCBuildConfiguration; 277 | buildSettings = { 278 | ALWAYS_SEARCH_USER_PATHS = NO; 279 | CLANG_ANALYZER_NONNULL = YES; 280 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 281 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 282 | CLANG_CXX_LIBRARY = "libc++"; 283 | CLANG_ENABLE_MODULES = YES; 284 | CLANG_ENABLE_OBJC_ARC = YES; 285 | CLANG_ENABLE_OBJC_WEAK = YES; 286 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 287 | CLANG_WARN_BOOL_CONVERSION = YES; 288 | CLANG_WARN_COMMA = YES; 289 | CLANG_WARN_CONSTANT_CONVERSION = YES; 290 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 291 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 292 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 293 | CLANG_WARN_EMPTY_BODY = YES; 294 | CLANG_WARN_ENUM_CONVERSION = YES; 295 | CLANG_WARN_INFINITE_RECURSION = YES; 296 | CLANG_WARN_INT_CONVERSION = YES; 297 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 298 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 299 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 300 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 301 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 302 | CLANG_WARN_STRICT_PROTOTYPES = YES; 303 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 304 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 305 | CLANG_WARN_UNREACHABLE_CODE = YES; 306 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 307 | CODE_SIGN_IDENTITY = "iPhone Developer"; 308 | COPY_PHASE_STRIP = NO; 309 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 310 | ENABLE_NS_ASSERTIONS = NO; 311 | ENABLE_STRICT_OBJC_MSGSEND = YES; 312 | GCC_C_LANGUAGE_STANDARD = gnu11; 313 | GCC_NO_COMMON_BLOCKS = YES; 314 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 315 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 316 | GCC_WARN_UNDECLARED_SELECTOR = YES; 317 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 318 | GCC_WARN_UNUSED_FUNCTION = YES; 319 | GCC_WARN_UNUSED_VARIABLE = YES; 320 | IPHONEOS_DEPLOYMENT_TARGET = 12.1; 321 | MTL_ENABLE_DEBUG_INFO = NO; 322 | MTL_FAST_MATH = YES; 323 | SDKROOT = iphoneos; 324 | VALIDATE_PRODUCT = YES; 325 | }; 326 | name = Release; 327 | }; 328 | D6D5E9B9220D6CC400AD4CDA /* Debug */ = { 329 | isa = XCBuildConfiguration; 330 | buildSettings = { 331 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 332 | CODE_SIGN_STYLE = Automatic; 333 | DEVELOPMENT_TEAM = KZ9JB9ZT4S; 334 | INFOPLIST_FILE = GHCarouselMapDemo/Info.plist; 335 | IPHONEOS_DEPLOYMENT_TARGET = 11.3; 336 | LD_RUNPATH_SEARCH_PATHS = ( 337 | "$(inherited)", 338 | "@executable_path/Frameworks", 339 | ); 340 | PRODUCT_BUNDLE_IDENTIFIER = GHome.GHCarouselMapDemo; 341 | PRODUCT_NAME = "$(TARGET_NAME)"; 342 | TARGETED_DEVICE_FAMILY = "1,2"; 343 | }; 344 | name = Debug; 345 | }; 346 | D6D5E9BA220D6CC400AD4CDA /* Release */ = { 347 | isa = XCBuildConfiguration; 348 | buildSettings = { 349 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 350 | CODE_SIGN_STYLE = Automatic; 351 | DEVELOPMENT_TEAM = KZ9JB9ZT4S; 352 | INFOPLIST_FILE = GHCarouselMapDemo/Info.plist; 353 | IPHONEOS_DEPLOYMENT_TARGET = 11.3; 354 | LD_RUNPATH_SEARCH_PATHS = ( 355 | "$(inherited)", 356 | "@executable_path/Frameworks", 357 | ); 358 | PRODUCT_BUNDLE_IDENTIFIER = GHome.GHCarouselMapDemo; 359 | PRODUCT_NAME = "$(TARGET_NAME)"; 360 | TARGETED_DEVICE_FAMILY = "1,2"; 361 | }; 362 | name = Release; 363 | }; 364 | /* End XCBuildConfiguration section */ 365 | 366 | /* Begin XCConfigurationList section */ 367 | D6D5E99D220D6CC200AD4CDA /* Build configuration list for PBXProject "GHCarouselMapDemo" */ = { 368 | isa = XCConfigurationList; 369 | buildConfigurations = ( 370 | D6D5E9B6220D6CC400AD4CDA /* Debug */, 371 | D6D5E9B7220D6CC400AD4CDA /* Release */, 372 | ); 373 | defaultConfigurationIsVisible = 0; 374 | defaultConfigurationName = Release; 375 | }; 376 | D6D5E9B8220D6CC400AD4CDA /* Build configuration list for PBXNativeTarget "GHCarouselMapDemo" */ = { 377 | isa = XCConfigurationList; 378 | buildConfigurations = ( 379 | D6D5E9B9220D6CC400AD4CDA /* Debug */, 380 | D6D5E9BA220D6CC400AD4CDA /* Release */, 381 | ); 382 | defaultConfigurationIsVisible = 0; 383 | defaultConfigurationName = Release; 384 | }; 385 | /* End XCConfigurationList section */ 386 | }; 387 | rootObject = D6D5E99A220D6CC200AD4CDA /* Project object */; 388 | } 389 | -------------------------------------------------------------------------------- /GHCarouselMapDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /GHCarouselMapDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /GHCarouselMapDemo/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shabake/GHCarouselMapDemo/229b2a08fe212407d13358ba70a7adfb0d6897b9/GHCarouselMapDemo/.DS_Store -------------------------------------------------------------------------------- /GHCarouselMapDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // GHCarouselMapDemo 4 | // 5 | // Created by zhaozhiwei on 2019/2/8. 6 | // Copyright © 2019年 GHome. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /GHCarouselMapDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // GHCarouselMapDemo 4 | // 5 | // Created by zhaozhiwei on 2019/2/8. 6 | // Copyright © 2019年 GHome. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /GHCarouselMapDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /GHCarouselMapDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /GHCarouselMapDemo/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /GHCarouselMapDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /GHCarouselMapDemo/Example/GHCarouselStyleFirst.h: -------------------------------------------------------------------------------- 1 | // 2 | // GHCarouselStyleFirst.h 3 | // GHCarouselMapDemo 4 | // 5 | // Created by zhaozhiwei on 2019/2/16. 6 | // Copyright © 2019年 GHome. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface GHCarouselStyleFirst : UITableViewCell 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /GHCarouselMapDemo/Example/GHCarouselStyleFirst.m: -------------------------------------------------------------------------------- 1 | // 2 | // GHCarouselStyleFirst.m 3 | // GHCarouselMapDemo 4 | // 5 | // Created by zhaozhiwei on 2019/2/16. 6 | // Copyright © 2019年 GHome. All rights reserved. 7 | // 8 | 9 | #import "GHCarouselStyleFirst.h" 10 | #import "GHCarouselMap.h" 11 | #import "GHLoadImagesHelper.h" 12 | 13 | @interface GHCarouselStyleFirst() 14 | @property (nonatomic , strong) GHCarouselMap *carouselMap; 15 | @property (nonatomic , strong) NSArray *images; 16 | @property (nonatomic , strong) NSArray *imagesArray; 17 | @end 18 | @implementation GHCarouselStyleFirst 19 | 20 | - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { 21 | if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { 22 | self.images = @[@"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1549621373192&di=e291e4c71c2cc34fc165dafb48db20a8&imgtype=0&src=http%3A%2F%2Fimg0.ph.126.net%2FtvpBly3va7alxcVrVh29Bg%3D%3D%2F6631447097213070177.jpg", 23 | @"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1549621373192&di=861cce907a3e42a258efa544328ce61f&imgtype=0&src=http%3A%2F%2Fpic.rmb.bdstatic.com%2F3355f30ddd96c669bc481818e9de4b59.jpeg",@"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1549621373192&di=9d3636bb9c72f5a592bc0bced1793258&imgtype=0&src=http%3A%2F%2Fp0.ifengimg.com%2Fpmop%2F2018%2F1105%2F915E16EFDA9722408C74080605A41985CEF19FED_size4183_w2688_h4032.jpeg",@"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1549621373192&di=9f18bb398181bc1d537e46703a27cb1a&imgtype=0&src=http%3A%2F%2Fdingyue.nosdn.127.net%2FdOQah9WP3IDJbRcWxG9mEOFcbuA2ZXwa7j7n4lojUJqbd1535169668843compressflag.jpg"]; 24 | 25 | [[GHLoadImagesHelper sharedManager] loadImagesWithArray:self.images actionBlock:^(NSArray * _Nonnull imagesArray) { 26 | self.imagesArray = imagesArray; 27 | [self.carouselMap reloadData]; 28 | }]; 29 | } 30 | return self; 31 | } 32 | - (void)layoutSubviews { 33 | [super layoutSubviews]; 34 | [self addSubview:self.carouselMap]; 35 | self.carouselMap.frame = self.bounds; 36 | } 37 | 38 | - (NSInteger)countOfCellForCarouselMap:(GHCarouselMap *)carouselMap { 39 | return 4; 40 | } 41 | 42 | - (UIView *)carouselMap:(GHCarouselMap *)carouselMap cellAtIndex:(NSInteger)index { 43 | 44 | UIImageView *imageView = [[UIImageView alloc]init]; 45 | if (self.imagesArray.count > index) { 46 | imageView.image = self.imagesArray[index]; 47 | } else { 48 | return nil; 49 | } 50 | return imageView; 51 | 52 | } 53 | 54 | - (GHCarouselMap *)carouselMap { 55 | if (_carouselMap == nil) { 56 | _carouselMap = [[GHCarouselMap alloc]init]; 57 | _carouselMap.dataSource = self; 58 | _carouselMap.scrollDirection = GHCarouselMapScrollDirectionHorizontal; 59 | } 60 | return _carouselMap; 61 | } 62 | @end 63 | -------------------------------------------------------------------------------- /GHCarouselMapDemo/Example/GHCarouselStyleSecond.h: -------------------------------------------------------------------------------- 1 | // 2 | // GHCarouselStyleSecond.h 3 | // GHCarouselMapDemo 4 | // 5 | // Created by zhaozhiwei on 2019/2/16. 6 | // Copyright © 2019年 GHome. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface GHCarouselStyleSecond : UITableViewCell 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /GHCarouselMapDemo/Example/GHCarouselStyleSecond.m: -------------------------------------------------------------------------------- 1 | // 2 | // GHCarouselStyleSecond.m 3 | // GHCarouselMapDemo 4 | // 5 | // Created by zhaozhiwei on 2019/2/16. 6 | // Copyright © 2019年 GHome. All rights reserved. 7 | // 8 | 9 | #import "GHCarouselStyleSecond.h" 10 | #import "GHCarouselMap.h" 11 | 12 | @interface GHCarouselStyleSecond() 13 | @property (nonatomic , strong) GHCarouselMap *carouselMap; 14 | 15 | @end 16 | 17 | @implementation GHCarouselStyleSecond 18 | 19 | - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { 20 | if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { 21 | self.backgroundColor = [UIColor groupTableViewBackgroundColor]; 22 | } 23 | return self; 24 | } 25 | 26 | - (void)layoutSubviews { 27 | [super layoutSubviews]; 28 | for (UIView *view in self.contentView.subviews) { 29 | [view removeFromSuperview]; 30 | } 31 | [self.contentView addSubview:self.carouselMap]; 32 | self.carouselMap.frame = CGRectMake(10, 10, self.bounds.size.width - 20, self.bounds.size.height - 20); 33 | } 34 | 35 | - (NSInteger)countOfCellForCarouselMap:(GHCarouselMap *)carouselMap { 36 | return 4; 37 | } 38 | 39 | - (UIView *)carouselMap:(GHCarouselMap *)carouselMap cellAtIndex:(NSInteger)index { 40 | 41 | UIView *view = [[UIView alloc]init]; 42 | view.backgroundColor = [UIColor whiteColor]; 43 | UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(20, 10, 200, 40)]; 44 | [view addSubview: label]; 45 | label.textColor = [UIColor darkGrayColor]; 46 | label.text = [NSString stringWithFormat:@" ★ 第%ld张图片我是标题啊",(long)index]; 47 | 48 | UILabel *details = [[UILabel alloc]initWithFrame:CGRectMake(20, 40, 200, 40)]; 49 | [view addSubview: details]; 50 | details.text = @"我是详情"; 51 | 52 | details.textColor = [UIColor orangeColor]; 53 | 54 | UIButton *button = [[UIButton alloc]init]; 55 | button.backgroundColor = [UIColor orangeColor]; 56 | [button setTitle:@"预定" forState:UIControlStateNormal]; 57 | [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 58 | button.titleLabel.font = [UIFont boldSystemFontOfSize:13]; 59 | button.layer.masksToBounds = YES; 60 | button.layer.cornerRadius = 5; 61 | 62 | button.frame = CGRectMake([UIScreen mainScreen].bounds.size.width - 60 -30, (80 - 21 ) *0.5, 60, 21); 63 | [view addSubview: button]; 64 | 65 | return view; 66 | 67 | } 68 | 69 | 70 | - (GHCarouselMap *)carouselMap { 71 | if (_carouselMap == nil) { 72 | _carouselMap = [[GHCarouselMap alloc]init]; 73 | _carouselMap.dataSource = self; 74 | _carouselMap.scrollDirection = GHCarouselMapScrollDirectionVertical; 75 | _carouselMap.layer.masksToBounds = YES; 76 | _carouselMap.layer.cornerRadius = 10; 77 | } 78 | return _carouselMap; 79 | } 80 | 81 | @end 82 | -------------------------------------------------------------------------------- /GHCarouselMapDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSAppTransportSecurity 6 | 7 | NSAllowsArbitraryLoads 8 | 9 | 10 | CFBundleDevelopmentRegion 11 | $(DEVELOPMENT_LANGUAGE) 12 | CFBundleExecutable 13 | $(EXECUTABLE_NAME) 14 | CFBundleIdentifier 15 | $(PRODUCT_BUNDLE_IDENTIFIER) 16 | CFBundleInfoDictionaryVersion 17 | 6.0 18 | CFBundleName 19 | $(PRODUCT_NAME) 20 | CFBundlePackageType 21 | APPL 22 | CFBundleShortVersionString 23 | 1.0 24 | CFBundleVersion 25 | 1 26 | LSRequiresIPhoneOS 27 | 28 | UILaunchStoryboardName 29 | LaunchScreen 30 | UIMainStoryboardFile 31 | Main 32 | UIRequiredDeviceCapabilities 33 | 34 | armv7 35 | 36 | UISupportedInterfaceOrientations 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UISupportedInterfaceOrientations~ipad 43 | 44 | UIInterfaceOrientationPortrait 45 | UIInterfaceOrientationPortraitUpsideDown 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /GHCarouselMapDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // GHCarouselMapDemo 4 | // 5 | // Created by zhaozhiwei on 2019/2/8. 6 | // Copyright © 2019年 GHome. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /GHCarouselMapDemo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // GHKit 4 | // 5 | // Created by zhaozhiwei on 2019/1/26. 6 | // Copyright © 2019年 GHome. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "GHCarouselMap.h" 11 | #import "GHLoadImagesHelper.h" 12 | #import "GHCarouselStyleFirst.h" 13 | #import "GHCarouselStyleSecond.h" 14 | 15 | @interface ViewController () 16 | @property (nonatomic , strong) UITableView *tableView; 17 | @property (nonatomic , strong) NSArray *images; 18 | @property (nonatomic , strong) NSArray *imagesArray; 19 | @property (nonatomic , strong) GHCarouselMap *carouselMap0; 20 | @end 21 | 22 | @implementation ViewController 23 | 24 | - (void)viewDidLoad { 25 | [super viewDidLoad]; 26 | self.navigationItem.title = @"轮播组件"; 27 | if (@available(iOS 11.0, *)) { 28 | [[UIScrollView appearance] setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever]; 29 | } else { 30 | self.automaticallyAdjustsScrollViewInsets = NO; 31 | } 32 | self.view.backgroundColor = [UIColor groupTableViewBackgroundColor]; 33 | [self.view addSubview: self.tableView]; 34 | } 35 | 36 | - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { 37 | UILabel *label = [[UILabel alloc]init]; 38 | label.textAlignment = NSTextAlignmentCenter; 39 | label.backgroundColor = [UIColor whiteColor]; 40 | if (section == 0) { 41 | label.text = @"样式一"; 42 | } else if (section == 1) { 43 | label.text = @"样式二"; 44 | } 45 | return label; 46 | } 47 | 48 | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { 49 | return 44; 50 | } 51 | 52 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 53 | return 2; 54 | } 55 | 56 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 57 | return 1; 58 | } 59 | 60 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 61 | if (indexPath.section == 0) { 62 | GHCarouselStyleFirst *cell = [tableView dequeueReusableCellWithIdentifier:@"GHCarouselStyleFirstID"]; 63 | return cell; 64 | } else if (indexPath.section == 1) { 65 | GHCarouselStyleSecond *cell = [tableView dequeueReusableCellWithIdentifier:@"GHCarouselStyleSecondID"]; 66 | return cell; 67 | } else { 68 | return [UITableViewCell new]; 69 | } 70 | 71 | } 72 | 73 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 74 | if (indexPath.section == 0) { 75 | return 400; 76 | } else if (indexPath.section == 1) { 77 | return 100; 78 | } else { 79 | return 0.01; 80 | } 81 | } 82 | 83 | - (UITableView *)tableView { 84 | if (_tableView == nil) { 85 | _tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 64, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height - 64) style:UITableViewStylePlain]; 86 | _tableView.delegate = self; 87 | _tableView.dataSource = self; 88 | [_tableView registerClass:[GHCarouselStyleFirst class] forCellReuseIdentifier:@"GHCarouselStyleFirstID"]; 89 | [_tableView registerClass:[GHCarouselStyleSecond class] forCellReuseIdentifier:@"GHCarouselStyleSecondID"]; 90 | _tableView.tableFooterView = [UIView new]; 91 | } 92 | return _tableView; 93 | } 94 | @end 95 | -------------------------------------------------------------------------------- /GHCarouselMapDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // GHCarouselMapDemo 4 | // 5 | // Created by zhaozhiwei on 2019/2/8. 6 | // Copyright © 2019年 GHome. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 shabake 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![](https://img.shields.io/badge/platform-iOS-red.svg) ![](https://img.shields.io/badge/language-Objective--C-orange.svg) 2 | ![](https://img.shields.io/badge/license-MIT%20License-brightgreen.svg) 3 | ![](https://img.shields.io/appveyor/ci/gruntjs/grunt.svg) 4 | ![](https://img.shields.io/vscode-marketplace/d/repo.svg) 5 | ![](https://img.shields.io/cocoapods/l/packageName.svg) 6 | 7 | # GHCarouselMapDemo 8 | `超简单无限轮播图组件` `轮播组件` `无限图片轮播` `无限文字轮播` 9 | 10 | 11 | 12 | 13 | 使用方法 14 | 15 | * `GHCarouselMap`拖到项目内,在要使用的控制器包含```#import "GHCarouselMap.h"``` 16 | 17 | 18 | * 遵守协议`GHCarouselMapDelegate` `GHCarouselMapDataSource` 19 | 20 | 21 | * 实现协议 22 | 23 | ``` 24 | /// 返回轮播view个数 25 | - (NSInteger)countOfCellForCarouselMap:(GHCarouselMap *)carouselMap 26 | 27 | /// 返回view 28 | - (UIView *)carouselMap:(GHCarouselMap *)carouselMap cellAtIndex:(NSInteger)index 29 | 30 | ``` 31 | 32 | 33 | * 代理方法 34 | 35 | ``` 36 | /// 返回轮播当前被点击的index 37 | - (void)carouselMap: (GHCarouselMap *) carouselMap didSelectRowAtIndex:(NSInteger)index 38 | 39 | ``` 40 | 41 | `- (void)reloadData` 外部提供对象方法,下载图片完成后刷新轮播图 42 | 43 | 44 | 45 | 46 | `录制gif存在丢帧现象请以真机调试效果为主` 47 | 48 | ![Untitled.gif](https://upload-images.jianshu.io/upload_images/1419035-4d5878282b4d9532.gif?imageMogr2/auto-orient/strip) 49 | 50 | --- 51 | 52 | 53 | ### 在使用中如有任何问题欢迎骚扰我,如果对你有帮助请点帮我一个✨,小弟感激不尽:blush: 54 | --------------------------------------------------------------------------------