From 15ea35c004ef30c66f64481f268a488a4ef1e510 Mon Sep 17 00:00:00 2001 From: wyh Date: Fri, 17 Aug 2018 15:04:53 +0800 Subject: [PATCH] config WyhPageControl code. --- WyhPageControl/WyhPageControl.h | 73 +++ WyhPageControl/WyhPageControl.m | 326 ++++++++++ WyhPageControl/WyhPageControlDot.h | 32 + WyhPageControl/WyhPageControlDot.m | 71 +++ WyhPageControlDemo.xcodeproj/project.pbxproj | 591 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + WyhPageControlDemo/AppDelegate.h | 17 + WyhPageControlDemo/AppDelegate.m | 59 ++ .../AppIcon.appiconset/Contents.json | 98 +++ .../Assets.xcassets/Contents.json | 6 + .../glass.imageset/Contents.json | 21 + .../Assets.xcassets/glass.imageset/glass.png | Bin 0 -> 7578 bytes .../time.imageset/Contents.json | 21 + .../Assets.xcassets/time.imageset/time.png | Bin 0 -> 705 bytes .../time_select.imageset/Contents.json | 21 + .../time_select.imageset/time_select.png | Bin 0 -> 688 bytes .../Base.lproj/LaunchScreen.storyboard | 49 ++ WyhPageControlDemo/Base.lproj/Main.storyboard | 24 + WyhPageControlDemo/Info.plist | 45 ++ WyhPageControlDemo/ViewController.h | 15 + WyhPageControlDemo/ViewController.m | 33 + WyhPageControlDemo/demo/DemoTableViewCell.h | 21 + WyhPageControlDemo/demo/DemoTableViewCell.m | 112 ++++ WyhPageControlDemo/demo/DemoViewController.h | 13 + WyhPageControlDemo/demo/DemoViewController.m | 144 +++++ WyhPageControlDemo/main.m | 16 + WyhPageControlDemoTests/Info.plist | 22 + .../WyhPageControlDemoTests.m | 39 ++ WyhPageControlDemoUITests/Info.plist | 22 + .../WyhPageControlDemoUITests.m | 40 ++ 30 files changed, 1938 insertions(+) create mode 100644 WyhPageControl/WyhPageControl.h create mode 100644 WyhPageControl/WyhPageControl.m create mode 100644 WyhPageControl/WyhPageControlDot.h create mode 100644 WyhPageControl/WyhPageControlDot.m create mode 100644 WyhPageControlDemo.xcodeproj/project.pbxproj create mode 100644 WyhPageControlDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 WyhPageControlDemo/AppDelegate.h create mode 100644 WyhPageControlDemo/AppDelegate.m create mode 100644 WyhPageControlDemo/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 WyhPageControlDemo/Assets.xcassets/Contents.json create mode 100644 WyhPageControlDemo/Assets.xcassets/glass.imageset/Contents.json create mode 100644 WyhPageControlDemo/Assets.xcassets/glass.imageset/glass.png create mode 100644 WyhPageControlDemo/Assets.xcassets/time.imageset/Contents.json create mode 100644 WyhPageControlDemo/Assets.xcassets/time.imageset/time.png create mode 100644 WyhPageControlDemo/Assets.xcassets/time_select.imageset/Contents.json create mode 100644 WyhPageControlDemo/Assets.xcassets/time_select.imageset/time_select.png create mode 100644 WyhPageControlDemo/Base.lproj/LaunchScreen.storyboard create mode 100644 WyhPageControlDemo/Base.lproj/Main.storyboard create mode 100644 WyhPageControlDemo/Info.plist create mode 100644 WyhPageControlDemo/ViewController.h create mode 100644 WyhPageControlDemo/ViewController.m create mode 100644 WyhPageControlDemo/demo/DemoTableViewCell.h create mode 100644 WyhPageControlDemo/demo/DemoTableViewCell.m create mode 100644 WyhPageControlDemo/demo/DemoViewController.h create mode 100644 WyhPageControlDemo/demo/DemoViewController.m create mode 100644 WyhPageControlDemo/main.m create mode 100644 WyhPageControlDemoTests/Info.plist create mode 100644 WyhPageControlDemoTests/WyhPageControlDemoTests.m create mode 100644 WyhPageControlDemoUITests/Info.plist create mode 100644 WyhPageControlDemoUITests/WyhPageControlDemoUITests.m diff --git a/WyhPageControl/WyhPageControl.h b/WyhPageControl/WyhPageControl.h new file mode 100644 index 0000000..73b1b05 --- /dev/null +++ b/WyhPageControl/WyhPageControl.h @@ -0,0 +1,73 @@ +// +// WyhPageControl.h +// NewPagedFlowViewDemo +// +// Created by wyh on 2018/8/16. +// Copyright © 2018年 robertcell.net. All rights reserved. +// + +#import +#import "WyhPageControlDot.h" + +@class WyhPageControl; + +@protocol WyhPageControlDataSource + +@optional + +- (WyhPageControlDot *)pageControl:(WyhPageControl *)pageControl dotForIndex:(NSInteger)index; + +@end + +@protocol WyhPageControlDelegate + +@optional +- (void)pageControl:(WyhPageControl *)pageControl didClickForIndex:(NSInteger)index; + +@end + + + +@interface WyhPageControl : UIView + +@property (nonatomic, assign) NSUInteger numberOfPages; // default is 0 +@property (nonatomic, assign) NSInteger currentPage; // default is 0. value pinned to 0..numberOfPages-1 + +@property (nonatomic, assign) BOOL hidesForSinglePage; // hide the the indicator if there is only one page. default is NO + +@property(nonatomic, strong) UIColor *pageIndicatorTintColor; + +@property(nonatomic, strong) UIColor *currentPageIndicatorTintColor; + +@property (nonatomic, assign) CGFloat dotLeftMargin; // distance left and right outside. + +@property (nonatomic, assign) CGFloat dotTopMargin; // distance top and bottom outside. + +@property (nonatomic, assign) CGFloat dotSpace; //distance between each dot. + +@property (nonatomic, strong) UIImage *backgroundImage; //background image. + +@property (nonatomic, strong) UIColor *backgroundColor; //background color. + +@property (nonatomic, strong) UIColor *borderColor; //pageControl's border-color. + +@property (nonatomic, assign) CGFloat borderWidth; // pageControl's border width. + +@property (nonatomic, assign) CGFloat cornerRadius; // pageControl's cornerRadius. + +@property (nonatomic, assign) BOOL showReloadActivityIndicator; // Whether show activity indicator when reloadData, default is YES. + +- (instancetype)initWithDataSource:(id)dataSource + Delegate:(id)delegate + WithConfiguration:(void(^)(WyhPageControl *pageControl))configuration; + + +- (void)setCurrentPage:(NSInteger)currentPage; + +- (CGSize)sizeForPageControl; + +- (void)reloadData; + + + +@end diff --git a/WyhPageControl/WyhPageControl.m b/WyhPageControl/WyhPageControl.m new file mode 100644 index 0000000..666451d --- /dev/null +++ b/WyhPageControl/WyhPageControl.m @@ -0,0 +1,326 @@ +// +// WyhPageControl.m +// NewPagedFlowViewDemo +// +// Created by wyh on 2018/8/16. +// Copyright © 2018年 robertcell.net. All rights reserved. +// + +#import "WyhPageControl.h" + + +@interface WyhPageControl () + +@property (nonatomic, weak) id dataSource; + +@property (nonatomic, weak) id delegate; + +@property (nonatomic, strong) UIView *coverView; + +@property (nonatomic, strong) UIImageView *coverImageView; + +@property (nonatomic, strong) NSMutableArray* visibleDots; + +@property (nonatomic, strong) UIActivityIndicatorView *indicator; + +@property (nonatomic, assign) BOOL isReloading; + +@end + +@implementation WyhPageControl + +#pragma mark - Life + +- (instancetype)initWithDataSource:(id)dataSource + Delegate:(id)delegate + WithConfiguration:(void (^)(WyhPageControl *))configuration { + if (self = [self init]) { + if(configuration) configuration(self); + _dataSource = dataSource; + _delegate = delegate; + + [self reloadUI]; + } + return self; +} + +- (instancetype)init { + if (self = [super init]) { + [self initializeConfig]; + } + return self; +} + +#pragma mark - Initialize + +- (void)initializeConfig { + self.clipsToBounds = YES; + + _numberOfPages = 0; + _currentPage = 0; + _hidesForSinglePage = NO; + _pageIndicatorTintColor = [UIColor lightGrayColor]; + _currentPageIndicatorTintColor = [UIColor darkGrayColor]; + _backgroundColor = [UIColor clearColor]; + _borderWidth = 0.f; + _cornerRadius = 0.f; + _borderColor = [UIColor darkGrayColor]; + _backgroundImage = nil; + _showReloadActivityIndicator = YES; + + // const + _dotLeftMargin = 15.f; + _dotTopMargin = 8.f; + _dotSpace = 8.f; + + // ui + _coverView = [[UIView alloc]init]; + _coverImageView = [[UIImageView alloc]init]; + _indicator = [[UIActivityIndicatorView alloc]initWithActivityIndicatorStyle:(UIActivityIndicatorViewStyleGray)]; + [_indicator sizeToFit]; + [self addSubview:_coverView]; + [self addSubview:_coverImageView]; + [self addSubview:_indicator]; +} + +#pragma mark - UI + +- (void)showActivity:(BOOL)show { + if (show) { + if (_showReloadActivityIndicator) { + _isReloading = YES; + [self.indicator startAnimating]; + [self.subviews enumerateObjectsUsingBlock:^(__kindof UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + if (![obj isEqual:self.indicator]) { + obj.hidden = YES; + } + }]; + } + }else { + if (_showReloadActivityIndicator) { + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + _isReloading = NO; + [self.indicator stopAnimating]; + [self.subviews enumerateObjectsUsingBlock:^(__kindof UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + if (![obj isEqual:self.indicator]) { + obj.hidden = NO; + } + }]; + }); + } + + } +} + +- (void)reloadUI { + + [self showActivity:YES]; + [self checkHiddenIfNeeded]; + [self configPageControlUI]; + [self initDots]; + [self showActivity:NO]; +} + +- (void)checkHiddenIfNeeded { + + // whether hidden. + if (_hidesForSinglePage && _numberOfPages <= 1) { + self.hidden = YES; + }else { + self.hidden = NO; + } +} + +- (void)configPageControlUI { + + if (_backgroundImage) { + [self.coverImageView setImage:_backgroundImage]; + } + if (_borderWidth > 0) { + self.layer.borderWidth = _borderWidth; + self.layer.borderColor = _borderColor.CGColor; + } + self.layer.cornerRadius = _cornerRadius; + +} + +- (void)initDots { + + [self.visibleDots makeObjectsPerformSelector:@selector(removeFromSuperview)]; + self.visibleDots = [NSMutableArray new]; + + WyhPageControlDot *lastDot ; + + for (int i = 0; i < _numberOfPages; i++) { + + WyhPageControlDot *dot = nil; + + if (![self.dataSource respondsToSelector:@selector(pageControl:dotForIndex:)]) { + dot = [[WyhPageControlDot alloc]init]; + dot.unSelectTintColor = _pageIndicatorTintColor; + dot.selectTintColor = _currentPageIndicatorTintColor; + }else { + dot = [self.dataSource pageControl:self dotForIndex:i]; + } + dot.hidden = _isReloading; + // frame + CGFloat dotX = (!lastDot)?_dotLeftMargin:CGRectGetMaxX(lastDot.frame)+_dotSpace; + dot.frame = CGRectMake(dotX, 0, dot.size.width, dot.size.height); + // gesture + UITapGestureRecognizer *tapges = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(pageControlDotTapAction:)]; + [dot addGestureRecognizer:tapges]; + [self addSubview:dot]; + [self.visibleDots addObject:dot]; + lastDot = dot; + } + [self bringSubviewToFront:self.indicator]; + + [self configDotsUI]; + [self autoConfigBounds]; + [self configAllDotsCenterY]; // must after autoConfigBounds. +} + +- (void)autoConfigBounds { + + __block CGFloat maxHeight = 0.f; + [self.visibleDots enumerateObjectsUsingBlock:^(WyhPageControlDot * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + if (obj.size.height > maxHeight) { + maxHeight = obj.size.height; + } + }]; + + CGFloat width = CGRectGetMaxX(self.visibleDots.lastObject.frame)+_dotLeftMargin; + CGFloat height = maxHeight + 2*_dotTopMargin; + // adjust bounds + self.bounds = CGRectMake(0, 0, width, height); + self.coverView.frame = self.bounds; + self.coverImageView.frame = self.bounds; + self.indicator.frame = self.bounds; +} + +- (void)configAllDotsCenterY { + [self.visibleDots enumerateObjectsUsingBlock:^(WyhPageControlDot * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + CGPoint center = obj.center; + center.y = self.bounds.size.height/2; + obj.center = center; + }]; +} + +- (void)configDotsUI { + + [self.visibleDots enumerateObjectsUsingBlock:^(WyhPageControlDot * _Nonnull dot, NSUInteger idx, BOOL * _Nonnull stop) { + if (dot.borderWidth > 0) { + dot.layer.borderWidth = dot.borderWidth; + dot.layer.borderColor = dot.borderColor.CGColor; + } + dot.layer.cornerRadius = dot.conerRadius; + if (idx == _currentPage) { + [dot setSelected:YES]; + }else { + [dot setSelected:NO]; + } + }]; +} + +#pragma mark - API + +- (void)reloadData { + + [self reloadUI]; +} + +- (void)setCurrentPage:(NSInteger)currentPage { + _currentPage = currentPage; + [self moveToIndex:currentPage]; +} + +- (CGSize)sizeForPageControl { + return self.bounds.size; +} + +#pragma mark - Setter + +- (void)setNumberOfPages:(NSUInteger)numberOfPages { + _numberOfPages = numberOfPages; +} + +- (void)setHidesForSinglePage:(BOOL)hidesForSinglePage { + _hidesForSinglePage = hidesForSinglePage; +} + +- (void)setBackgroundColor:(UIColor *)backgroundColor { + _backgroundColor = backgroundColor; + _coverView.backgroundColor = backgroundColor; +} + +- (void)setPageIndicatorTintColor:(UIColor *)pageIndicatorTintColor { + _pageIndicatorTintColor = pageIndicatorTintColor; +} + +- (void)setCurrentPageIndicatorTintColor:(UIColor *)currentPageIndicatorTintColor { + _currentPageIndicatorTintColor = currentPageIndicatorTintColor; +} + +- (void)setDotLeftMargin:(CGFloat)dotLeftMargin { + _dotLeftMargin = dotLeftMargin; +} + +- (void)setDotTopMargin:(CGFloat)dotTopMargin { + _dotTopMargin = dotTopMargin; +} + +- (void)setDotSpace:(CGFloat)dotSpace { + _dotSpace = dotSpace; +} + +- (void)setBorderWidth:(CGFloat)borderWidth { + _borderWidth = borderWidth; + self.layer.borderWidth = borderWidth; +} + +- (void)setBorderColor:(UIColor *)borderColor { + _borderColor = borderColor; + self.layer.borderColor = borderColor.CGColor; +} + +- (void)setBackgroundImage:(UIImage *)backgroundImage { + _backgroundImage = backgroundImage; + _coverImageView.image = backgroundImage; +} + +- (void)setCornerRadius:(CGFloat)cornerRadius { + _cornerRadius = cornerRadius; + self.layer.cornerRadius = cornerRadius; +} + +#pragma mark - Gesture + +- (void)pageControlDotTapAction:(UITapGestureRecognizer *)tapGes { + WyhPageControlDot *dot = (WyhPageControlDot *)tapGes.view; + NSInteger index = [self.visibleDots indexOfObject:dot]; + if (index == NSNotFound) { + NSAssert(NO, @"Can't found this tap dot !"); + return; + } + + [self moveToIndex:index]; + // call back + if ([self.delegate respondsToSelector:@selector(pageControl:didClickForIndex:)]) { + [self.delegate pageControl:self didClickForIndex:index]; + } +} + +#pragma mark - Private + +- (void)moveToIndex:(NSInteger)index { + _currentPage = index; + [self.visibleDots enumerateObjectsUsingBlock:^(WyhPageControlDot * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + if (idx == index) { + [obj setSelected:YES]; + }else { + [obj setSelected:NO]; + } + }]; +} + +@end diff --git a/WyhPageControl/WyhPageControlDot.h b/WyhPageControl/WyhPageControlDot.h new file mode 100644 index 0000000..39b549e --- /dev/null +++ b/WyhPageControl/WyhPageControlDot.h @@ -0,0 +1,32 @@ +// +// WyhPageControlDot.h +// NewPagedFlowViewDemo +// +// Created by wyh on 2018/8/16. +// Copyright © 2018年 robertcell.net. All rights reserved. +// + +#import + +@interface WyhPageControlDot : UIView + +@property(nonatomic, strong) UIColor *unSelectTintColor; + +@property(nonatomic, strong) UIColor *selectTintColor; + +@property (nonatomic, strong) UIImage *unselectImage; + +@property (nonatomic, strong) UIImage *selectImage; + +@property (nonatomic, assign) CGSize size; // default is (20,20) + +@property (nonatomic, strong) UIColor *borderColor; //defult is nil; + +@property (nonatomic, assign) CGFloat borderWidth; // default is 0.f; + +@property (nonatomic, assign) CGFloat conerRadius; //default is 10.f + +- (void)setSelected:(BOOL)selected; + + +@end diff --git a/WyhPageControl/WyhPageControlDot.m b/WyhPageControl/WyhPageControlDot.m new file mode 100644 index 0000000..a0b5183 --- /dev/null +++ b/WyhPageControl/WyhPageControlDot.m @@ -0,0 +1,71 @@ +// +// WyhPageControlDot.m +// NewPagedFlowViewDemo +// +// Created by wyh on 2018/8/16. +// Copyright © 2018年 robertcell.net. All rights reserved. +// + +#import "WyhPageControlDot.h" + +static CGFloat const _defaultDotWidth = 10.f; + +@interface WyhPageControlDot () + +@property (nonatomic, strong) UIImageView *coverImageView; + +@end + +@implementation WyhPageControlDot + +- (instancetype)init { + if (self = [super init]) { + [self initializeConfig]; + } + return self; +} + +- (void)initializeConfig { + + self.clipsToBounds = YES; + + _coverImageView = [[UIImageView alloc]init]; + [self addSubview:_coverImageView]; + + _unselectImage = nil; + _selectImage = nil; + _conerRadius = _defaultDotWidth/2; + + _unSelectTintColor = [UIColor lightGrayColor]; + _selectTintColor = [UIColor darkGrayColor]; + _borderColor = nil; + + _size = CGSizeMake(_defaultDotWidth, _defaultDotWidth); + +} + +- (void)layoutSubviews { + + _coverImageView.frame = self.bounds; +} + +#pragma mark - API + +- (void)setSelected:(BOOL)selected { + if (selected) { + if (_selectImage) { + self.coverImageView.image = _selectImage; + self.backgroundColor = [UIColor clearColor]; + }else { + self.backgroundColor = _selectTintColor; + } + }else { + if (_unselectImage) { + self.coverImageView.image = _unselectImage; + }else { + self.backgroundColor = _unSelectTintColor; + } + } +} + +@end diff --git a/WyhPageControlDemo.xcodeproj/project.pbxproj b/WyhPageControlDemo.xcodeproj/project.pbxproj new file mode 100644 index 0000000..1aaf37f --- /dev/null +++ b/WyhPageControlDemo.xcodeproj/project.pbxproj @@ -0,0 +1,591 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 48; + objects = { + +/* Begin PBXBuildFile section */ + 0954E9CE2126AAED00C90E69 /* WyhPageControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 0954E9CB2126AAED00C90E69 /* WyhPageControl.m */; }; + 0954E9CF2126AAED00C90E69 /* WyhPageControlDot.m in Sources */ = {isa = PBXBuildFile; fileRef = 0954E9CC2126AAED00C90E69 /* WyhPageControlDot.m */; }; + 09F362382125873F006D4458 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 09F362372125873F006D4458 /* AppDelegate.m */; }; + 09F3623B2125873F006D4458 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 09F3623A2125873F006D4458 /* ViewController.m */; }; + 09F3623E2125873F006D4458 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 09F3623C2125873F006D4458 /* Main.storyboard */; }; + 09F362402125873F006D4458 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 09F3623F2125873F006D4458 /* Assets.xcassets */; }; + 09F362432125873F006D4458 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 09F362412125873F006D4458 /* LaunchScreen.storyboard */; }; + 09F362462125873F006D4458 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 09F362452125873F006D4458 /* main.m */; }; + 09F362502125873F006D4458 /* WyhPageControlDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 09F3624F2125873F006D4458 /* WyhPageControlDemoTests.m */; }; + 09F3625B2125873F006D4458 /* WyhPageControlDemoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 09F3625A2125873F006D4458 /* WyhPageControlDemoUITests.m */; }; + 09F3627221266C25006D4458 /* DemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 09F3627121266C25006D4458 /* DemoViewController.m */; }; + 09F3627521266CC2006D4458 /* DemoTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 09F3627421266CC2006D4458 /* DemoTableViewCell.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 09F3624C2125873F006D4458 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 09F3622B2125873F006D4458 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 09F362322125873F006D4458; + remoteInfo = WyhPageControlDemo; + }; + 09F362572125873F006D4458 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 09F3622B2125873F006D4458 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 09F362322125873F006D4458; + remoteInfo = WyhPageControlDemo; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 0954E9CA2126AAED00C90E69 /* WyhPageControlDot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WyhPageControlDot.h; sourceTree = ""; }; + 0954E9CB2126AAED00C90E69 /* WyhPageControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WyhPageControl.m; sourceTree = ""; }; + 0954E9CC2126AAED00C90E69 /* WyhPageControlDot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WyhPageControlDot.m; sourceTree = ""; }; + 0954E9CD2126AAED00C90E69 /* WyhPageControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WyhPageControl.h; sourceTree = ""; }; + 09F362332125873F006D4458 /* WyhPageControlDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WyhPageControlDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 09F362362125873F006D4458 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 09F362372125873F006D4458 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 09F362392125873F006D4458 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 09F3623A2125873F006D4458 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 09F3623D2125873F006D4458 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 09F3623F2125873F006D4458 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 09F362422125873F006D4458 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 09F362442125873F006D4458 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 09F362452125873F006D4458 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 09F3624B2125873F006D4458 /* WyhPageControlDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WyhPageControlDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 09F3624F2125873F006D4458 /* WyhPageControlDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WyhPageControlDemoTests.m; sourceTree = ""; }; + 09F362512125873F006D4458 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 09F362562125873F006D4458 /* WyhPageControlDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WyhPageControlDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 09F3625A2125873F006D4458 /* WyhPageControlDemoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WyhPageControlDemoUITests.m; sourceTree = ""; }; + 09F3625C2125873F006D4458 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 09F3627021266C25006D4458 /* DemoViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DemoViewController.h; sourceTree = ""; }; + 09F3627121266C25006D4458 /* DemoViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DemoViewController.m; sourceTree = ""; }; + 09F3627321266CC2006D4458 /* DemoTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DemoTableViewCell.h; sourceTree = ""; }; + 09F3627421266CC2006D4458 /* DemoTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DemoTableViewCell.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 09F362302125873F006D4458 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09F362482125873F006D4458 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09F362532125873F006D4458 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0954E9C92126AAED00C90E69 /* WyhPageControl */ = { + isa = PBXGroup; + children = ( + 0954E9CA2126AAED00C90E69 /* WyhPageControlDot.h */, + 0954E9CB2126AAED00C90E69 /* WyhPageControl.m */, + 0954E9CC2126AAED00C90E69 /* WyhPageControlDot.m */, + 0954E9CD2126AAED00C90E69 /* WyhPageControl.h */, + ); + path = WyhPageControl; + sourceTree = SOURCE_ROOT; + }; + 09F3622A2125873F006D4458 = { + isa = PBXGroup; + children = ( + 09F362352125873F006D4458 /* WyhPageControlDemo */, + 09F3624E2125873F006D4458 /* WyhPageControlDemoTests */, + 09F362592125873F006D4458 /* WyhPageControlDemoUITests */, + 09F362342125873F006D4458 /* Products */, + ); + sourceTree = ""; + }; + 09F362342125873F006D4458 /* Products */ = { + isa = PBXGroup; + children = ( + 09F362332125873F006D4458 /* WyhPageControlDemo.app */, + 09F3624B2125873F006D4458 /* WyhPageControlDemoTests.xctest */, + 09F362562125873F006D4458 /* WyhPageControlDemoUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 09F362352125873F006D4458 /* WyhPageControlDemo */ = { + isa = PBXGroup; + children = ( + 09F362362125873F006D4458 /* AppDelegate.h */, + 09F362372125873F006D4458 /* AppDelegate.m */, + 09F362392125873F006D4458 /* ViewController.h */, + 09F3623A2125873F006D4458 /* ViewController.m */, + 0954E9C92126AAED00C90E69 /* WyhPageControl */, + 09F3626F21266BFE006D4458 /* demo */, + 09F3623C2125873F006D4458 /* Main.storyboard */, + 09F3623F2125873F006D4458 /* Assets.xcassets */, + 09F362412125873F006D4458 /* LaunchScreen.storyboard */, + 09F362442125873F006D4458 /* Info.plist */, + 09F362452125873F006D4458 /* main.m */, + ); + path = WyhPageControlDemo; + sourceTree = ""; + }; + 09F3624E2125873F006D4458 /* WyhPageControlDemoTests */ = { + isa = PBXGroup; + children = ( + 09F3624F2125873F006D4458 /* WyhPageControlDemoTests.m */, + 09F362512125873F006D4458 /* Info.plist */, + ); + path = WyhPageControlDemoTests; + sourceTree = ""; + }; + 09F362592125873F006D4458 /* WyhPageControlDemoUITests */ = { + isa = PBXGroup; + children = ( + 09F3625A2125873F006D4458 /* WyhPageControlDemoUITests.m */, + 09F3625C2125873F006D4458 /* Info.plist */, + ); + path = WyhPageControlDemoUITests; + sourceTree = ""; + }; + 09F3626F21266BFE006D4458 /* demo */ = { + isa = PBXGroup; + children = ( + 09F3627021266C25006D4458 /* DemoViewController.h */, + 09F3627121266C25006D4458 /* DemoViewController.m */, + 09F3627321266CC2006D4458 /* DemoTableViewCell.h */, + 09F3627421266CC2006D4458 /* DemoTableViewCell.m */, + ); + path = demo; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 09F362322125873F006D4458 /* WyhPageControlDemo */ = { + isa = PBXNativeTarget; + buildConfigurationList = 09F3625F2125873F006D4458 /* Build configuration list for PBXNativeTarget "WyhPageControlDemo" */; + buildPhases = ( + 09F3622F2125873F006D4458 /* Sources */, + 09F362302125873F006D4458 /* Frameworks */, + 09F362312125873F006D4458 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = WyhPageControlDemo; + productName = WyhPageControlDemo; + productReference = 09F362332125873F006D4458 /* WyhPageControlDemo.app */; + productType = "com.apple.product-type.application"; + }; + 09F3624A2125873F006D4458 /* WyhPageControlDemoTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 09F362622125873F006D4458 /* Build configuration list for PBXNativeTarget "WyhPageControlDemoTests" */; + buildPhases = ( + 09F362472125873F006D4458 /* Sources */, + 09F362482125873F006D4458 /* Frameworks */, + 09F362492125873F006D4458 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 09F3624D2125873F006D4458 /* PBXTargetDependency */, + ); + name = WyhPageControlDemoTests; + productName = WyhPageControlDemoTests; + productReference = 09F3624B2125873F006D4458 /* WyhPageControlDemoTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 09F362552125873F006D4458 /* WyhPageControlDemoUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 09F362652125873F006D4458 /* Build configuration list for PBXNativeTarget "WyhPageControlDemoUITests" */; + buildPhases = ( + 09F362522125873F006D4458 /* Sources */, + 09F362532125873F006D4458 /* Frameworks */, + 09F362542125873F006D4458 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 09F362582125873F006D4458 /* PBXTargetDependency */, + ); + name = WyhPageControlDemoUITests; + productName = WyhPageControlDemoUITests; + productReference = 09F362562125873F006D4458 /* WyhPageControlDemoUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 09F3622B2125873F006D4458 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0920; + ORGANIZATIONNAME = wyh; + TargetAttributes = { + 09F362322125873F006D4458 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Automatic; + }; + 09F3624A2125873F006D4458 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Automatic; + TestTargetID = 09F362322125873F006D4458; + }; + 09F362552125873F006D4458 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Automatic; + TestTargetID = 09F362322125873F006D4458; + }; + }; + }; + buildConfigurationList = 09F3622E2125873F006D4458 /* Build configuration list for PBXProject "WyhPageControlDemo" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 09F3622A2125873F006D4458; + productRefGroup = 09F362342125873F006D4458 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 09F362322125873F006D4458 /* WyhPageControlDemo */, + 09F3624A2125873F006D4458 /* WyhPageControlDemoTests */, + 09F362552125873F006D4458 /* WyhPageControlDemoUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 09F362312125873F006D4458 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 09F362432125873F006D4458 /* LaunchScreen.storyboard in Resources */, + 09F362402125873F006D4458 /* Assets.xcassets in Resources */, + 09F3623E2125873F006D4458 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09F362492125873F006D4458 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09F362542125873F006D4458 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 09F3622F2125873F006D4458 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 09F3623B2125873F006D4458 /* ViewController.m in Sources */, + 0954E9CE2126AAED00C90E69 /* WyhPageControl.m in Sources */, + 09F3627521266CC2006D4458 /* DemoTableViewCell.m in Sources */, + 09F362462125873F006D4458 /* main.m in Sources */, + 0954E9CF2126AAED00C90E69 /* WyhPageControlDot.m in Sources */, + 09F3627221266C25006D4458 /* DemoViewController.m in Sources */, + 09F362382125873F006D4458 /* AppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09F362472125873F006D4458 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 09F362502125873F006D4458 /* WyhPageControlDemoTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 09F362522125873F006D4458 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 09F3625B2125873F006D4458 /* WyhPageControlDemoUITests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 09F3624D2125873F006D4458 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 09F362322125873F006D4458 /* WyhPageControlDemo */; + targetProxy = 09F3624C2125873F006D4458 /* PBXContainerItemProxy */; + }; + 09F362582125873F006D4458 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 09F362322125873F006D4458 /* WyhPageControlDemo */; + targetProxy = 09F362572125873F006D4458 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 09F3623C2125873F006D4458 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 09F3623D2125873F006D4458 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 09F362412125873F006D4458 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 09F362422125873F006D4458 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 09F3625D2125873F006D4458 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.2; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 09F3625E2125873F006D4458 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.2; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 09F362602125873F006D4458 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = WyhPageControlDemo/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.wyh.www.WyhPageControlDemo; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 09F362612125873F006D4458 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = WyhPageControlDemo/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.wyh.www.WyhPageControlDemo; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 09F362632125873F006D4458 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = WyhPageControlDemoTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.wyh.www.WyhPageControlDemoTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WyhPageControlDemo.app/WyhPageControlDemo"; + }; + name = Debug; + }; + 09F362642125873F006D4458 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = WyhPageControlDemoTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.wyh.www.WyhPageControlDemoTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WyhPageControlDemo.app/WyhPageControlDemo"; + }; + name = Release; + }; + 09F362662125873F006D4458 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = WyhPageControlDemoUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.wyh.www.WyhPageControlDemoUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = WyhPageControlDemo; + }; + name = Debug; + }; + 09F362672125873F006D4458 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = WyhPageControlDemoUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.wyh.www.WyhPageControlDemoUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = WyhPageControlDemo; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 09F3622E2125873F006D4458 /* Build configuration list for PBXProject "WyhPageControlDemo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 09F3625D2125873F006D4458 /* Debug */, + 09F3625E2125873F006D4458 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 09F3625F2125873F006D4458 /* Build configuration list for PBXNativeTarget "WyhPageControlDemo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 09F362602125873F006D4458 /* Debug */, + 09F362612125873F006D4458 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 09F362622125873F006D4458 /* Build configuration list for PBXNativeTarget "WyhPageControlDemoTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 09F362632125873F006D4458 /* Debug */, + 09F362642125873F006D4458 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 09F362652125873F006D4458 /* Build configuration list for PBXNativeTarget "WyhPageControlDemoUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 09F362662125873F006D4458 /* Debug */, + 09F362672125873F006D4458 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 09F3622B2125873F006D4458 /* Project object */; +} diff --git a/WyhPageControlDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/WyhPageControlDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..fc952ff --- /dev/null +++ b/WyhPageControlDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/WyhPageControlDemo/AppDelegate.h b/WyhPageControlDemo/AppDelegate.h new file mode 100644 index 0000000..24bd43a --- /dev/null +++ b/WyhPageControlDemo/AppDelegate.h @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// WyhPageControlDemo +// +// Created by wyh on 2018/8/16. +// Copyright © 2018年 wyh. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git a/WyhPageControlDemo/AppDelegate.m b/WyhPageControlDemo/AppDelegate.m new file mode 100644 index 0000000..78d4153 --- /dev/null +++ b/WyhPageControlDemo/AppDelegate.m @@ -0,0 +1,59 @@ +// +// AppDelegate.m +// WyhPageControlDemo +// +// Created by wyh on 2018/8/16. +// Copyright © 2018年 wyh. All rights reserved. +// + +#import "AppDelegate.h" +#import "DemoViewController.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + + self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds]; + self.window.backgroundColor = [UIColor whiteColor]; + [self.window makeKeyAndVisible]; + UINavigationController *navi = [[UINavigationController alloc]initWithRootViewController:[DemoViewController new]]; + self.window.rootViewController = navi; + + return YES; +} + + +- (void)applicationWillResignActive:(UIApplication *)application { + // 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. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. +} + + +- (void)applicationDidEnterBackground:(UIApplication *)application { + // 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. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + + +- (void)applicationWillEnterForeground:(UIApplication *)application { + // 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. +} + + +- (void)applicationDidBecomeActive:(UIApplication *)application { + // 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. +} + + +- (void)applicationWillTerminate:(UIApplication *)application { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + + +@end diff --git a/WyhPageControlDemo/Assets.xcassets/AppIcon.appiconset/Contents.json b/WyhPageControlDemo/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/WyhPageControlDemo/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/WyhPageControlDemo/Assets.xcassets/Contents.json b/WyhPageControlDemo/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/WyhPageControlDemo/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/WyhPageControlDemo/Assets.xcassets/glass.imageset/Contents.json b/WyhPageControlDemo/Assets.xcassets/glass.imageset/Contents.json new file mode 100644 index 0000000..1d58997 --- /dev/null +++ b/WyhPageControlDemo/Assets.xcassets/glass.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "glass.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/WyhPageControlDemo/Assets.xcassets/glass.imageset/glass.png b/WyhPageControlDemo/Assets.xcassets/glass.imageset/glass.png new file mode 100644 index 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(_f zf}M$jTxfY=>Hw$!7RW|6`&?z!Rf6HkRk@MO2os*!+r$1AcK}~kUwOER*Il$eTATC5 z5ojTs=og>Z4XTWfeUB0csX`yCj$(@lMy?AcQf7xiMU*CE7{SuiGn=o!3C%}odQ3Gc z+%B4vjnd4EUnHZ~jP$Rtb0lb3>iWw78WFc`>z6H!pas5`atywMg-87tvI)~lw`OH( z!C6uHn);qy89;58>6J)-8OAl4YgHM%K6q_$x0I#m{%rRPR5)s)_Q0T=N==&2~YFL KOXku4v-&>~f2-{P literal 0 HcmV?d00001 diff --git a/WyhPageControlDemo/Assets.xcassets/time.imageset/Contents.json b/WyhPageControlDemo/Assets.xcassets/time.imageset/Contents.json new file mode 100644 index 0000000..3078332 --- /dev/null +++ b/WyhPageControlDemo/Assets.xcassets/time.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "time.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/WyhPageControlDemo/Assets.xcassets/time.imageset/time.png b/WyhPageControlDemo/Assets.xcassets/time.imageset/time.png new file mode 100644 index 0000000000000000000000000000000000000000..f844e4b07a0d6446798658005ca88e3ae5f5e89b GIT binary patch literal 705 zcmV;y0zUnTP)?-~TXh)M27v6v;^Pr&CK^RGyC?vAq;5IfVlWSz{Z%pB65R> z4g(k>A_1^!tz99ar_B5(Z3k0T?0McL$8pL4&Ljwb0N`n@UneEd6YRR~PNmcwfU`+L zUG~LhvpH5Sm;c7a#eyr9$^mQbJ0cp+2yMBG$PdSHE*6W$pHcCV;F+139gRlg3xM!j z_Ps=8C6~(`&*$^?Zjnf^F=n2KM&pPg^4(f{St<1Z!1Z34iO5T4zM2R&#+)Ofg#@uV zW*)CpDib2|D5)hPa-NyrxBG3X*ch`+L?^Zwyu{2Sv0&GA4=JU-rKliN#cPLcU;BUF zQL!0}Nn7YyD(hy94a|{w#p}c7R1>nwjs$fy2vU(+TWOL_}Jxo|>B469mE0 z2>UGnH{16```GVH^LY&?A{VM=oWdTnExRccC@L~e61R#j=6_H~^ zw7UyD%gndqDh^xpI0ZPfi-_D~=4vE3eD;WFHM44p0HxIaLZR?05*%(CV?Gnn$rM^y zT$Z)g9h#eNF3 z>h=0pB07>%Jkl-mvlyzlt~;!hdJEuSKk&W=fpyU2=Ds@B03H99ElgLwO*-IdXvgFA66fHEiHg&y6u>3&BdMV~99EOw6u3 z5lu-cr-cyri(10W$BF1|f8MH!wbn}ja9}OL0I+C`8P5evDVsuwFC{9dRI$~IqG)^n zIUlH4N_kxfad$ny%sfp*4-@SHuu^Ik5ihS3c!r3sWrDTV_Oe*D1Je^pHka@FTOG&o zGUAsI@nZjfW`0UU=kmZ$0N`J6$Z?t{q7!*>-}lcrj`N~4SV}n~gt%Iw)ogbvB6f0e z_W{6`6nK`1uH>z;ZP9}waGiJ@$2Z#T_PtE7efC_}U8y5nV$4os%#Td4{i(J72ml95 z2vtd0GR6#OuDZFDQil-nLlxB$x#Px|#i3Vbuj*3Asszxc%o$@Q)47?ilTvB}0DMNo zy(Psn(<(oURwW36u{e%jBjWCw@aje&0V$<6Bcg44k=IJk?L8t+)UrPPN(FWhNq8Yintz5YgVxiM{=4*Rs>;JYI8qTQvJR@k$lf0pyJt8Tc<+ WH5V@VQ*1{70000 + + + + + + + + + + + + + HelveticaNeue-BoldItalic + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WyhPageControlDemo/Base.lproj/Main.storyboard b/WyhPageControlDemo/Base.lproj/Main.storyboard new file mode 100644 index 0000000..d7c78a1 --- /dev/null +++ b/WyhPageControlDemo/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WyhPageControlDemo/Info.plist b/WyhPageControlDemo/Info.plist new file mode 100644 index 0000000..16be3b6 --- /dev/null +++ b/WyhPageControlDemo/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/WyhPageControlDemo/ViewController.h b/WyhPageControlDemo/ViewController.h new file mode 100644 index 0000000..b802818 --- /dev/null +++ b/WyhPageControlDemo/ViewController.h @@ -0,0 +1,15 @@ +// +// ViewController.h +// WyhPageControlDemo +// +// Created by wyh on 2018/8/16. +// Copyright © 2018年 wyh. All rights reserved. +// + +#import + +@interface ViewController : UIViewController + + +@end + diff --git a/WyhPageControlDemo/ViewController.m b/WyhPageControlDemo/ViewController.m new file mode 100644 index 0000000..7c0c071 --- /dev/null +++ b/WyhPageControlDemo/ViewController.m @@ -0,0 +1,33 @@ +// +// ViewController.m +// WyhPageControlDemo +// +// Created by wyh on 2018/8/16. +// Copyright © 2018年 wyh. All rights reserved. +// + +#import "ViewController.h" +#import "WyhPageControl.h" + + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. + +} + + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + + +@end diff --git a/WyhPageControlDemo/demo/DemoTableViewCell.h b/WyhPageControlDemo/demo/DemoTableViewCell.h new file mode 100644 index 0000000..1b30390 --- /dev/null +++ b/WyhPageControlDemo/demo/DemoTableViewCell.h @@ -0,0 +1,21 @@ +// +// DemoTableViewCell.h +// WyhPageControlDemo +// +// Created by wyh on 2018/8/17. +// Copyright © 2018年 wyh. All rights reserved. +// + +#import + +#import "WyhPageControl.h" + +@interface DemoTableViewCell : UITableViewCell + +@property (nonatomic, strong) WyhPageControl *pageControl; + +@property (nonatomic, assign) NSInteger indexStyle; + +- (void)configCellStyle:(void(^)(DemoTableViewCell *))configuration; + +@end diff --git a/WyhPageControlDemo/demo/DemoTableViewCell.m b/WyhPageControlDemo/demo/DemoTableViewCell.m new file mode 100644 index 0000000..4ac1ea8 --- /dev/null +++ b/WyhPageControlDemo/demo/DemoTableViewCell.m @@ -0,0 +1,112 @@ +// +// DemoTableViewCell.m +// WyhPageControlDemo +// +// Created by wyh on 2018/8/17. +// Copyright © 2018年 wyh. All rights reserved. +// + +#import "DemoTableViewCell.h" + + +@interface DemoTableViewCell () + + +@end + +@implementation DemoTableViewCell + +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { + + if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { + [self configUI]; + } + return self; +} + +- (void)configUI { + self.contentView.backgroundColor = [UIColor whiteColor]; + + self.pageControl = [[WyhPageControl alloc]initWithDataSource:self Delegate:self WithConfiguration:^(WyhPageControl *pageControl) { + // initialize some config + }]; + [self.contentView addSubview:self.pageControl]; +} + +- (void)configCellStyle:(void (^)(DemoTableViewCell *))configuration { + + if (configuration) { + configuration(self); + } + [self.pageControl reloadData]; +} + +- (void)layoutSubviews { + self.pageControl.center = self.contentView.center; +} + +#pragma mark - delegate + +- (WyhPageControlDot *)pageControl:(WyhPageControl *)pageControl dotForIndex:(NSInteger)index { + + WyhPageControlDot *dot = [[WyhPageControlDot alloc]init]; + switch (_indexStyle) { + case 0: + { + // defalut style. + } break; + case 1: + { + if (index == pageControl.numberOfPages -1) { + dot.size = CGSizeMake(35, 35); + dot.conerRadius = 17.5; + dot.unselectImage = [UIImage imageNamed:@"time"]; + dot.selectImage = [UIImage imageNamed:@"time_select"]; + } + } break; + case 2: + { + dot.size = CGSizeMake(25.f, 8.f); + dot.conerRadius = 4.f; + dot.unSelectTintColor = [UIColor purpleColor]; + dot.selectTintColor = [UIColor blueColor]; + } break; + case 3: + { + pageControl.cornerRadius = (pageControl.dotTopMargin*2+20)*0.5; + pageControl.dotTopMargin = 15.f; + pageControl.dotLeftMargin = 25.f; + dot.size = CGSizeMake(20.f, 20.f); + dot.conerRadius = 2.f; + dot.unSelectTintColor = [UIColor whiteColor]; + dot.selectTintColor = [UIColor darkGrayColor]; + } break; + case 4: + { + pageControl.cornerRadius = (pageControl.dotTopMargin*2+15.f)*0.5; + dot.size = CGSizeMake(15.f, 15.f); + dot.conerRadius = 7.5; + } break; + default: + break; + } + return dot; +} + +- (void)pageControl:(WyhPageControl *)pageControl didClickForIndex:(NSInteger)index { + + NSLog(@"点击第%ld行 第%ld个dot",_indexStyle+1,index+1); +} + +- (void)awakeFromNib { + [super awakeFromNib]; + // Initialization code +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +@end diff --git a/WyhPageControlDemo/demo/DemoViewController.h b/WyhPageControlDemo/demo/DemoViewController.h new file mode 100644 index 0000000..e3086b4 --- /dev/null +++ b/WyhPageControlDemo/demo/DemoViewController.h @@ -0,0 +1,13 @@ +// +// DemoViewController.h +// WyhPageControlDemo +// +// Created by wyh on 2018/8/17. +// Copyright © 2018年 wyh. All rights reserved. +// + +#import + +@interface DemoViewController : UIViewController + +@end diff --git a/WyhPageControlDemo/demo/DemoViewController.m b/WyhPageControlDemo/demo/DemoViewController.m new file mode 100644 index 0000000..ced57f6 --- /dev/null +++ b/WyhPageControlDemo/demo/DemoViewController.m @@ -0,0 +1,144 @@ +// +// DemoViewController.m +// WyhPageControlDemo +// +// Created by wyh on 2018/8/17. +// Copyright © 2018年 wyh. All rights reserved. +// + +#import "DemoViewController.h" +#import "DemoTableViewCell.h" + +@interface DemoViewController () + +@property (nonatomic, strong) UITableView *tableView; + +@property (nonatomic, assign) BOOL isReload; + +@end + +@implementation DemoViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + + UITableView *table = [[UITableView alloc]initWithFrame:self.view.bounds style:(UITableViewStyleGrouped)]; + self.tableView = table; + table.dataSource = self; + table.delegate = self; + [self.view addSubview:table]; + + UIView *header = [[UIView alloc]initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 50)]; + table.tableHeaderView = header; + + self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Reload" style:(UIBarButtonItemStylePlain) target:self action:@selector(reload)]; + +} + +- (void)reload { + _isReload = !_isReload; + [self.tableView reloadData]; +} + +#pragma mark - Delegate + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 5; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return 1; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { + return 100.f; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { + return 20.f; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + DemoTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"]; + if (!cell) { + cell = [[DemoTableViewCell alloc]initWithStyle:(UITableViewCellStyleDefault) reuseIdentifier:@"cell"]; + } + cell.selectionStyle = 0; + cell.indexStyle = indexPath.section; + [cell configCellStyle:^(DemoTableViewCell *cell) { + switch (indexPath.section) { + case 0: + { + cell.pageControl.numberOfPages = (!_isReload)?3:7; + + } break; + case 1: + { + cell.pageControl.numberOfPages = (!_isReload)?4:3; + } break; + case 2: + { + cell.pageControl.currentPage = 2; + cell.pageControl.numberOfPages = (!_isReload)?5:3; + } break; + case 3: + { + cell.pageControl.numberOfPages = (!_isReload)?3:5; + cell.pageControl.currentPage = 2; + cell.pageControl.backgroundColor = [UIColor colorWithWhite:0 alpha:0.3]; + } break; + case 4: + { + cell.pageControl.numberOfPages = (!_isReload)?6:3; + cell.pageControl.dotSpace = 20.f; + cell.pageControl.backgroundImage = [UIImage imageNamed:@"glass"]; + } break; + default: + break; + } + }]; + return cell; +} + +- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { + + switch (section) { + case 0: + { + return @"Default"; + } break; + case 1: + { + return @"Custom Image"; + } break; + case 2: + { + return @"Square"; + } break; + case 3: + { + return @"Background Color"; + } break; + case 4: + { + return @"Background Image"; + } break; + default: + break; + } + return @""; +} + + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/WyhPageControlDemo/main.m b/WyhPageControlDemo/main.m new file mode 100644 index 0000000..d702fed --- /dev/null +++ b/WyhPageControlDemo/main.m @@ -0,0 +1,16 @@ +// +// main.m +// WyhPageControlDemo +// +// Created by wyh on 2018/8/16. +// Copyright © 2018年 wyh. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/WyhPageControlDemoTests/Info.plist b/WyhPageControlDemoTests/Info.plist new file mode 100644 index 0000000..6c40a6c --- /dev/null +++ b/WyhPageControlDemoTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/WyhPageControlDemoTests/WyhPageControlDemoTests.m b/WyhPageControlDemoTests/WyhPageControlDemoTests.m new file mode 100644 index 0000000..8322d68 --- /dev/null +++ b/WyhPageControlDemoTests/WyhPageControlDemoTests.m @@ -0,0 +1,39 @@ +// +// WyhPageControlDemoTests.m +// WyhPageControlDemoTests +// +// Created by wyh on 2018/8/16. +// Copyright © 2018年 wyh. All rights reserved. +// + +#import + +@interface WyhPageControlDemoTests : XCTestCase + +@end + +@implementation WyhPageControlDemoTests + +- (void)setUp { + [super setUp]; + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +- (void)testExample { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. +} + +- (void)testPerformanceExample { + // This is an example of a performance test case. + [self measureBlock:^{ + // Put the code you want to measure the time of here. + }]; +} + +@end diff --git a/WyhPageControlDemoUITests/Info.plist b/WyhPageControlDemoUITests/Info.plist new file mode 100644 index 0000000..6c40a6c --- /dev/null +++ b/WyhPageControlDemoUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/WyhPageControlDemoUITests/WyhPageControlDemoUITests.m b/WyhPageControlDemoUITests/WyhPageControlDemoUITests.m new file mode 100644 index 0000000..09329a6 --- /dev/null +++ b/WyhPageControlDemoUITests/WyhPageControlDemoUITests.m @@ -0,0 +1,40 @@ +// +// WyhPageControlDemoUITests.m +// WyhPageControlDemoUITests +// +// Created by wyh on 2018/8/16. +// Copyright © 2018年 wyh. All rights reserved. +// + +#import + +@interface WyhPageControlDemoUITests : XCTestCase + +@end + +@implementation WyhPageControlDemoUITests + +- (void)setUp { + [super setUp]; + + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + self.continueAfterFailure = NO; + // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. + [[[XCUIApplication alloc] init] launch]; + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +- (void)testExample { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. +} + +@end