├── CDDPagerControllerDemo ├── Podfile.lock ├── Pods │ ├── Manifest.lock │ ├── Target Support Files │ │ └── Pods-CDDPagerControllerDemo │ │ │ ├── Pods-CDDPagerControllerDemo-acknowledgements.markdown │ │ │ ├── Pods-CDDPagerControllerDemo-dummy.m │ │ │ ├── Pods-CDDPagerControllerDemo.debug.xcconfig │ │ │ ├── Pods-CDDPagerControllerDemo.release.xcconfig │ │ │ ├── Pods-CDDPagerControllerDemo-acknowledgements.plist │ │ │ ├── Pods-CDDPagerControllerDemo-resources.sh │ │ │ └── Pods-CDDPagerControllerDemo-frameworks.sh │ └── Pods.xcodeproj │ │ └── project.pbxproj ├── Podfile ├── CDDPagerControllerDemo.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── project.pbxproj ├── CDDPagerControllerDemo.xcworkspace │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── contents.xcworkspacedata └── CDDPagerControllerDemo │ ├── ViewController.h │ ├── DCDemo02ViewController.h │ ├── DCDemo03ViewController.h │ ├── DCDemo04ViewController.h │ ├── DCDemo05ViewController.h │ ├── DCDemo01ViewController.h │ ├── AppDelegate.h │ ├── main.m │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── DCDemo03ViewController.m │ ├── Info.plist │ ├── DCDemo04ViewController.m │ ├── DCDemo02ViewController.m │ ├── AppDelegate.m │ ├── DCDemo05ViewController.m │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── DCDemo01ViewController.m │ └── ViewController.m ├── CDDPagerController ├── Expand(扩展) │ ├── Const(常量) │ │ ├── DCPagerConsts.m │ │ └── DCPagerConsts.h │ ├── Macros(宏) │ │ ├── DCPageKit.h │ │ └── DCPagerMacros.h │ └── Category(分类) │ │ ├── UIView+DCPagerFrame.h │ │ └── UIView+DCPagerFrame.m ├── View │ ├── DCPagerProgressView.h │ └── DCPagerProgressView.m └── Controller │ ├── DCPagerController.h │ └── DCPagerController.m ├── CDDPagerController.podspec ├── .gitignore ├── README.md └── LICENSE /CDDPagerControllerDemo/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODFILE CHECKSUM: c8e7070aa1a139d39ee865cf1d48a2b27b400b98 2 | 3 | COCOAPODS: 1.5.0 4 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODFILE CHECKSUM: c8e7070aa1a139d39ee865cf1d48a2b27b400b98 2 | 3 | COCOAPODS: 1.5.0 4 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'CDDPagerControllerDemo' do 5 | 6 | #pod 'CDDPagerController' 7 | 8 | end 9 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/Pods/Target Support Files/Pods-CDDPagerControllerDemo/Pods-CDDPagerControllerDemo-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/Pods/Target Support Files/Pods-CDDPagerControllerDemo/Pods-CDDPagerControllerDemo-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_CDDPagerControllerDemo : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_CDDPagerControllerDemo 5 | @end 6 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // CDDPagerControllerDemo 4 | // 5 | // Created by apple on 2017/9/5. 6 | // Copyright © 2017年 RocketsChen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo/DCDemo02ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCDemo02ViewController.h 3 | // DCDisplayViewController 4 | // 5 | // Created by dashen on 2017/9/5. 6 | // Copyright © 2017年 RocketsChen. All rights reserved. 7 | // 8 | 9 | #import "DCPageKit.h" 10 | 11 | @interface DCDemo02ViewController : DCPagerController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo/DCDemo03ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCDemo03ViewController.h 3 | // DCDisplayViewController 4 | // 5 | // Created by dashen on 2017/9/5. 6 | // Copyright © 2017年 RocketsChen. All rights reserved. 7 | // 8 | 9 | #import "DCPageKit.h" 10 | 11 | @interface DCDemo03ViewController : DCPagerController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo/DCDemo04ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCDemo04ViewController.h 3 | // DCDisplayViewController 4 | // 5 | // Created by dashen on 2017/9/5. 6 | // Copyright © 2017年 RocketsChen. All rights reserved. 7 | // 8 | 9 | #import "DCPageKit.h" 10 | 11 | @interface DCDemo04ViewController : DCPagerController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo/DCDemo05ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCDemo05ViewController.h 3 | // CDDPagerControllerDemo 4 | // 5 | // Created by apple on 2017/9/7. 6 | // Copyright © 2017年 RocketsChen. All rights reserved. 7 | // 8 | 9 | #import "DCPageKit.h" 10 | 11 | @interface DCDemo05ViewController : DCPagerController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo/DCDemo01ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCDemoViewController.h 3 | // DCDisplayViewController 4 | // 5 | // Created by apple on 2017/9/3. 6 | // Copyright © 2017年 RocketsChen. All rights reserved. 7 | // 8 | 9 | #import "DCPageKit.h" 10 | 11 | 12 | @interface DCDemo01ViewController : DCPagerController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/Pods/Target Support Files/Pods-CDDPagerControllerDemo/Pods-CDDPagerControllerDemo.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | OTHER_LDFLAGS = $(inherited) -ObjC 3 | PODS_BUILD_DIR = ${BUILD_DIR} 4 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 5 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 6 | PODS_ROOT = ${SRCROOT}/Pods 7 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/Pods/Target Support Files/Pods-CDDPagerControllerDemo/Pods-CDDPagerControllerDemo.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | OTHER_LDFLAGS = $(inherited) -ObjC 3 | PODS_BUILD_DIR = ${BUILD_DIR} 4 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 5 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 6 | PODS_ROOT = ${SRCROOT}/Pods 7 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // CDDPagerControllerDemo 4 | // 5 | // Created by apple on 2017/9/5. 6 | // Copyright © 2017年 RocketsChen. 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 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // CDDPagerControllerDemo 4 | // 5 | // Created by apple on 2017/9/5. 6 | // Copyright © 2017年 RocketsChen. 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 | -------------------------------------------------------------------------------- /CDDPagerController/Expand(扩展)/Const(常量)/DCPagerConsts.m: -------------------------------------------------------------------------------- 1 | // 2 | // DCPagerConsts.m 3 | // CDDPagerController 4 | // 5 | // Created by apple on 2017/9/5. 6 | // Copyright © 2017年 RocketsChen. All rights reserved. 7 | // 8 | 9 | #import "DCPagerConsts.h" 10 | 11 | @implementation DCPagerConsts 12 | 13 | /** 常量数 */ 14 | CGFloat const DCPagerMargin = 10; 15 | 16 | /** 按钮tag附加值 */ 17 | CGFloat const DCButtonTagValue = 100; 18 | 19 | /** 默认标题栏高度 */ 20 | CGFloat const DCNormalTitleViewH = 44; 21 | 22 | /** 下划线默认高度 */ 23 | CGFloat const DCUnderLineH = 4; 24 | 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /CDDPagerController/View/DCPagerProgressView.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCPagerProgressView.h 3 | // CDDPagerController 4 | // 5 | // Created by apple on 2017/9/5. 6 | // Copyright © 2017年 RocketsChen. All rights reserved. 7 | // 8 | 9 | 10 | #import 11 | 12 | @interface DCPagerProgressView : UIView 13 | 14 | /** 进度条 */ 15 | @property (nonatomic, assign) CGFloat progress; 16 | /** 尺寸 */ 17 | @property (nonatomic, strong) NSMutableArray *itemFrames; 18 | /** 颜色 */ 19 | @property (nonatomic, assign) CGColorRef color; 20 | 21 | /** 是否拉伸 */ 22 | @property (nonatomic, assign) BOOL isStretch; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /CDDPagerController/Expand(扩展)/Const(常量)/DCPagerConsts.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCPagerConsts.h 3 | // CDDPagerController 4 | // 5 | // Created by apple on 2017/9/5. 6 | // Copyright © 2017年 RocketsChen. All rights reserved. 7 | // 8 | 9 | 10 | 11 | #import 12 | 13 | @interface DCPagerConsts : NSObject 14 | 15 | 16 | /** 常量数 */ 17 | UIKIT_EXTERN CGFloat const DCPagerMargin; 18 | 19 | /** 按钮tag附加值 */ 20 | UIKIT_EXTERN CGFloat const DCButtonTagValue; 21 | 22 | /** 默认标题栏高度 */ 23 | UIKIT_EXTERN CGFloat const DCNormalTitleViewH; 24 | 25 | /** 下划线默认高度 */ 26 | UIKIT_EXTERN CGFloat const DCUnderLineH; 27 | 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /CDDPagerController/Expand(扩展)/Macros(宏)/DCPageKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCPageKit.h 3 | // CDDPagerControllerDemo 4 | // 5 | // Created by 陈甸甸 on 2018/5/7. 6 | // Copyright © 2018年 RocketsChen. All rights reserved. 7 | // 之前有人给我提issue 说页面的单词是page 不是 pager。当时也忘记是怎么想的了写了pager。考虑到目前框架有固定的 8 | // 使用。就不做大的改动新增一个DCPageKit。 9 | // GitHub项目地址:https://github.com/RocketsChen/CDDPagerController 10 | 11 | #ifndef DCPageKit_h 12 | #define DCPageKit_h 13 | 14 | #import "DCPagerController.h" 15 | 16 | #import "UIView+DCPagerFrame.h" 17 | #import "DCPagerProgressView.h" 18 | #import "DCPagerConsts.h" 19 | #import "DCPagerMacros.h" 20 | 21 | #endif /* DCPageKit_h */ 22 | -------------------------------------------------------------------------------- /CDDPagerController.podspec: -------------------------------------------------------------------------------- 1 | 2 | Pod::Spec.new do |s| 3 | s.name = 'CDDPagerController' 4 | s.version = '1.1.7' 5 | s.summary = 'A very useful father-son controller small frame' 6 | s.description = "CDDKit is a very useful wrapper class" 7 | s.homepage = 'https://github.com/RocketsChen/CDDPagerController' 8 | s.license = { :type => "MIT", :file => "LICENSE" } 9 | s.authors = {'RcoketsChen' => '1062749739@qq.com'} 10 | s.platform = :ios, '8.0' 11 | s.source = {:git => 'https://github.com/RocketsChen/CDDPagerController.git', :tag => '1.1.7'} 12 | s.source_files = "CDDPagerController", "CDDPagerController/**/*" 13 | s.requires_arc = true 14 | 15 | s.framework = "UIKit" 16 | 17 | end 18 | -------------------------------------------------------------------------------- /CDDPagerController/Expand(扩展)/Category(分类)/UIView+DCPagerFrame.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+DCPagerFrame.h 3 | // CDDPagerController 4 | // 5 | // Created by apple on 2017/9/5. 6 | // Copyright © 2017年 RocketsChen. All rights reserved. 7 | // 8 | 9 | 10 | #import 11 | 12 | @interface UIView (DCPagerFrame) 13 | 14 | 15 | @property (nonatomic , assign) CGFloat dc_width; 16 | @property (nonatomic , assign) CGFloat dc_height; 17 | @property (nonatomic , assign) CGSize dc_size; 18 | @property (nonatomic , assign) CGFloat dc_x; 19 | @property (nonatomic , assign) CGFloat dc_y; 20 | @property (nonatomic , assign) CGPoint dc_origin; 21 | @property (nonatomic , assign) CGFloat dc_centerX; 22 | @property (nonatomic , assign) CGFloat dc_centerY; 23 | @property (nonatomic , assign) CGFloat dc_right; 24 | @property (nonatomic , assign) CGFloat dc_bottom; 25 | 26 | - (BOOL)intersectWithView:(UIView *)view; 27 | 28 | + (instancetype)dc_viewFromXib; 29 | - (BOOL)isShowingOnKeyWindow; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/Pods/Target Support Files/Pods-CDDPagerControllerDemo/Pods-CDDPagerControllerDemo-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo/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 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /CDDPagerController/Expand(扩展)/Macros(宏)/DCPagerMacros.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCPagerMacros.h 3 | // CDDPagerController 4 | // 5 | // Created by apple on 2017/9/5. 6 | // Copyright © 2017年 RocketsChen. All rights reserved. 7 | // 8 | 9 | #ifndef DCPagerMacros_h 10 | #define DCPagerMacros_h 11 | 12 | 13 | #define DIV_UUID [[[UIDevice currentDevice] identifierForVendor] UUIDString] 14 | 15 | /** 默认标题字体 */ 16 | #define DCTitleNorFont [UIFont systemFontOfSize:15] 17 | 18 | /** 屏幕高度 */ 19 | #define ScreenH [UIScreen mainScreen].bounds.size.height 20 | /** 屏幕宽度 */ 21 | #define ScreenW [UIScreen mainScreen].bounds.size.width 22 | 23 | //色值 24 | #define RGBA(r,g,b,a) [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:a] 25 | #define RGB(r,g,b) RGBA(r,g,b,1.0f) 26 | 27 | #define HEXCOLOR(hex) [UIColor colorWithRed:((float)((hex & 0xFF0000) >> 16)) / 255.0 green:((float)((hex & 0xFF00) >> 8)) / 255.0 blue:((float)(hex & 0xFF)) / 255.0 alpha:1] 28 | 29 | #define RandColor RGB(arc4random_uniform(255), arc4random_uniform(255), arc4random_uniform(255)) 30 | 31 | 32 | #endif /* DCPagerMacros_h */ 33 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo/DCDemo03ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DCDemo03ViewController.m 3 | // DCDisplayViewController 4 | // 5 | // Created by dashen on 2017/9/5. 6 | // Copyright © 2017年 RocketsChen. All rights reserved. 7 | // 8 | 9 | #import "DCDemo03ViewController.h" 10 | 11 | // Controllers 12 | 13 | // Models 14 | 15 | // Views 16 | 17 | // Vendors 18 | 19 | // Categories 20 | 21 | // Others 22 | 23 | @interface DCDemo03ViewController () 24 | 25 | 26 | 27 | @end 28 | 29 | @implementation DCDemo03ViewController 30 | 31 | #pragma mark - LazyLoad 32 | 33 | #pragma mark - LifeCyle 34 | - (void)viewDidLoad { 35 | 36 | [super viewDidLoad]; 37 | 38 | [self setUpAllChildViewController]; 39 | 40 | } 41 | 42 | #pragma mark - 添加所有子控制器 43 | - (void)setUpAllChildViewController 44 | { 45 | NSArray *titles = @[@"测试01",@"测试02",@"测试03"]; 46 | for (NSInteger i = 0; i < titles.count; i++) { 47 | UIViewController *vc = [UIViewController new]; 48 | vc.title = titles[i]; 49 | vc.view.backgroundColor = RandColor; //随机色 50 | [self addChildViewController:vc]; 51 | } 52 | } 53 | 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | CDDPagerControllerDemo 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /.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 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 | -------------------------------------------------------------------------------- /CDDPagerController/Controller/DCPagerController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCPagerController.h 3 | // CDDPagerController 4 | // 5 | // Created by apple on 2017/9/5. 6 | // Copyright © 2017年 RocketsChen. All rights reserved. 7 | // 8 | #import 9 | 10 | #import "DCPageKit.h" 11 | 12 | @interface DCPagerController : UIViewController 13 | 14 | 15 | /** 16 | 根据角标,跳转到对应的控制器(viewWillAppear方法里实现) 17 | */ 18 | @property (nonatomic, assign) NSInteger selectIndex; 19 | 20 | /* 标题滚动视图 */ 21 | @property (strong ,nonatomic )UIScrollView *titleScrollView; 22 | 23 | /** 24 | 字体缩放 25 | */ 26 | - (void)setUpTitleScale:(void(^)(CGFloat *titleScale))titleScaleBlock; 27 | 28 | /** 29 | progress设置 30 | *topDistance 设置ScrollView距离顶部的间距 31 | *titleViewHeight 设置ScrollView的高度 32 | *bottomDistance 设置标题和下方子控制器的间距(默认0)!!!建议不要和topDistance一起用 33 | */ 34 | - (void)setUpTopTitleViewAttribute:(void(^)(CGFloat *topDistance, CGFloat *titleViewHeight, CGFloat *bottomDistance))settingTopTitleViewBlock; 35 | 36 | /** 37 | progress设置 38 | *progressLength 设置progress长度 39 | *progressHeight 设置progress高度 40 | */ 41 | - (void)setUpProgressAttribute:(void(^)(CGFloat *progressLength, CGFloat *progressHeight))settingProgressBlock; 42 | 43 | 44 | /** 45 | 初始化 46 | 47 | *titleScrollViewBgColor 标题背景色 48 | *norColor 标题字体未选中状态下颜色 49 | *selColor 标题字体选中状态下颜色 50 | *proColor 字体下方指示器颜色 51 | *titleFont 标题字体大小 52 | *titleButtonWidth 标题按钮的宽度 53 | *isShowPregressView 是否开启字体下方指示器 54 | *isOpenStretch 是否开启指示器拉伸效果 55 | *isOpenShade 是否开启字体渐变效果 56 | 57 | @param BaseSettingBlock 设置基本属性 58 | */ 59 | - (void)setUpDisplayStyle:(void(^)(UIColor **titleScrollViewBgColor,UIColor **norColor,UIColor **selColor,UIColor **proColor,UIFont **titleFont,CGFloat *titleButtonWidth,BOOL *isShowPregressView,BOOL *isOpenStretch,BOOL *isOpenShade))BaseSettingBlock; 60 | 61 | /** 62 | 刷新标题和整个界面,在调用之前,需要获取到所有的子控制器。 63 | */ 64 | - (void)setUpRefreshDisplay; 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo/DCDemo04ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DCDemo04ViewController.m 3 | // DCDisplayViewController 4 | // 5 | // Created by dashen on 2017/9/5. 6 | // Copyright © 2017年 RocketsChen. All rights reserved. 7 | // 8 | 9 | #import "DCDemo04ViewController.h" 10 | 11 | // Controllers 12 | 13 | // Models 14 | 15 | // Views 16 | 17 | // Vendors 18 | 19 | // Categories 20 | 21 | // Others 22 | 23 | @interface DCDemo04ViewController () 24 | 25 | 26 | 27 | @end 28 | 29 | @implementation DCDemo04ViewController 30 | 31 | #pragma mark - LazyLoad 32 | 33 | #pragma mark - LifeCyle 34 | - (void)viewDidLoad { 35 | 36 | [super viewDidLoad]; 37 | 38 | [self setUpAllChildViewController]; 39 | 40 | 41 | [self setUpDisplayStyle:^(UIColor *__autoreleasing *titleScrollViewBgColor, UIColor *__autoreleasing *norColor, UIColor *__autoreleasing *selColor, UIColor *__autoreleasing *proColor, UIFont *__autoreleasing *titleFont, CGFloat *titleButtonWidth, BOOL *isShowPregressView, BOOL *isOpenStretch, BOOL *isOpenShade) { 42 | 43 | *selColor = [UIColor orangeColor]; 44 | 45 | *isOpenShade = YES; 46 | *isShowPregressView = YES; 47 | }]; 48 | 49 | 50 | 51 | [self setUpTitleScale:^(CGFloat *titleScale) { //titleScale范围在0到1之间 <0 或者 > 1 则默认不缩放 默认设置titleScale就开启缩放,不设置则关闭 52 | *titleScale = 0.3; 53 | }]; 54 | } 55 | 56 | #pragma mark - 添加所有子控制器 57 | - (void)setUpAllChildViewController 58 | { 59 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ //模拟网络延迟 60 | 61 | NSArray *titles = @[@"测试01",@"测试02",@"测试03",@"测试04",@"测试05",@"测试06",@"测试07",@"测试08",@"测试09"]; 62 | for (NSInteger i = 0; i < titles.count; i++) { 63 | UIViewController *vc = [UIViewController new]; 64 | vc.title = titles[i]; 65 | vc.view.backgroundColor = RandColor; //随机色 66 | [self addChildViewController:vc]; 67 | } 68 | [self setUpRefreshDisplay]; //刷新 69 | }); 70 | } 71 | 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo/DCDemo02ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DCDemo02ViewController.m 3 | // DCDisplayViewController 4 | // 5 | // Created by dashen on 2017/9/5. 6 | // Copyright © 2017年 RocketsChen. All rights reserved. 7 | // 8 | 9 | #import "DCDemo02ViewController.h" 10 | 11 | // Controllers 12 | 13 | // Models 14 | 15 | // Views 16 | 17 | // Vendors 18 | 19 | // Categories 20 | 21 | // Others 22 | 23 | @interface DCDemo02ViewController () 24 | 25 | 26 | 27 | @end 28 | 29 | @implementation DCDemo02ViewController 30 | 31 | #pragma mark - LazyLoad 32 | 33 | 34 | 35 | -(void)viewWillAppear:(BOOL)animated 36 | { 37 | [super viewWillAppear:animated]; 38 | 39 | NSLog(@"selectIndex : %zd",self.selectIndex); 40 | self.selectIndex = 2; //默认选择第几个设置(不设置则默认选择第0个) 41 | 42 | } 43 | 44 | #pragma mark - LifeCyle 45 | - (void)viewDidLoad { 46 | 47 | [super viewDidLoad]; 48 | 49 | [self setUpAllChildViewController]; 50 | 51 | [self setUpDisplayStyle:^(UIColor *__autoreleasing *titleScrollViewBgColor, UIColor *__autoreleasing *norColor, UIColor *__autoreleasing *selColor, UIColor *__autoreleasing *proColor, UIFont *__autoreleasing *titleFont, CGFloat *titleButtonWidth, BOOL *isShowPregressView, BOOL *isOpenStretch, BOOL *isOpenShade) { 52 | *titleFont = [UIFont systemFontOfSize:13]; 53 | /* 54 | 以下BOOL值默认都为NO 55 | */ 56 | *isShowPregressView = YES; //是否开启标题下部Pregress指示器 57 | *isOpenStretch = YES; //是否开启指示器拉伸效果 58 | *isOpenShade = YES; //是否开启字体渐变 59 | 60 | *titleButtonWidth = 60; //有默认值 61 | }]; 62 | 63 | 64 | } 65 | 66 | #pragma mark - 添加所有子控制器 67 | - (void)setUpAllChildViewController 68 | { 69 | NSArray *titles = @[@"测试01",@"测试02",@"测试03",@"测试04"]; 70 | for (NSInteger i = 0; i < titles.count; i++) { 71 | UIViewController *vc = [UIViewController new]; 72 | vc.title = titles[i]; 73 | vc.view.backgroundColor = RandColor; //随机色 74 | [self addChildViewController:vc]; 75 | } 76 | 77 | 78 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 79 | UIViewController *newVc = [UIViewController new]; 80 | newVc.view.backgroundColor = [UIColor lightGrayColor]; 81 | newVc.title = @"测试返回角标"; 82 | [self.navigationController pushViewController:newVc animated:true]; 83 | }); 84 | } 85 | 86 | @end 87 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // CDDPagerControllerDemo 4 | // 5 | // Created by apple on 2017/9/5. 6 | // Copyright © 2017年 RocketsChen. 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 | 21 | [self setUpFixiOS11]; //适配iOS 11 22 | 23 | return YES; 24 | } 25 | 26 | 27 | #pragma mark - 适配 28 | - (void)setUpFixiOS11 29 | { 30 | if (@available(ios 11.0,*)) { 31 | UIScrollView.appearance.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; 32 | UITableView.appearance.estimatedRowHeight = 0; 33 | UITableView.appearance.estimatedSectionFooterHeight = 0; 34 | UITableView.appearance.estimatedSectionHeaderHeight = 0; 35 | } 36 | } 37 | 38 | 39 | - (void)applicationWillResignActive:(UIApplication *)application { 40 | // 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. 41 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 42 | } 43 | 44 | 45 | - (void)applicationDidEnterBackground:(UIApplication *)application { 46 | // 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. 47 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 48 | } 49 | 50 | 51 | - (void)applicationWillEnterForeground:(UIApplication *)application { 52 | // 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. 53 | } 54 | 55 | 56 | - (void)applicationDidBecomeActive:(UIApplication *)application { 57 | // 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. 58 | } 59 | 60 | 61 | - (void)applicationWillTerminate:(UIApplication *)application { 62 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 63 | } 64 | 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo/DCDemo05ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DCDemo05ViewController.m 3 | // CDDPagerControllerDemo 4 | // 5 | // Created by apple on 2017/9/7. 6 | // Copyright © 2017年 RocketsChen. All rights reserved. 7 | // 8 | 9 | #import "DCDemo05ViewController.h" 10 | 11 | // Controllers 12 | 13 | // Models 14 | 15 | // Views 16 | 17 | // Vendors 18 | 19 | // Categories 20 | 21 | // Others 22 | 23 | @interface DCDemo05ViewController () 24 | 25 | 26 | 27 | @end 28 | 29 | @implementation DCDemo05ViewController 30 | 31 | #pragma mark - LazyLoad 32 | 33 | 34 | - (void)viewDidLoad { 35 | 36 | [super viewDidLoad]; 37 | 38 | [self setUpAllChildViewController]; 39 | 40 | 41 | [self setUpDisplayStyle:^(UIColor *__autoreleasing *titleScrollViewBgColor, UIColor *__autoreleasing *norColor, UIColor *__autoreleasing *selColor, UIColor *__autoreleasing *proColor, UIFont *__autoreleasing *titleFont, CGFloat *titleButtonWidth, BOOL *isShowPregressView, BOOL *isOpenStretch, BOOL *isOpenShade) { 42 | *titleScrollViewBgColor = [UIColor whiteColor]; //标题View背景色(默认标题背景色为白色) 43 | *norColor = [UIColor darkGrayColor]; //标题未选中颜色(默认未选中状态下字体颜色为黑色) 44 | *selColor = [UIColor orangeColor]; //标题选中颜色(默认选中状态下字体颜色为红色) 45 | *titleFont = [UIFont systemFontOfSize:18]; //字体尺寸 (默认fontSize为15) 46 | 47 | /* 48 | 以下BOOL值默认都为NO 49 | */ 50 | *isShowPregressView = YES; //是否开启标题下部Pregress指示器 51 | *isOpenStretch = YES; //是否开启指示器拉伸效果 52 | *isOpenShade = YES; //是否开启字体渐变 53 | }]; 54 | 55 | 56 | [self setUpTitleScale:^(CGFloat *titleScale) { //titleScale范围在0到1之间 <0 或者 > 1 则默认不缩放 默认设置titleScale就开启缩放,不设置则关闭 57 | *titleScale = 0.2; 58 | }]; 59 | 60 | 61 | [self setUpProgressAttribute:^(CGFloat *progressLength, CGFloat *progressHeight) {//progressLength 设置底部progress指示器的长度,有默认值为按钮的宽度的百分之56 progressHeight默认高度4(并且不能大于10) 62 | *progressLength = 40; 63 | *progressHeight = 5; 64 | }]; 65 | 66 | [self setUpTopTitleViewAttribute:^(CGFloat *topDistance, CGFloat *titleViewHeight, CGFloat *bottomDistance) { 67 | // *topDistance = 150; 68 | *titleViewHeight = 55; 69 | *bottomDistance = 50; 70 | }]; 71 | } 72 | 73 | #pragma mark - 添加所有子控制器 74 | - (void)setUpAllChildViewController 75 | { 76 | NSArray *titles = @[@"测试01",@"测试02",@"测试03",@"测试04",@"测试05"]; 77 | for (NSInteger i = 0; i < titles.count; i++) { 78 | UIViewController *vc = [UIViewController new]; 79 | vc.title = titles[i]; 80 | vc.view.backgroundColor = RandColor; //随机色 81 | [self addChildViewController:vc]; 82 | } 83 | } 84 | 85 | @end 86 | -------------------------------------------------------------------------------- /CDDPagerController/View/DCPagerProgressView.m: -------------------------------------------------------------------------------- 1 | // 2 | // DCPagerProgressView.m 3 | // CDDPagerController 4 | // 5 | // Created by apple on 2017/9/5. 6 | // Copyright © 2017年 RocketsChen. All rights reserved. 7 | // 8 | 9 | 10 | #import "DCPagerProgressView.h" 11 | 12 | 13 | @interface DCPagerProgressView () 14 | @end 15 | 16 | @implementation DCPagerProgressView 17 | 18 | #pragma mark - 初始化 19 | - (instancetype)initWithFrame:(CGRect)frame 20 | { 21 | if (self = [super initWithFrame:frame]) { 22 | 23 | [self setUpUI]; 24 | } 25 | return self; 26 | } 27 | 28 | #pragma mark - initialize 29 | - (void)setUpUI{} 30 | 31 | #pragma mark - 颜色 32 | - (CGColorRef)color 33 | { 34 | if (!_color) self.color = [UIColor whiteColor].CGColor; 35 | return _color; 36 | } 37 | 38 | #pragma mark - 进度条 39 | - (void)setProgress:(CGFloat)progress 40 | { 41 | _progress = progress; 42 | [self setNeedsDisplay]; 43 | } 44 | 45 | #pragma mark - 作画 46 | - (void)drawRect:(CGRect)rect 47 | { 48 | [super drawRect:rect]; 49 | 50 | CGContextRef ctx = UIGraphicsGetCurrentContext(); 51 | CGFloat height = self.frame.size.height; 52 | int index = (int)self.progress; 53 | index = (index <= self.itemFrames.count - 1) ? index : (int)self.itemFrames.count - 1; 54 | CGFloat rate = self.progress - index; 55 | CGRect currentFrame = [self.itemFrames[index] CGRectValue]; 56 | CGFloat currentWidth = currentFrame.size.width; 57 | int nextIndex = index + 1 < self.itemFrames.count ? index + 1 : index; 58 | CGFloat nextWidth = [self.itemFrames[nextIndex] CGRectValue].size.width; 59 | 60 | CGFloat currentX = currentFrame.origin.x; 61 | CGFloat nextX = [self.itemFrames[nextIndex] CGRectValue].origin.x; 62 | CGFloat startX = currentX + (nextX - currentX) * rate; 63 | CGFloat width = currentWidth + (nextWidth - currentWidth)*rate; 64 | CGFloat endX = startX + width; 65 | 66 | CGFloat nextMaxX = nextX + nextWidth; 67 | 68 | if (_isStretch) //开启拉伸效果 69 | { 70 | if (rate <= 0.5) { 71 | startX = currentX ; 72 | CGFloat currentMaxX = currentX + currentWidth; 73 | endX = currentMaxX + (nextMaxX - currentMaxX) * rate * 2.0; 74 | } else { 75 | startX = currentX + (nextX - currentX) * (rate - 0.5) * 2.0; 76 | CGFloat nextMaxX = nextX + nextWidth; 77 | endX = nextMaxX ; 78 | } 79 | } 80 | 81 | width = endX - startX; 82 | CGFloat lineWidth = 1.0; 83 | CGFloat cornerRadius = (height >= 4) ? 2.0 : 1.0; 84 | UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(startX, lineWidth / 2.0, width, height - lineWidth) cornerRadius:cornerRadius]; 85 | CGContextAddPath(ctx, path.CGPath); 86 | 87 | CGContextSetFillColorWithColor(ctx, self.color); 88 | CGContextFillPath(ctx); 89 | } 90 | 91 | @end 92 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo/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 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo/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 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo/DCDemo01ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DCDemoViewController.m 3 | // DCDisplayViewController 4 | // 5 | // Created by apple on 2017/9/3. 6 | // Copyright © 2017年 RocketsChen. All rights reserved. 7 | // 8 | 9 | #import "DCDemo01ViewController.h" 10 | 11 | // Controllers 12 | 13 | // Models 14 | 15 | // Views 16 | 17 | // Vendors 18 | 19 | // Categories 20 | 21 | // Others 22 | 23 | @interface DCDemo01ViewController () 24 | 25 | 26 | 27 | @end 28 | 29 | @implementation DCDemo01ViewController 30 | 31 | #pragma mark - LazyLoad 32 | -(void)viewWillAppear:(BOOL)animated 33 | { 34 | [super viewWillAppear:animated]; 35 | 36 | // self.selectIndex = 3; //默认选择第几个设置(不设置则默认选择第0个) 37 | } 38 | 39 | #pragma mark - LifeCyle 40 | - (void)viewDidLoad { 41 | 42 | [super viewDidLoad]; 43 | 44 | [self setUpAllChildViewController]; 45 | 46 | [self setUpDisplayStyle:^(UIColor *__autoreleasing *titleScrollViewBgColor, UIColor *__autoreleasing *norColor, UIColor *__autoreleasing *selColor, UIColor *__autoreleasing *proColor, UIFont *__autoreleasing *titleFont, CGFloat *titleButtonWidth, BOOL *isShowPregressView, BOOL *isOpenStretch, BOOL *isOpenShade) { 47 | *titleScrollViewBgColor = [UIColor whiteColor]; //标题View背景色(默认标题背景色为白色) 48 | *norColor = [UIColor darkGrayColor]; //标题未选中颜色(默认未选中状态下字体颜色为黑色) 49 | *selColor = [UIColor orangeColor]; //标题选中颜色(默认选中状态下字体颜色为红色) 50 | *proColor = [UIColor purpleColor]; //滚动条颜色(默认为标题选中颜色) 51 | *titleFont = [UIFont systemFontOfSize:16]; //字体尺寸 (默认fontSize为15) 52 | 53 | *titleButtonWidth = 100; //标题按钮的宽度(有默认值) 54 | 55 | /* 56 | 以下BOOL值默认都为NO 57 | */ 58 | *isShowPregressView = YES; //是否开启标题下部Pregress指示器 59 | *isOpenStretch = YES; //是否开启指示器拉伸效果 60 | *isOpenShade = YES; //是否开启字体渐变 61 | }]; 62 | 63 | 64 | 65 | // [self setUpTitleScale:^(CGFloat *titleScale) { //titleScale范围在0到1之间 <0 或者 > 1 则默认不缩放 默认设置titleScale就开启缩放,不设置则关闭 66 | // *titleScale = 0.1; 67 | // }]; 68 | // 69 | // [self setUpProgressAttribute:^(CGFloat *progressLength, CGFloat *progressHeight, CGFloat *bottomDistance) {//progressLength 设置底部progress指示器的长度,有默认值为按钮的宽度的百分之56 progressHeight默认高度4(并且不能大于10) 70 | // *progressLength = 40; 71 | // *progressHeight = 5; 72 | // }]; 73 | 74 | // [self setUpTopTitleViewAttribute:^(CGFloat *topDistance, CGFloat *titleViewHeight) { 75 | // *topDistance = 200; 76 | // }]; 77 | } 78 | 79 | #pragma mark - 添加所有子控制器 80 | - (void)setUpAllChildViewController 81 | { 82 | NSArray *titles = @[@"测试01",@"测试02",@"测试03",@"测试04",@"测试05"]; 83 | for (NSInteger i = 0; i < titles.count; i++) { 84 | UIViewController *vc = [UIViewController new]; 85 | vc.title = titles[i]; 86 | vc.view.backgroundColor = RandColor; //随机色 87 | [self addChildViewController:vc]; 88 | } 89 | 90 | 91 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ //模拟网络延迟 92 | UIViewController *vc = self.childViewControllers.firstObject; 93 | vc.title = @"我要变了"; 94 | [self setUpRefreshDisplay]; //刷新 95 | }); 96 | } 97 | 98 | 99 | @end 100 | -------------------------------------------------------------------------------- /CDDPagerController/Expand(扩展)/Category(分类)/UIView+DCPagerFrame.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+DCPagerFrame.m 3 | // CDDPagerController 4 | // 5 | // Created by apple on 2017/9/5. 6 | // Copyright © 2017年 RocketsChen. All rights reserved. 7 | // 8 | 9 | 10 | #import "UIView+DCPagerFrame.h" 11 | 12 | @implementation UIView (DCPagerFrame) 13 | 14 | - (CGFloat)dc_x 15 | { 16 | return self.frame.origin.x; 17 | } 18 | - (void)setDc_x:(CGFloat)dc_x 19 | { 20 | CGRect dcFrame = self.frame; 21 | dcFrame.origin.x = dc_x; 22 | self.frame = dcFrame; 23 | } 24 | 25 | - (CGFloat)dc_y 26 | { 27 | return self.frame.origin.y; 28 | } 29 | - (void)setDc_y:(CGFloat)dc_y 30 | { 31 | CGRect dcFrame = self.frame; 32 | dcFrame.origin.y = dc_y; 33 | self.frame = dcFrame; 34 | } 35 | 36 | - (CGPoint)dc_origin 37 | { 38 | return self.frame.origin; 39 | } 40 | - (void)setDc_origin:(CGPoint)dc_origin 41 | { 42 | CGRect dcFrame = self.frame; 43 | dcFrame.origin = dc_origin; 44 | self.frame = dcFrame; 45 | } 46 | 47 | - (CGFloat)dc_width 48 | { 49 | return self.frame.size.width; 50 | } 51 | - (void)setDc_width:(CGFloat)dc_width 52 | { 53 | CGRect dcFrame = self.frame; 54 | dcFrame.size.width = dc_width; 55 | self.frame = dcFrame; 56 | } 57 | 58 | -(CGFloat)dc_height 59 | { 60 | return self.frame.size.height; 61 | } 62 | - (void)setDc_height:(CGFloat)dc_height 63 | { 64 | CGRect dcFrame = self.frame; 65 | dcFrame.size.height = dc_height; 66 | self.frame = dcFrame; 67 | } 68 | 69 | - (CGSize)dc_size 70 | { 71 | return self.frame.size; 72 | } 73 | - (void)setDc_size:(CGSize)dc_size 74 | { 75 | CGRect dcFrame = self.frame; 76 | dcFrame.size = dc_size; 77 | self.frame = dcFrame; 78 | } 79 | 80 | -(CGFloat)dc_centerX{ 81 | 82 | return self.center.x; 83 | } 84 | 85 | - (void)setDc_centerX:(CGFloat)dc_centerX{ 86 | 87 | CGPoint dcFrmae = self.center; 88 | dcFrmae.x = dc_centerX; 89 | self.center = dcFrmae; 90 | } 91 | 92 | - (CGFloat)dc_centerY{ 93 | 94 | return self.center.y; 95 | } 96 | 97 | - (void)setDc_centerY:(CGFloat)dc_centerY{ 98 | 99 | CGPoint dcFrame = self.center; 100 | dcFrame.y = dc_centerY; 101 | self.center = dcFrame; 102 | } 103 | 104 | - (CGFloat)dc_right{ 105 | 106 | return CGRectGetMaxX(self.frame); 107 | } 108 | 109 | - (CGFloat)dc_bottom{ 110 | 111 | return CGRectGetMaxY(self.frame); 112 | } 113 | 114 | - (void)setDc_right:(CGFloat)dc_right{ 115 | 116 | self.dc_x = dc_right - self.dc_width; 117 | } 118 | 119 | - (void)setDc_bottom:(CGFloat)dc_bottom{ 120 | 121 | self.dc_y = dc_bottom - self.dc_height; 122 | } 123 | 124 | - (BOOL)intersectWithView:(UIView *)view{ 125 | 126 | UIWindow *window = [UIApplication sharedApplication].keyWindow; 127 | CGRect selfRect = [self convertRect:self.bounds toView:window]; 128 | CGRect viewRect = [view convertRect:view.bounds toView:window]; 129 | return CGRectIntersectsRect(selfRect, viewRect); 130 | } 131 | 132 | - (BOOL)isShowingOnKeyWindow { 133 | // 主窗口 134 | UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow; 135 | 136 | // 以主窗口左上角为坐标原点, 计算self的矩形框 137 | CGRect newFrame = [keyWindow convertRect:self.frame fromView:self.superview]; 138 | CGRect winBounds = keyWindow.bounds; 139 | 140 | // 主窗口的bounds 和 self的矩形框 是否有重叠 141 | BOOL intersects = CGRectIntersectsRect(newFrame, winBounds); 142 | 143 | return !self.isHidden && self.alpha > 0.01 && self.window == keyWindow && intersects; 144 | } 145 | 146 | + (instancetype)dc_viewFromXib 147 | { 148 | return [[NSBundle mainBundle]loadNibNamed:NSStringFromClass(self) owner:nil options:nil].firstObject; 149 | } 150 | 151 | 152 | 153 | @end 154 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // CDDPagerControllerDemo 4 | // 5 | // Created by apple on 2017/9/5. 6 | // Copyright © 2017年 RocketsChen. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | #import "DCDemo01ViewController.h" 12 | #import "DCDemo02ViewController.h" 13 | #import "DCDemo03ViewController.h" 14 | #import "DCDemo04ViewController.h" 15 | #import "DCDemo05ViewController.h" 16 | 17 | @interface ViewController () 18 | 19 | /* tableView */ 20 | @property (strong , nonatomic)UITableView *tableView; 21 | 22 | @end 23 | 24 | @implementation ViewController 25 | 26 | - (UITableView *)tableView 27 | { 28 | if (!_tableView) { 29 | _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain]; 30 | _tableView.delegate = self; 31 | _tableView.dataSource = self; 32 | _tableView.frame = self.view.bounds; 33 | CGFloat tabEY = (([[UIScreen mainScreen] respondsToSelector:@selector(nativeBounds)] ? [UIScreen mainScreen].nativeBounds.size.height/[UIScreen mainScreen].nativeScale : [UIScreen mainScreen].bounds.size.height) > 800.0) ? 88 : 64; 34 | _tableView.contentInset = UIEdgeInsetsMake(tabEY, 0, 0, 0); 35 | _tableView.scrollIndicatorInsets = _tableView.contentInset; 36 | [_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"DisplayViewCell"]; 37 | 38 | [self.view addSubview:_tableView]; 39 | } 40 | return _tableView; 41 | } 42 | 43 | 44 | 45 | - (void)viewDidLoad { 46 | [super viewDidLoad]; 47 | 48 | [self setUpBase]; 49 | } 50 | 51 | #pragma mark - baseSetting 52 | - (void)setUpBase 53 | { 54 | self.title = @"DCPagerController"; 55 | self.tableView.backgroundColor = self.view.backgroundColor; 56 | self.automaticallyAdjustsScrollViewInsets = NO; 57 | self.tableView.rowHeight = 50; 58 | self.tableView.tableFooterView = [[UIView alloc]initWithFrame:CGRectZero]; //去掉多余的下划线 59 | } 60 | 61 | 62 | #pragma mark - 63 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 64 | { 65 | return 5; 66 | } 67 | 68 | 69 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 70 | { 71 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"DisplayViewCell" forIndexPath:indexPath]; 72 | NSArray *array = @[@"🐒",@"🐱",@"🐶",@"🐯",@"🐭"]; 73 | cell.textLabel.font = [UIFont systemFontOfSize:16]; 74 | cell.textLabel.text = [NSString stringWithFormat:@"%@第%zd种类型",array[indexPath.row],indexPath.row]; 75 | return cell; 76 | } 77 | 78 | #pragma mark - 79 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 80 | { 81 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 82 | 83 | switch (indexPath.row) { 84 | case 0: 85 | { 86 | DCDemo01ViewController *dcDemo = [DCDemo01ViewController new]; 87 | [self.navigationController pushViewController:dcDemo animated:YES]; 88 | } 89 | break; 90 | case 1:{ 91 | DCDemo02ViewController *dcDemo = [DCDemo02ViewController new]; 92 | [self.navigationController pushViewController:dcDemo animated:YES]; 93 | } 94 | break; 95 | case 2:{ 96 | DCDemo03ViewController *dcDemo = [DCDemo03ViewController new]; 97 | [self.navigationController pushViewController:dcDemo animated:YES]; 98 | } 99 | break; 100 | case 3:{ 101 | DCDemo04ViewController *deDemo = [DCDemo04ViewController new]; 102 | [self.navigationController pushViewController:deDemo animated:YES]; 103 | } 104 | break; 105 | case 4:{ 106 | DCDemo05ViewController *deDemo = [DCDemo05ViewController new]; 107 | [self.navigationController pushViewController:deDemo animated:YES]; 108 | } 109 | break; 110 | 111 | default: 112 | break; 113 | } 114 | 115 | 116 | } 117 | 118 | @end 119 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # CDDPagerController 3 | A very useful father-son controller small frame. 4 | 5 | ## Language 6 | [![CocoaPods](https://img.shields.io/cocoapods/v/CDDPagerController.svg)](https://cocoapods.org/pods/CDDPagerController) [![CocoaPods](https://img.shields.io/cocoapods/p/CDDPagerController.svg)](https://github.com/indulgeIn/CDDPagerController)  7 | 8 | 9 | ## Requirements 10 | 11 | * Xcode 8+ 12 | 13 | ## Usage 14 | * You can do that. 15 | 16 | ``` 17 | #pragma mark - LazyLoad 18 | -(void)viewWillAppear:(BOOL)animated 19 | { 20 | [super viewWillAppear:animated]; 21 | 22 | // self.selectIndex = 3; //default option 23 | } 24 | 25 | #pragma mark - LifeCyle 26 | - (void)viewDidLoad { 27 | 28 | [super viewDidLoad]; 29 | 30 | [self setUpAllChildViewController]; 31 | 32 | [self setUpDisplayStyle:^(UIColor *__autoreleasing *titleScrollViewBgColor, UIColor *__autoreleasing *norColor, UIColor *__autoreleasing *selColor, UIColor *__autoreleasing *proColor, UIFont *__autoreleasing *titleFont, CGFloat *titleButtonWidth, BOOL *isShowPregressView, BOOL *isOpenStretch, BOOL *isOpenShade) { 33 | *titleScrollViewBgColor = [UIColor whiteColor]; //View background color 34 | *norColor = [UIColor darkGrayColor]; //Unselected color (the font color is black by default) 35 | *selColor = [UIColor orangeColor]; //Highlight the color (the font color is red by default) 36 | *proColor = [UIColor purpleColor]; //Scrollbar color (by default the color of the title is selected) 37 | *titleFont = [UIFont systemFontOfSize:16]; //FontSize (default fontSize is 15) 38 | 39 | *titleButtonWidth = 100; //Width of the title button (with default) 40 | 41 | /* 42 | The following BOOL values are NO. 43 | */ 44 | *isShowPregressView = YES; //Whether to open the lower Pregress indicator under the heading.器 45 | *isOpenStretch = YES; //Whether to open indicator stretch effect. 46 | *isOpenShade = YES; //whether to open the font gradient. 47 | }]; 48 | 49 | 50 | 51 | // [self setUpTitleScale:^(CGFloat *titleScale) { //The titleScale range is between 0 and 1 <0 or > 1, and the default is not resized by default. TitleScale opens the zoom, and the default is closed. 52 | // *titleScale = 0.1; 53 | // }]; 54 | // 55 | // [self setUpProgressAttribute:^(CGFloat *progressLength, CGFloat *progressHeight, CGFloat *bottomDistance) {//ProgressLength sets the length of the bottom progress indicator, with the default value of 56 progressHeight default height of the button's width (and no greater than 10) 56 | // *progressLength = 40; 57 | // *progressHeight = 5; 58 | // }]; 59 | 60 | // [self setUpTopTitleViewAttribute:^(CGFloat *topDistance, CGFloat *titleViewHeight) { 61 | // *topDistance = 200; 62 | // }]; 63 | } 64 | 65 | #pragma mark - Add all childControllers. 66 | - (void)setUpAllChildViewController 67 | { 68 | NSArray *titles = @[@"text01",@"text02",@"text03",@"text04",@"text05"]; 69 | for (NSInteger i = 0; i < titles.count; i++) { 70 | UIViewController *vc = [UIViewController new]; 71 | vc.title = titles[i]; 72 | vc.view.backgroundColor = RandColor; //Random color 73 | [self addChildViewController:vc]; 74 | } 75 | } 76 | 77 | 78 | #pragma mark - Child pages change individually 79 | - (void)setUpAllChildViewController 80 | { 81 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ //模拟网络延迟 82 | UIViewController *vc = self.childViewControllers.firstObject; 83 | vc.title = @"我要变了"; 84 | [self setUpRefreshDisplay]; //刷新 85 | }); 86 | } 87 | ``` 88 | * 中文: 89 | * [父子控制器](https://www.jianshu.com/p/9d80edfaf751) 90 | * [更新-1.1.1](https://www.jianshu.com/p/7f753a2daae3) 91 | * [更新-1.1.6](https://www.jianshu.com/p/929e0d54bfad) 92 | 93 | 94 | ## 版本更新 95 | | version | note | 96 | | ------ | ------ | 97 | | 1.1.0 | Start ~ 🤔| 98 | | 1.1.1 | Add: Life cycle renewal.| 99 | | 1.1.6 | Add:Child pages change individually.| 100 | | 1.1.7 | Fix:Jump back problem.| 101 | 102 | ##Installation 103 | #### Manually: 104 | * Drag all source files(`CDDPagerController`) under folder Extension to your project. 105 | * Import the header(`DCPageKit.h`) file in the AppDelegate. 106 | * A method is called 107 | 108 | #### CocoaPods: 109 | * Installation with CocoaPods:pod ` CDDPagerController` 110 | 111 | 112 | #### Swift version: 113 | * Waiting for development 114 | 115 | 116 | ## Agreement 117 | 118 | * ` CDDPagerController` licensed under the MIT license is used. Refer to [LICENSE](https://opensource.org/licenses/MIT) for more information. 119 | 120 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/Pods/Target Support Files/Pods-CDDPagerControllerDemo/Pods-CDDPagerControllerDemo-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then 7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # resources to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 13 | 14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 15 | > "$RESOURCES_TO_COPY" 16 | 17 | XCASSET_FILES=() 18 | 19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 22 | 23 | case "${TARGETED_DEVICE_FAMILY:-}" in 24 | 1,2) 25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 26 | ;; 27 | 1) 28 | TARGET_DEVICE_ARGS="--target-device iphone" 29 | ;; 30 | 2) 31 | TARGET_DEVICE_ARGS="--target-device ipad" 32 | ;; 33 | 3) 34 | TARGET_DEVICE_ARGS="--target-device tv" 35 | ;; 36 | 4) 37 | TARGET_DEVICE_ARGS="--target-device watch" 38 | ;; 39 | *) 40 | TARGET_DEVICE_ARGS="--target-device mac" 41 | ;; 42 | esac 43 | 44 | install_resource() 45 | { 46 | if [[ "$1" = /* ]] ; then 47 | RESOURCE_PATH="$1" 48 | else 49 | RESOURCE_PATH="${PODS_ROOT}/$1" 50 | fi 51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 52 | cat << EOM 53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 54 | EOM 55 | exit 1 56 | fi 57 | case $RESOURCE_PATH in 58 | *.storyboard) 59 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 60 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 61 | ;; 62 | *.xib) 63 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 64 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 65 | ;; 66 | *.framework) 67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 71 | ;; 72 | *.xcdatamodel) 73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 75 | ;; 76 | *.xcdatamodeld) 77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 79 | ;; 80 | *.xcmappingmodel) 81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 83 | ;; 84 | *.xcassets) 85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 87 | ;; 88 | *) 89 | echo "$RESOURCE_PATH" || true 90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 91 | ;; 92 | esac 93 | } 94 | 95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 100 | fi 101 | rm -f "$RESOURCES_TO_COPY" 102 | 103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] 104 | then 105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 107 | while read line; do 108 | if [[ $line != "${PODS_ROOT}*" ]]; then 109 | XCASSET_FILES+=("$line") 110 | fi 111 | done <<<"$OTHER_XCASSETS" 112 | 113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then 114 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 115 | else 116 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_BUILD_DIR}/assetcatalog_generated_info.plist" 117 | fi 118 | fi 119 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/Pods/Target Support Files/Pods-CDDPagerControllerDemo/Pods-CDDPagerControllerDemo-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 7 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # frameworks to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 13 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 14 | 15 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 16 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 17 | 18 | # Used as a return value for each invocation of `strip_invalid_archs` function. 19 | STRIP_BINARY_RETVAL=0 20 | 21 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 22 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 23 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 24 | 25 | # Copies and strips a vendored framework 26 | install_framework() 27 | { 28 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 29 | local source="${BUILT_PRODUCTS_DIR}/$1" 30 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 31 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 32 | elif [ -r "$1" ]; then 33 | local source="$1" 34 | fi 35 | 36 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 37 | 38 | if [ -L "${source}" ]; then 39 | echo "Symlinked..." 40 | source="$(readlink "${source}")" 41 | fi 42 | 43 | # Use filter instead of exclude so missing patterns don't throw errors. 44 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 45 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 46 | 47 | local basename 48 | basename="$(basename -s .framework "$1")" 49 | binary="${destination}/${basename}.framework/${basename}" 50 | if ! [ -r "$binary" ]; then 51 | binary="${destination}/${basename}" 52 | fi 53 | 54 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 55 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 56 | strip_invalid_archs "$binary" 57 | fi 58 | 59 | # Resign the code if required by the build settings to avoid unstable apps 60 | code_sign_if_enabled "${destination}/$(basename "$1")" 61 | 62 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 63 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 64 | local swift_runtime_libs 65 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 66 | for lib in $swift_runtime_libs; do 67 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 68 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 69 | code_sign_if_enabled "${destination}/${lib}" 70 | done 71 | fi 72 | } 73 | 74 | # Copies and strips a vendored dSYM 75 | install_dsym() { 76 | local source="$1" 77 | if [ -r "$source" ]; then 78 | # Copy the dSYM into a the targets temp dir. 79 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 80 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 81 | 82 | local basename 83 | basename="$(basename -s .framework.dSYM "$source")" 84 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 85 | 86 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 87 | if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then 88 | strip_invalid_archs "$binary" 89 | fi 90 | 91 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 92 | # Move the stripped file into its final destination. 93 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 94 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 95 | else 96 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 97 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 98 | fi 99 | fi 100 | } 101 | 102 | # Signs a framework with the provided identity 103 | code_sign_if_enabled() { 104 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 105 | # Use the current code_sign_identitiy 106 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 107 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 108 | 109 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 110 | code_sign_cmd="$code_sign_cmd &" 111 | fi 112 | echo "$code_sign_cmd" 113 | eval "$code_sign_cmd" 114 | fi 115 | } 116 | 117 | # Strip invalid architectures 118 | strip_invalid_archs() { 119 | binary="$1" 120 | # Get architectures for current target binary 121 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 122 | # Intersect them with the architectures we are building for 123 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 124 | # If there are no archs supported by this binary then warn the user 125 | if [[ -z "$intersected_archs" ]]; then 126 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 127 | STRIP_BINARY_RETVAL=0 128 | return 129 | fi 130 | stripped="" 131 | for arch in $binary_archs; do 132 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 133 | # Strip non-valid architectures in-place 134 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 135 | stripped="$stripped $arch" 136 | fi 137 | done 138 | if [[ "$stripped" ]]; then 139 | echo "Stripped $binary of architectures:$stripped" 140 | fi 141 | STRIP_BINARY_RETVAL=1 142 | } 143 | 144 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 145 | wait 146 | fi 147 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 57010E62261721C771F164092750F278 /* Pods-CDDPagerControllerDemo-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 229C7E9855CF46FBF172F33268958261 /* Pods-CDDPagerControllerDemo-dummy.m */; }; 11 | D14908FD63BCFB42A181699C734B1AC1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; 12 | /* End PBXBuildFile section */ 13 | 14 | /* Begin PBXFileReference section */ 15 | 031E7F7FB129E1E12697C27EE1A1BC2C /* Pods-CDDPagerControllerDemo-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-CDDPagerControllerDemo-resources.sh"; sourceTree = ""; }; 16 | 229C7E9855CF46FBF172F33268958261 /* Pods-CDDPagerControllerDemo-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-CDDPagerControllerDemo-dummy.m"; sourceTree = ""; }; 17 | 59167F4E65D7863EFE4F8F45A65F0857 /* Pods-CDDPagerControllerDemo-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-CDDPagerControllerDemo-acknowledgements.plist"; sourceTree = ""; }; 18 | 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 19 | 7B08D4E9BCF3667F96A791E62EB8CB3D /* Pods-CDDPagerControllerDemo-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-CDDPagerControllerDemo-acknowledgements.markdown"; sourceTree = ""; }; 20 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 21 | 940F43E4682BC2642926A3077886A9DB /* libPods-CDDPagerControllerDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-CDDPagerControllerDemo.a"; path = "libPods-CDDPagerControllerDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | 9DD01EB63763061DC48747E751B36A19 /* Pods-CDDPagerControllerDemo-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-CDDPagerControllerDemo-frameworks.sh"; sourceTree = ""; }; 23 | BB596EE967C23E62DB6C214E4FED5BD3 /* Pods-CDDPagerControllerDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-CDDPagerControllerDemo.release.xcconfig"; sourceTree = ""; }; 24 | E956D2819E21C11D2DC25663A87DE772 /* Pods-CDDPagerControllerDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-CDDPagerControllerDemo.debug.xcconfig"; sourceTree = ""; }; 25 | /* End PBXFileReference section */ 26 | 27 | /* Begin PBXFrameworksBuildPhase section */ 28 | 9333F2763D8C874D8DA27EF9281E504E /* Frameworks */ = { 29 | isa = PBXFrameworksBuildPhase; 30 | buildActionMask = 2147483647; 31 | files = ( 32 | D14908FD63BCFB42A181699C734B1AC1 /* Foundation.framework in Frameworks */, 33 | ); 34 | runOnlyForDeploymentPostprocessing = 0; 35 | }; 36 | /* End PBXFrameworksBuildPhase section */ 37 | 38 | /* Begin PBXGroup section */ 39 | 3B8D6F22E115872F0FB9828D4F6CCF92 /* Targets Support Files */ = { 40 | isa = PBXGroup; 41 | children = ( 42 | 6850717C2CD9DA63B9081009B4B68EC7 /* Pods-CDDPagerControllerDemo */, 43 | ); 44 | name = "Targets Support Files"; 45 | sourceTree = ""; 46 | }; 47 | 3C770C71070F09DB57C4F924CC97D8B1 /* Products */ = { 48 | isa = PBXGroup; 49 | children = ( 50 | 940F43E4682BC2642926A3077886A9DB /* libPods-CDDPagerControllerDemo.a */, 51 | ); 52 | name = Products; 53 | sourceTree = ""; 54 | }; 55 | 6850717C2CD9DA63B9081009B4B68EC7 /* Pods-CDDPagerControllerDemo */ = { 56 | isa = PBXGroup; 57 | children = ( 58 | 7B08D4E9BCF3667F96A791E62EB8CB3D /* Pods-CDDPagerControllerDemo-acknowledgements.markdown */, 59 | 59167F4E65D7863EFE4F8F45A65F0857 /* Pods-CDDPagerControllerDemo-acknowledgements.plist */, 60 | 229C7E9855CF46FBF172F33268958261 /* Pods-CDDPagerControllerDemo-dummy.m */, 61 | 9DD01EB63763061DC48747E751B36A19 /* Pods-CDDPagerControllerDemo-frameworks.sh */, 62 | 031E7F7FB129E1E12697C27EE1A1BC2C /* Pods-CDDPagerControllerDemo-resources.sh */, 63 | E956D2819E21C11D2DC25663A87DE772 /* Pods-CDDPagerControllerDemo.debug.xcconfig */, 64 | BB596EE967C23E62DB6C214E4FED5BD3 /* Pods-CDDPagerControllerDemo.release.xcconfig */, 65 | ); 66 | name = "Pods-CDDPagerControllerDemo"; 67 | path = "Target Support Files/Pods-CDDPagerControllerDemo"; 68 | sourceTree = ""; 69 | }; 70 | 7DB346D0F39D3F0E887471402A8071AB = { 71 | isa = PBXGroup; 72 | children = ( 73 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 74 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 75 | 3C770C71070F09DB57C4F924CC97D8B1 /* Products */, 76 | 3B8D6F22E115872F0FB9828D4F6CCF92 /* Targets Support Files */, 77 | ); 78 | sourceTree = ""; 79 | }; 80 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | D35AF013A5F0BAD4F32504907A52519E /* iOS */, 84 | ); 85 | name = Frameworks; 86 | sourceTree = ""; 87 | }; 88 | D35AF013A5F0BAD4F32504907A52519E /* iOS */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */, 92 | ); 93 | name = iOS; 94 | sourceTree = ""; 95 | }; 96 | /* End PBXGroup section */ 97 | 98 | /* Begin PBXNativeTarget section */ 99 | 132C94A58662664E9F48C39DEFBD8E98 /* Pods-CDDPagerControllerDemo */ = { 100 | isa = PBXNativeTarget; 101 | buildConfigurationList = 12ED6AFF4D5004D8D6D71A184D1ABA4A /* Build configuration list for PBXNativeTarget "Pods-CDDPagerControllerDemo" */; 102 | buildPhases = ( 103 | F8AF78E06A4FAE5E71FD46021F5E8479 /* Sources */, 104 | 9333F2763D8C874D8DA27EF9281E504E /* Frameworks */, 105 | ); 106 | buildRules = ( 107 | ); 108 | dependencies = ( 109 | ); 110 | name = "Pods-CDDPagerControllerDemo"; 111 | productName = "Pods-CDDPagerControllerDemo"; 112 | productReference = 940F43E4682BC2642926A3077886A9DB /* libPods-CDDPagerControllerDemo.a */; 113 | productType = "com.apple.product-type.library.static"; 114 | }; 115 | /* End PBXNativeTarget section */ 116 | 117 | /* Begin PBXProject section */ 118 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 119 | isa = PBXProject; 120 | attributes = { 121 | LastSwiftUpdateCheck = 0930; 122 | LastUpgradeCheck = 0930; 123 | }; 124 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 125 | compatibilityVersion = "Xcode 3.2"; 126 | developmentRegion = English; 127 | hasScannedForEncodings = 0; 128 | knownRegions = ( 129 | en, 130 | ); 131 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 132 | productRefGroup = 3C770C71070F09DB57C4F924CC97D8B1 /* Products */; 133 | projectDirPath = ""; 134 | projectRoot = ""; 135 | targets = ( 136 | 132C94A58662664E9F48C39DEFBD8E98 /* Pods-CDDPagerControllerDemo */, 137 | ); 138 | }; 139 | /* End PBXProject section */ 140 | 141 | /* Begin PBXSourcesBuildPhase section */ 142 | F8AF78E06A4FAE5E71FD46021F5E8479 /* Sources */ = { 143 | isa = PBXSourcesBuildPhase; 144 | buildActionMask = 2147483647; 145 | files = ( 146 | 57010E62261721C771F164092750F278 /* Pods-CDDPagerControllerDemo-dummy.m in Sources */, 147 | ); 148 | runOnlyForDeploymentPostprocessing = 0; 149 | }; 150 | /* End PBXSourcesBuildPhase section */ 151 | 152 | /* Begin XCBuildConfiguration section */ 153 | 11D860EBE86DF9F558F9A9109B279254 /* Debug */ = { 154 | isa = XCBuildConfiguration; 155 | baseConfigurationReference = E956D2819E21C11D2DC25663A87DE772 /* Pods-CDDPagerControllerDemo.debug.xcconfig */; 156 | buildSettings = { 157 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 158 | CODE_SIGN_IDENTITY = "iPhone Developer"; 159 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 160 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 161 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 162 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 163 | MACH_O_TYPE = staticlib; 164 | OTHER_LDFLAGS = ""; 165 | OTHER_LIBTOOLFLAGS = ""; 166 | PODS_ROOT = "$(SRCROOT)"; 167 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 168 | SDKROOT = iphoneos; 169 | SKIP_INSTALL = YES; 170 | TARGETED_DEVICE_FAMILY = "1,2"; 171 | }; 172 | name = Debug; 173 | }; 174 | 1EE19F5DD95931924296F637BF18BD8F /* Debug */ = { 175 | isa = XCBuildConfiguration; 176 | buildSettings = { 177 | ALWAYS_SEARCH_USER_PATHS = NO; 178 | CLANG_ANALYZER_NONNULL = YES; 179 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 180 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 181 | CLANG_CXX_LIBRARY = "libc++"; 182 | CLANG_ENABLE_MODULES = YES; 183 | CLANG_ENABLE_OBJC_ARC = YES; 184 | CLANG_ENABLE_OBJC_WEAK = YES; 185 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 186 | CLANG_WARN_BOOL_CONVERSION = YES; 187 | CLANG_WARN_COMMA = YES; 188 | CLANG_WARN_CONSTANT_CONVERSION = YES; 189 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 190 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 191 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 192 | CLANG_WARN_EMPTY_BODY = YES; 193 | CLANG_WARN_ENUM_CONVERSION = YES; 194 | CLANG_WARN_INFINITE_RECURSION = YES; 195 | CLANG_WARN_INT_CONVERSION = YES; 196 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 197 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 198 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 199 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 200 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 201 | CLANG_WARN_STRICT_PROTOTYPES = YES; 202 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 203 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 204 | CLANG_WARN_UNREACHABLE_CODE = YES; 205 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 206 | CODE_SIGNING_ALLOWED = NO; 207 | CODE_SIGNING_REQUIRED = NO; 208 | COPY_PHASE_STRIP = NO; 209 | DEBUG_INFORMATION_FORMAT = dwarf; 210 | ENABLE_STRICT_OBJC_MSGSEND = YES; 211 | ENABLE_TESTABILITY = YES; 212 | GCC_C_LANGUAGE_STANDARD = gnu11; 213 | GCC_DYNAMIC_NO_PIC = NO; 214 | GCC_NO_COMMON_BLOCKS = YES; 215 | GCC_OPTIMIZATION_LEVEL = 0; 216 | GCC_PREPROCESSOR_DEFINITIONS = ( 217 | "POD_CONFIGURATION_DEBUG=1", 218 | "DEBUG=1", 219 | "$(inherited)", 220 | ); 221 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 222 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 223 | GCC_WARN_UNDECLARED_SELECTOR = YES; 224 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 225 | GCC_WARN_UNUSED_FUNCTION = YES; 226 | GCC_WARN_UNUSED_VARIABLE = YES; 227 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 228 | MTL_ENABLE_DEBUG_INFO = YES; 229 | ONLY_ACTIVE_ARCH = YES; 230 | PRODUCT_NAME = "$(TARGET_NAME)"; 231 | STRIP_INSTALLED_PRODUCT = NO; 232 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 233 | SYMROOT = "${SRCROOT}/../build"; 234 | }; 235 | name = Debug; 236 | }; 237 | 945EEBABFB1A42DDDA86EB6F6465BFB4 /* Release */ = { 238 | isa = XCBuildConfiguration; 239 | baseConfigurationReference = BB596EE967C23E62DB6C214E4FED5BD3 /* Pods-CDDPagerControllerDemo.release.xcconfig */; 240 | buildSettings = { 241 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 242 | CODE_SIGN_IDENTITY = "iPhone Developer"; 243 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 244 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 245 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 246 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 247 | MACH_O_TYPE = staticlib; 248 | OTHER_LDFLAGS = ""; 249 | OTHER_LIBTOOLFLAGS = ""; 250 | PODS_ROOT = "$(SRCROOT)"; 251 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 252 | SDKROOT = iphoneos; 253 | SKIP_INSTALL = YES; 254 | TARGETED_DEVICE_FAMILY = "1,2"; 255 | VALIDATE_PRODUCT = YES; 256 | }; 257 | name = Release; 258 | }; 259 | F4568DEE257655D290C2B9CEAB37C934 /* Release */ = { 260 | isa = XCBuildConfiguration; 261 | buildSettings = { 262 | ALWAYS_SEARCH_USER_PATHS = NO; 263 | CLANG_ANALYZER_NONNULL = YES; 264 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 265 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 266 | CLANG_CXX_LIBRARY = "libc++"; 267 | CLANG_ENABLE_MODULES = YES; 268 | CLANG_ENABLE_OBJC_ARC = YES; 269 | CLANG_ENABLE_OBJC_WEAK = YES; 270 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 271 | CLANG_WARN_BOOL_CONVERSION = YES; 272 | CLANG_WARN_COMMA = YES; 273 | CLANG_WARN_CONSTANT_CONVERSION = YES; 274 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 275 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 276 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 277 | CLANG_WARN_EMPTY_BODY = YES; 278 | CLANG_WARN_ENUM_CONVERSION = YES; 279 | CLANG_WARN_INFINITE_RECURSION = YES; 280 | CLANG_WARN_INT_CONVERSION = YES; 281 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 282 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 283 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 284 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 285 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 286 | CLANG_WARN_STRICT_PROTOTYPES = YES; 287 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 288 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 289 | CLANG_WARN_UNREACHABLE_CODE = YES; 290 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 291 | CODE_SIGNING_ALLOWED = NO; 292 | CODE_SIGNING_REQUIRED = NO; 293 | COPY_PHASE_STRIP = NO; 294 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 295 | ENABLE_NS_ASSERTIONS = NO; 296 | ENABLE_STRICT_OBJC_MSGSEND = YES; 297 | GCC_C_LANGUAGE_STANDARD = gnu11; 298 | GCC_NO_COMMON_BLOCKS = YES; 299 | GCC_PREPROCESSOR_DEFINITIONS = ( 300 | "POD_CONFIGURATION_RELEASE=1", 301 | "$(inherited)", 302 | ); 303 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 304 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 305 | GCC_WARN_UNDECLARED_SELECTOR = YES; 306 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 307 | GCC_WARN_UNUSED_FUNCTION = YES; 308 | GCC_WARN_UNUSED_VARIABLE = YES; 309 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 310 | MTL_ENABLE_DEBUG_INFO = NO; 311 | PRODUCT_NAME = "$(TARGET_NAME)"; 312 | STRIP_INSTALLED_PRODUCT = NO; 313 | SYMROOT = "${SRCROOT}/../build"; 314 | }; 315 | name = Release; 316 | }; 317 | /* End XCBuildConfiguration section */ 318 | 319 | /* Begin XCConfigurationList section */ 320 | 12ED6AFF4D5004D8D6D71A184D1ABA4A /* Build configuration list for PBXNativeTarget "Pods-CDDPagerControllerDemo" */ = { 321 | isa = XCConfigurationList; 322 | buildConfigurations = ( 323 | 11D860EBE86DF9F558F9A9109B279254 /* Debug */, 324 | 945EEBABFB1A42DDDA86EB6F6465BFB4 /* Release */, 325 | ); 326 | defaultConfigurationIsVisible = 0; 327 | defaultConfigurationName = Release; 328 | }; 329 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 330 | isa = XCConfigurationList; 331 | buildConfigurations = ( 332 | 1EE19F5DD95931924296F637BF18BD8F /* Debug */, 333 | F4568DEE257655D290C2B9CEAB37C934 /* Release */, 334 | ); 335 | defaultConfigurationIsVisible = 0; 336 | defaultConfigurationName = Release; 337 | }; 338 | /* End XCConfigurationList section */ 339 | }; 340 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 341 | } 342 | -------------------------------------------------------------------------------- /CDDPagerController/Controller/DCPagerController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DCPagerController.m 3 | // CDDPagerController 4 | // 5 | // Created by apple on 2017/9/5. 6 | // Copyright © 2017年 RocketsChen. All rights reserved. 7 | // 8 | 9 | #import "DCPagerController.h" 10 | 11 | // Controllers 12 | 13 | // Models 14 | 15 | // Views 16 | 17 | // Vendors 18 | 19 | // Categories 20 | 21 | // Others 22 | 23 | 24 | 25 | @interface DCPagerController () 26 | { 27 | UIColor *_norColor; 28 | UIColor *_selColor; 29 | UIColor *_titleScrollViewBgColor; 30 | } 31 | /** 标题背景色 */ 32 | @property (nonatomic, strong) UIColor *titleScrollViewBgColor; 33 | /** 正常标题颜色 */ 34 | @property (nonatomic, strong) UIColor *norColor; 35 | /** 选中标题颜色 */ 36 | @property (nonatomic, strong) UIColor *selColor; 37 | /** 指示器颜色 */ 38 | @property (nonatomic, strong) UIColor *proColor; 39 | /** 标题字体 */ 40 | @property (nonatomic, strong) UIFont *titleFont; 41 | /** 字体缩放比例 */ 42 | @property (nonatomic, assign) CGFloat titleScale; 43 | /** 标题按钮的宽度 */ 44 | @property (nonatomic, assign) CGFloat titleButtonWidth; 45 | /** 指示器的长度 */ 46 | @property (nonatomic, assign) CGFloat progressLength; 47 | /** 指示器的宽度 */ 48 | @property (nonatomic, assign) CGFloat progressHeight; 49 | /** 标题ScrollView距离顶部的间距 */ 50 | @property (nonatomic, assign) CGFloat topDistance; 51 | /** 标题按钮距离底部子控制器的距离 */ 52 | @property (nonatomic, assign) CGFloat bottomDistance; 53 | 54 | /** 标题ScrollView的高度 */ 55 | @property (nonatomic, assign) CGFloat titleViewHeight; 56 | 57 | /* 是否显示底部指示器 */ 58 | @property (nonatomic, assign) BOOL isShowPregressView; 59 | /* 是否加载弹簧动画 */ 60 | @property (nonatomic, assign) BOOL isOpenStretch; 61 | /* 是否开启渐变 */ 62 | @property (nonatomic, assign) BOOL isOpenShade; 63 | 64 | /* 内容滚动视图 */ 65 | @property (strong , nonatomic)UIScrollView *contentScrollView; 66 | /** 滚动条 */ 67 | @property (nonatomic, strong) DCPagerProgressView *pregressView; 68 | 69 | /* 标题按钮 */ 70 | @property (strong , nonatomic)UIButton *titleButton; 71 | /* 上一次选择的按钮 */ 72 | @property (weak , nonatomic)UIButton *lastSelectButton; 73 | /* 标题按钮数组 */ 74 | @property (strong , nonatomic)NSMutableArray *titleButtonArray; 75 | /** 指示条的frames */ 76 | @property (nonatomic, strong) NSMutableArray *pregressFrames; 77 | 78 | /** 是否加载过标题 */ 79 | @property (nonatomic,assign)BOOL isLoadTitles; 80 | 81 | /** 82 | 开始颜色,取值范围0~1 83 | */ 84 | @property (nonatomic, assign) CGFloat startR; 85 | 86 | @property (nonatomic, assign) CGFloat startG; 87 | 88 | @property (nonatomic, assign) CGFloat startB; 89 | 90 | /** 91 | 完成颜色,取值范围0~1 92 | */ 93 | @property (nonatomic, assign) CGFloat endR; 94 | 95 | @property (nonatomic, assign) CGFloat endG; 96 | 97 | @property (nonatomic, assign) CGFloat endB; 98 | 99 | @end 100 | 101 | @implementation DCPagerController 102 | 103 | #pragma mark - LazyLoad 104 | - (UIScrollView *)titleScrollView 105 | { 106 | if (!_titleScrollView) { 107 | _titleScrollView = [UIScrollView new]; 108 | _titleScrollView.showsHorizontalScrollIndicator = NO; 109 | [self.view addSubview:_titleScrollView];// 添加标题滚动View 110 | } 111 | return _titleScrollView; 112 | } 113 | 114 | - (UIScrollView *)contentScrollView 115 | { 116 | if (!_contentScrollView) { 117 | _contentScrollView = [UIScrollView new]; 118 | _contentScrollView.backgroundColor = [UIColor whiteColor]; 119 | _contentScrollView.showsHorizontalScrollIndicator = NO; 120 | _contentScrollView.pagingEnabled = YES; 121 | _contentScrollView.bounces = NO; //弹簧效果关闭 122 | _contentScrollView.delegate = self; 123 | [self.view addSubview:_contentScrollView];// 添加标题滚动View 124 | } 125 | return _contentScrollView; 126 | } 127 | 128 | - (NSMutableArray *)titleButtonArray 129 | { 130 | if (!_titleButtonArray) { 131 | _titleButtonArray = [NSMutableArray array]; 132 | } 133 | return _titleButtonArray; 134 | } 135 | 136 | - (NSMutableArray *)pregressFrames 137 | { 138 | if (!_pregressFrames) { 139 | _pregressFrames = [NSMutableArray array]; 140 | } 141 | return _pregressFrames; 142 | } 143 | 144 | 145 | #pragma mark - setUpDisplayStyle 146 | - (void)setUpDisplayStyle:(void(^)(UIColor **titleScrollViewBgColor,UIColor **norColor,UIColor **selColor,UIColor **proColor,UIFont **titleFont,CGFloat *titleButtonWidth,BOOL *isShowPregressView,BOOL *isOpenStretch,BOOL *isOpenShade))BaseSettingBlock 147 | { 148 | UIColor *titleScrollViewBgColor; 149 | UIColor *norColor; 150 | UIColor *selColor; 151 | UIColor *proColor; 152 | UIFont *titleFont; 153 | 154 | 155 | BOOL isShowPregressView; 156 | BOOL isOpenStretch; 157 | BOOL isOpenShade; 158 | 159 | 160 | if (BaseSettingBlock) { //属性 161 | BaseSettingBlock(&titleScrollViewBgColor,&norColor,&selColor,&proColor,&titleFont,&_titleButtonWidth,&isShowPregressView,&isOpenStretch,&isOpenShade); 162 | 163 | self.titleScrollViewBgColor = titleScrollViewBgColor; 164 | self.norColor = norColor; 165 | self.selColor = selColor; 166 | self.proColor = proColor; 167 | self.titleFont = titleFont; 168 | 169 | self.isOpenShade = isOpenShade; 170 | self.isOpenStretch = isOpenStretch; 171 | self.isShowPregressView = isShowPregressView; 172 | } 173 | 174 | } 175 | #pragma mark - LifeCyle 176 | - (void)viewWillAppear:(BOOL)animated 177 | { 178 | [super viewWillAppear:animated]; 179 | 180 | if (_isLoadTitles == NO) { 181 | 182 | [self viewDidLayoutSubviews]; //viewDidLayoutSubviews 183 | 184 | [self setUpAllTitle]; 185 | _isLoadTitles = YES; 186 | }; 187 | 188 | } 189 | 190 | - (instancetype)init 191 | { 192 | if (self = [super init]) { 193 | [self setUpBase]; 194 | } 195 | return self; 196 | } 197 | 198 | - (void)awakeFromNib 199 | { 200 | [super awakeFromNib]; 201 | [self setUpBase]; 202 | } 203 | 204 | 205 | 206 | #pragma mark - initialize 207 | - (void)setUpBase 208 | { 209 | self.view.backgroundColor = [UIColor whiteColor]; 210 | self.automaticallyAdjustsScrollViewInsets = NO; 211 | 212 | } 213 | 214 | #pragma mark - 重新刷新界面 215 | - (void)setUpRefreshDisplay 216 | { 217 | 218 | // 清空之前所有标题数组 219 | [self.titleButtonArray makeObjectsPerformSelector:@selector(removeFromSuperview)]; 220 | [self.titleButtonArray removeAllObjects]; 221 | 222 | [self setUpAllTitle]; //重新设置 223 | 224 | // 默认选中标题 225 | self.selectIndex = self.selectIndex; 226 | } 227 | 228 | 229 | 230 | - (void)viewDidLayoutSubviews 231 | { 232 | [super viewDidLayoutSubviews]; 233 | 234 | //设置标题和内容的尺寸 235 | CGFloat statusH = [UIApplication sharedApplication].statusBarFrame.size.height; //20 236 | CGFloat tY = (_topDistance != 0) ? _topDistance : (self.navigationController.navigationBarHidden == NO) ? DCNormalTitleViewH + statusH : statusH; 237 | CGFloat tH = (_titleViewHeight != 0) ? _titleViewHeight : DCNormalTitleViewH; 238 | CGFloat bD = (_bottomDistance != 0) ? _bottomDistance : 0; 239 | 240 | self.titleScrollView.frame = CGRectMake(0, tY, ScreenW, tH); 241 | self.contentScrollView.frame = CGRectMake(0, tY + tH + bD, ScreenW, ScreenH - (tY + tH + bD)); 242 | } 243 | 244 | #pragma mark - 设置标题 245 | - (void)setUpAllTitle 246 | { 247 | NSInteger VCCount = self.childViewControllers.count; 248 | if (VCCount == 0) return; //如果子控制器为0直接返回 249 | 250 | CGFloat customW = 80; 251 | CGFloat buttonW = (_titleButtonWidth !=0 ) ? _titleButtonWidth : (VCCount * customW < ScreenW) ? ScreenW / VCCount: customW + 20; 252 | 253 | CGFloat tH = (_titleViewHeight != 0) ? _titleViewHeight : DCNormalTitleViewH; 254 | CGFloat buttonH = tH; 255 | CGFloat buttonY = 0; 256 | CGFloat buttonX = 0; 257 | 258 | CGFloat progressH = (_progressHeight && _progressHeight < DCPagerMargin && _progressHeight > 0) ? _progressHeight : DCUnderLineH; 259 | 260 | for (NSInteger i = 0; i < VCCount; i++) { 261 | 262 | _titleButton = [UIButton buttonWithType:UIButtonTypeCustom]; 263 | UIViewController *vc = self.childViewControllers[i]; //拿到对应子控制器 264 | [_titleButton setTitle:vc.title forState:UIControlStateNormal]; 265 | [_titleButton setTitleColor:self.norColor forState:UIControlStateNormal]; 266 | _titleButton.titleLabel.font = (!_titleFont) ? DCTitleNorFont : _titleFont; 267 | _titleButton.tag = i + DCButtonTagValue; //绑定tag(增加额外值) 268 | buttonX = i * buttonW; 269 | _titleButton.frame = CGRectMake(buttonX, buttonY, buttonW, buttonH); 270 | _titleButton.backgroundColor = [UIColor clearColor]; 271 | 272 | CGFloat pace = (_progressLength && _progressLength < buttonW) ? (buttonW - _progressLength) / 2 : buttonW * 0.22;//进度条比button短多少 273 | CGFloat framex = buttonX + pace; 274 | CGFloat frameWidth = buttonW - 2 * pace; 275 | CGFloat frameY = buttonH - (progressH + 1); 276 | CGRect frame = CGRectMake(framex,frameY, frameWidth, progressH); 277 | [self.pregressFrames addObject:[NSValue valueWithCGRect:frame]]; 278 | 279 | [_titleScrollView addSubview:_titleButton]; 280 | [_titleButton addTarget:self action:@selector(titleButtonClick:) forControlEvents:UIControlEventTouchUpInside]; 281 | 282 | [self.titleButtonArray addObject:_titleButton]; 283 | 284 | if (i == 0) { //默认第0个 285 | [self titleButtonClick:_titleButton]; 286 | } 287 | } 288 | 289 | if (_isShowPregressView && !_pregressView) { //如果没子控制器的时候不加载 290 | //指示条 291 | _pregressView = [DCPagerProgressView new]; 292 | _pregressView.frame = CGRectMake(0, buttonH - (progressH + 1), VCCount * buttonW, progressH); 293 | _pregressView.itemFrames = self.pregressFrames; 294 | _pregressView.color = self.proColor.CGColor; 295 | _pregressView.backgroundColor = [UIColor clearColor]; 296 | [_titleScrollView addSubview:_pregressView]; 297 | } 298 | 299 | 300 | //设置标题是否可以滚动 301 | _titleScrollView.contentSize = CGSizeMake(VCCount * buttonW, 0); 302 | //设置滚动范围 303 | _contentScrollView.contentSize = CGSizeMake(VCCount * ScreenW, 0); 304 | } 305 | 306 | 307 | #pragma mark - 选中标题 308 | - (void)selectButton:(UIButton *)button 309 | { 310 | _lastSelectButton.transform = CGAffineTransformIdentity; //还原 311 | [_lastSelectButton setTitleColor:self.norColor forState:UIControlStateNormal]; 312 | 313 | [button setTitleColor:self.selColor forState:UIControlStateNormal]; 314 | 315 | //字体缩放 316 | if (_titleScale > 0 && _titleScale < 1) { 317 | button.transform = CGAffineTransformMakeScale(1 + _titleScale, 1 + _titleScale); 318 | 319 | } 320 | _lastSelectButton = button; 321 | 322 | 323 | _pregressView.isStretch = NO; 324 | 325 | if (_titleScrollView.contentSize.width > ScreenW) { //只有在标题ScrollView的可滚动内容大于屏幕尺寸是滚动 326 | //标题居中 327 | CGFloat offsetX = button.center.x - ScreenW * 0.5; 328 | if (offsetX < 0) { //最小 329 | offsetX = 0; 330 | } 331 | CGFloat offsetMax = _titleScrollView.contentSize.width - ScreenW; 332 | if (offsetX > offsetMax) { //最大 333 | offsetX = offsetMax; 334 | } 335 | [_titleScrollView setContentOffset:CGPointMake(offsetX, 0) animated:YES]; 336 | } 337 | } 338 | 339 | #pragma mark - 底部滚动条滚动 340 | - (void)bottomBarNaughtyWithOffset:(CGFloat)offsetx 341 | { 342 | if (offsetx < 0) //最小 343 | { 344 | offsetx = 0; 345 | } 346 | _pregressView.progress = offsetx / ScreenW; 347 | } 348 | 349 | //添加控制器View 350 | - (void)AddOneVcWithButtton:(NSInteger)i 351 | { 352 | UIViewController *vc = self.childViewControllers[i]; 353 | if (vc.view.superview)return; 354 | vc.view.frame = CGRectMake(i * ScreenW, 0,ScreenW , _contentScrollView.dc_height); 355 | [_contentScrollView addSubview:vc.view]; 356 | } 357 | 358 | 359 | #pragma mark - 标题点击 360 | - (void)titleButtonClick:(UIButton *)button 361 | { 362 | _pregressView.isStretch = NO; 363 | 364 | NSInteger buttonTag = button.tag - DCButtonTagValue; 365 | 366 | //选中标题 367 | [self selectButton:button]; 368 | 369 | //添加控制器View 370 | [self AddOneVcWithButtton:buttonTag]; 371 | 372 | //滚动到相应的位置 373 | _contentScrollView.contentOffset = CGPointMake(buttonTag * ScreenW, 0); 374 | } 375 | 376 | #pragma mark - 377 | - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView 378 | { 379 | 380 | NSInteger tagI = scrollView.contentOffset.x / ScreenW; 381 | UIButton *button = self.titleButtonArray[tagI]; 382 | 383 | [self selectButton:button]; 384 | 385 | [self AddOneVcWithButtton:tagI]; 386 | 387 | } 388 | 389 | - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView 390 | { 391 | //是否有拉伸 392 | _pregressView.isStretch = _isOpenStretch; 393 | } 394 | 395 | 396 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView 397 | { 398 | 399 | [self bottomBarNaughtyWithOffset:scrollView.contentOffset.x]; 400 | 401 | NSInteger tagI = scrollView.contentOffset.x / ScreenW; 402 | 403 | NSInteger leftI = tagI; 404 | NSInteger rightI = tagI + 1; 405 | 406 | //缩放 407 | UIButton *leftButton = self.titleButtonArray[leftI]; 408 | 409 | UIButton *rightButton; 410 | if (rightI < self.titleButtonArray.count){ 411 | rightButton = self.titleButtonArray[rightI]; 412 | } 413 | 414 | CGFloat scaleR = scrollView.contentOffset.x / ScreenW; 415 | scaleR -= leftI; 416 | 417 | CGFloat scaleL = 1 - scaleR; 418 | 419 | if (_titleScale > 0 && _titleScale < 1) { //缩放尺寸限定 420 | leftButton.transform = CGAffineTransformMakeScale(scaleL * _titleScale + 1, scaleL * _titleScale + 1); 421 | rightButton.transform = CGAffineTransformMakeScale(scaleR * _titleScale + 1, scaleR * _titleScale + 1); 422 | } 423 | 424 | 425 | if (_isOpenShade) {//开启渐变 426 | //颜色渐变 427 | CGFloat r = _endR - _startR; 428 | CGFloat g = _endG - _startG; 429 | CGFloat b = _endB - _startB; 430 | 431 | UIColor *rightColor = [UIColor colorWithRed:_startR + r * scaleR green:_startG + g * scaleR blue:_startB + b * scaleR alpha:1]; 432 | 433 | UIColor *leftColor = [UIColor colorWithRed:_startR + r * scaleL green:_startG + g * scaleL blue:_startB + b * scaleL alpha:1]; 434 | 435 | [rightButton setTitleColor:rightColor forState:UIControlStateNormal]; 436 | [leftButton setTitleColor:leftColor forState:UIControlStateNormal]; 437 | } 438 | 439 | } 440 | 441 | #pragma mark - 标题点击处理 442 | - (void)setSelectIndex:(NSInteger)selectIndex 443 | { 444 | _selectIndex = selectIndex; 445 | if (self.titleButtonArray.count) { 446 | UIButton *button = self.titleButtonArray[selectIndex]; 447 | if (_selectIndex < self.titleButtonArray.count) { 448 | UIViewController *vc = self.childViewControllers[_selectIndex]; 449 | if ([_contentScrollView.subviews containsObject:vc.view]) return; 450 | [self titleButtonClick:button]; 451 | } 452 | } 453 | } 454 | 455 | 456 | #pragma mark - 标题缩放处理 457 | - (void)setUpTitleScale:(void(^)(CGFloat *titleScale))titleScaleBlock 458 | { 459 | !titleScaleBlock ? : titleScaleBlock(&_titleScale);//titleScaleBlock回调 460 | } 461 | 462 | #pragma mark - Progress属性设置 463 | - (void)setUpProgressAttribute:(void (^)(CGFloat *progressLength, CGFloat *progressHeight))settingProgressBlock 464 | { 465 | if (_isShowPregressView == NO) return; //如果影藏Progress指示器则返回 466 | !settingProgressBlock ? : settingProgressBlock(&_progressLength,&_progressHeight); //指示器属性设置Block 467 | } 468 | 469 | #pragma mark - TopTitleView属性设置 470 | - (void)setUpTopTitleViewAttribute:(void(^)(CGFloat *topDistance, CGFloat *titleViewHeight, CGFloat *bottomDistance))settingTopTitleViewBlock 471 | { 472 | !settingTopTitleViewBlock ? : settingTopTitleViewBlock(&_topDistance,&_titleViewHeight,&_bottomDistance); 473 | 474 | } 475 | 476 | 477 | #pragma mark - get 478 | - (UIColor *)norColor 479 | { 480 | if (!_norColor) self.norColor = [UIColor blackColor]; 481 | 482 | return _norColor; 483 | } 484 | 485 | - (UIColor *)selColor 486 | { 487 | if (!_selColor) self.selColor = [UIColor redColor]; 488 | return _selColor; 489 | } 490 | 491 | - (UIColor *)proColor 492 | { 493 | if (!_proColor) self.proColor = self.selColor; 494 | return _proColor; 495 | } 496 | 497 | 498 | - (UIColor *)titleScrollViewBgColor 499 | { 500 | if (!_titleScrollViewBgColor) self.titleScrollViewBgColor = [UIColor whiteColor]; 501 | 502 | return _titleScrollViewBgColor; 503 | } 504 | 505 | 506 | 507 | 508 | #pragma mark - set 509 | - (void)setNorColor:(UIColor *)norColor 510 | { 511 | _norColor = norColor; 512 | [self setupStartColor:norColor]; 513 | 514 | } 515 | - (void)setSelColor:(UIColor *)selColor 516 | { 517 | _selColor = selColor; 518 | [self setupEndColor:selColor]; 519 | } 520 | 521 | - (void)setTitleScrollViewBgColor:(UIColor *)titleScrollViewBgColor 522 | { 523 | _titleScrollViewBgColor = titleScrollViewBgColor; 524 | 525 | self.titleScrollView.backgroundColor = titleScrollViewBgColor; 526 | } 527 | 528 | 529 | - (void)setupStartColor:(UIColor *)color 530 | { 531 | CGFloat components[3]; 532 | 533 | [self getRGBComponents:components forColor:color]; 534 | 535 | _startR = components[0]; 536 | _startG = components[1]; 537 | _startB = components[2]; 538 | } 539 | 540 | - (void)setupEndColor:(UIColor *)color 541 | { 542 | CGFloat components[3]; 543 | 544 | [self getRGBComponents:components forColor:color]; 545 | 546 | _endR = components[0]; 547 | _endG = components[1]; 548 | _endB = components[2]; 549 | } 550 | 551 | 552 | /** 553 | * 指定颜色,获取颜色的RGB值 554 | * 555 | * @param components RGB数组 556 | * @param color 颜色 557 | */ 558 | - (void)getRGBComponents:(CGFloat [3])components forColor:(UIColor *)color { 559 | CGColorSpaceRef rgbColorSpace = CGColorSpaceCreateDeviceRGB(); 560 | unsigned char resultingPixel[4]; 561 | CGContextRef context = CGBitmapContextCreate(&resultingPixel,1,1,8,4,rgbColorSpace,1); 562 | CGContextSetFillColorWithColor(context, [color CGColor]); 563 | CGContextFillRect(context, CGRectMake(0, 0, 1, 1)); 564 | CGContextRelease(context); 565 | CGColorSpaceRelease(rgbColorSpace); 566 | for (int component = 0; component < 3; component++) { 567 | components[component] = resultingPixel[component] / 255.0f; 568 | } 569 | } 570 | 571 | @end 572 | -------------------------------------------------------------------------------- /CDDPagerControllerDemo/CDDPagerControllerDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 104AD5F565D588E6625F923E /* libPods-CDDPagerControllerDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B0B1D212E9CA64E980F5CCA3 /* libPods-CDDPagerControllerDemo.a */; }; 11 | 186CFA961F6149EE006A9A9A /* DCDemo05ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 186CFA951F6149EE006A9A9A /* DCDemo05ViewController.m */; }; 12 | 18EF4B871F5E8E2200E69BC4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 18EF4B861F5E8E2200E69BC4 /* main.m */; }; 13 | 18EF4B8A1F5E8E2200E69BC4 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 18EF4B891F5E8E2200E69BC4 /* AppDelegate.m */; }; 14 | 18EF4B901F5E8E2200E69BC4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 18EF4B8E1F5E8E2200E69BC4 /* Main.storyboard */; }; 15 | 18EF4B921F5E8E2200E69BC4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 18EF4B911F5E8E2200E69BC4 /* Assets.xcassets */; }; 16 | 18EF4B951F5E8E2200E69BC4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 18EF4B931F5E8E2200E69BC4 /* LaunchScreen.storyboard */; }; 17 | 18EF4BA61F5E8E8300E69BC4 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 18EF4B9D1F5E8E8300E69BC4 /* ViewController.m */; }; 18 | 18EF4BA71F5E8E8300E69BC4 /* DCDemo01ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 18EF4B9F1F5E8E8300E69BC4 /* DCDemo01ViewController.m */; }; 19 | 18EF4BA81F5E8E8300E69BC4 /* DCDemo02ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 18EF4BA11F5E8E8300E69BC4 /* DCDemo02ViewController.m */; }; 20 | 18EF4BA91F5E8E8300E69BC4 /* DCDemo03ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 18EF4BA31F5E8E8300E69BC4 /* DCDemo03ViewController.m */; }; 21 | 18EF4BAA1F5E8E8300E69BC4 /* DCDemo04ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 18EF4BA51F5E8E8300E69BC4 /* DCDemo04ViewController.m */; }; 22 | 9C34A910209FDFA8001C906A /* DCPagerConsts.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C34A904209FDFA8001C906A /* DCPagerConsts.m */; }; 23 | 9C34A911209FDFA8001C906A /* UIView+DCPagerFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C34A909209FDFA8001C906A /* UIView+DCPagerFrame.m */; }; 24 | 9C34A912209FDFA8001C906A /* DCPagerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C34A90C209FDFA8001C906A /* DCPagerController.m */; }; 25 | 9C34A913209FDFA8001C906A /* DCPagerProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C34A90F209FDFA8001C906A /* DCPagerProgressView.m */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXFileReference section */ 29 | 186CFA941F6149EE006A9A9A /* DCDemo05ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DCDemo05ViewController.h; sourceTree = ""; }; 30 | 186CFA951F6149EE006A9A9A /* DCDemo05ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DCDemo05ViewController.m; sourceTree = ""; }; 31 | 18EF4B821F5E8E2200E69BC4 /* CDDPagerControllerDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CDDPagerControllerDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | 18EF4B861F5E8E2200E69BC4 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 33 | 18EF4B881F5E8E2200E69BC4 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 34 | 18EF4B891F5E8E2200E69BC4 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 35 | 18EF4B8F1F5E8E2200E69BC4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 36 | 18EF4B911F5E8E2200E69BC4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 37 | 18EF4B941F5E8E2200E69BC4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 38 | 18EF4B961F5E8E2200E69BC4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 39 | 18EF4B9C1F5E8E8300E69BC4 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 40 | 18EF4B9D1F5E8E8300E69BC4 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 41 | 18EF4B9E1F5E8E8300E69BC4 /* DCDemo01ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DCDemo01ViewController.h; sourceTree = ""; }; 42 | 18EF4B9F1F5E8E8300E69BC4 /* DCDemo01ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DCDemo01ViewController.m; sourceTree = ""; }; 43 | 18EF4BA01F5E8E8300E69BC4 /* DCDemo02ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DCDemo02ViewController.h; sourceTree = ""; }; 44 | 18EF4BA11F5E8E8300E69BC4 /* DCDemo02ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DCDemo02ViewController.m; sourceTree = ""; }; 45 | 18EF4BA21F5E8E8300E69BC4 /* DCDemo03ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DCDemo03ViewController.h; sourceTree = ""; }; 46 | 18EF4BA31F5E8E8300E69BC4 /* DCDemo03ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DCDemo03ViewController.m; sourceTree = ""; }; 47 | 18EF4BA41F5E8E8300E69BC4 /* DCDemo04ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DCDemo04ViewController.h; sourceTree = ""; }; 48 | 18EF4BA51F5E8E8300E69BC4 /* DCDemo04ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DCDemo04ViewController.m; sourceTree = ""; }; 49 | 7BC5D74F34FA6B1A12E74A40 /* Pods-CDDPagerControllerDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CDDPagerControllerDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CDDPagerControllerDemo/Pods-CDDPagerControllerDemo.debug.xcconfig"; sourceTree = ""; }; 50 | 8C86828A10F1F7184D862133 /* Pods-CDDPagerControllerDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CDDPagerControllerDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-CDDPagerControllerDemo/Pods-CDDPagerControllerDemo.release.xcconfig"; sourceTree = ""; }; 51 | 9C34A903209FDFA8001C906A /* DCPagerConsts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DCPagerConsts.h; sourceTree = ""; }; 52 | 9C34A904209FDFA8001C906A /* DCPagerConsts.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DCPagerConsts.m; sourceTree = ""; }; 53 | 9C34A906209FDFA8001C906A /* DCPagerMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DCPagerMacros.h; sourceTree = ""; }; 54 | 9C34A908209FDFA8001C906A /* UIView+DCPagerFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+DCPagerFrame.h"; sourceTree = ""; }; 55 | 9C34A909209FDFA8001C906A /* UIView+DCPagerFrame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+DCPagerFrame.m"; sourceTree = ""; }; 56 | 9C34A90B209FDFA8001C906A /* DCPagerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DCPagerController.h; sourceTree = ""; }; 57 | 9C34A90C209FDFA8001C906A /* DCPagerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DCPagerController.m; sourceTree = ""; }; 58 | 9C34A90E209FDFA8001C906A /* DCPagerProgressView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DCPagerProgressView.h; sourceTree = ""; }; 59 | 9C34A90F209FDFA8001C906A /* DCPagerProgressView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DCPagerProgressView.m; sourceTree = ""; }; 60 | 9C34A914209FE901001C906A /* DCPageKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DCPageKit.h; sourceTree = ""; }; 61 | B0B1D212E9CA64E980F5CCA3 /* libPods-CDDPagerControllerDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-CDDPagerControllerDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 62 | /* End PBXFileReference section */ 63 | 64 | /* Begin PBXFrameworksBuildPhase section */ 65 | 18EF4B7F1F5E8E2200E69BC4 /* Frameworks */ = { 66 | isa = PBXFrameworksBuildPhase; 67 | buildActionMask = 2147483647; 68 | files = ( 69 | 104AD5F565D588E6625F923E /* libPods-CDDPagerControllerDemo.a in Frameworks */, 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | /* End PBXFrameworksBuildPhase section */ 74 | 75 | /* Begin PBXGroup section */ 76 | 18EF4B791F5E8E2200E69BC4 = { 77 | isa = PBXGroup; 78 | children = ( 79 | 18EF4B841F5E8E2200E69BC4 /* CDDPagerControllerDemo */, 80 | 18EF4B831F5E8E2200E69BC4 /* Products */, 81 | 7DBFECA7309992CD30E56142 /* Pods */, 82 | BA645F8134E20DCD627083B5 /* Frameworks */, 83 | ); 84 | sourceTree = ""; 85 | }; 86 | 18EF4B831F5E8E2200E69BC4 /* Products */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 18EF4B821F5E8E2200E69BC4 /* CDDPagerControllerDemo.app */, 90 | ); 91 | name = Products; 92 | sourceTree = ""; 93 | }; 94 | 18EF4B841F5E8E2200E69BC4 /* CDDPagerControllerDemo */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 9C34A900209FDFA8001C906A /* CDDPagerController */, 98 | 18EF4B9C1F5E8E8300E69BC4 /* ViewController.h */, 99 | 18EF4B9D1F5E8E8300E69BC4 /* ViewController.m */, 100 | 18EF4B9E1F5E8E8300E69BC4 /* DCDemo01ViewController.h */, 101 | 18EF4B9F1F5E8E8300E69BC4 /* DCDemo01ViewController.m */, 102 | 18EF4BA01F5E8E8300E69BC4 /* DCDemo02ViewController.h */, 103 | 18EF4BA11F5E8E8300E69BC4 /* DCDemo02ViewController.m */, 104 | 18EF4BA21F5E8E8300E69BC4 /* DCDemo03ViewController.h */, 105 | 18EF4BA31F5E8E8300E69BC4 /* DCDemo03ViewController.m */, 106 | 18EF4BA41F5E8E8300E69BC4 /* DCDemo04ViewController.h */, 107 | 18EF4BA51F5E8E8300E69BC4 /* DCDemo04ViewController.m */, 108 | 186CFA941F6149EE006A9A9A /* DCDemo05ViewController.h */, 109 | 186CFA951F6149EE006A9A9A /* DCDemo05ViewController.m */, 110 | 18EF4B851F5E8E2200E69BC4 /* Supporting Files */, 111 | ); 112 | path = CDDPagerControllerDemo; 113 | sourceTree = ""; 114 | }; 115 | 18EF4B851F5E8E2200E69BC4 /* Supporting Files */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | 18EF4B881F5E8E2200E69BC4 /* AppDelegate.h */, 119 | 18EF4B891F5E8E2200E69BC4 /* AppDelegate.m */, 120 | 18EF4B8E1F5E8E2200E69BC4 /* Main.storyboard */, 121 | 18EF4B911F5E8E2200E69BC4 /* Assets.xcassets */, 122 | 18EF4B931F5E8E2200E69BC4 /* LaunchScreen.storyboard */, 123 | 18EF4B961F5E8E2200E69BC4 /* Info.plist */, 124 | 18EF4B861F5E8E2200E69BC4 /* main.m */, 125 | ); 126 | name = "Supporting Files"; 127 | sourceTree = ""; 128 | }; 129 | 7DBFECA7309992CD30E56142 /* Pods */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | 7BC5D74F34FA6B1A12E74A40 /* Pods-CDDPagerControllerDemo.debug.xcconfig */, 133 | 8C86828A10F1F7184D862133 /* Pods-CDDPagerControllerDemo.release.xcconfig */, 134 | ); 135 | name = Pods; 136 | sourceTree = ""; 137 | }; 138 | 9C34A900209FDFA8001C906A /* CDDPagerController */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | 9C34A901209FDFA8001C906A /* Expand(扩展) */, 142 | 9C34A90A209FDFA8001C906A /* Controller */, 143 | 9C34A90D209FDFA8001C906A /* View */, 144 | ); 145 | name = CDDPagerController; 146 | path = ../../CDDPagerController; 147 | sourceTree = ""; 148 | }; 149 | 9C34A901209FDFA8001C906A /* Expand(扩展) */ = { 150 | isa = PBXGroup; 151 | children = ( 152 | 9C34A902209FDFA8001C906A /* Const(常量) */, 153 | 9C34A905209FDFA8001C906A /* Macros(宏) */, 154 | 9C34A907209FDFA8001C906A /* Category(分类) */, 155 | ); 156 | path = "Expand(扩展)"; 157 | sourceTree = ""; 158 | }; 159 | 9C34A902209FDFA8001C906A /* Const(常量) */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | 9C34A903209FDFA8001C906A /* DCPagerConsts.h */, 163 | 9C34A904209FDFA8001C906A /* DCPagerConsts.m */, 164 | ); 165 | path = "Const(常量)"; 166 | sourceTree = ""; 167 | }; 168 | 9C34A905209FDFA8001C906A /* Macros(宏) */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | 9C34A914209FE901001C906A /* DCPageKit.h */, 172 | 9C34A906209FDFA8001C906A /* DCPagerMacros.h */, 173 | ); 174 | path = "Macros(宏)"; 175 | sourceTree = ""; 176 | }; 177 | 9C34A907209FDFA8001C906A /* Category(分类) */ = { 178 | isa = PBXGroup; 179 | children = ( 180 | 9C34A908209FDFA8001C906A /* UIView+DCPagerFrame.h */, 181 | 9C34A909209FDFA8001C906A /* UIView+DCPagerFrame.m */, 182 | ); 183 | path = "Category(分类)"; 184 | sourceTree = ""; 185 | }; 186 | 9C34A90A209FDFA8001C906A /* Controller */ = { 187 | isa = PBXGroup; 188 | children = ( 189 | 9C34A90B209FDFA8001C906A /* DCPagerController.h */, 190 | 9C34A90C209FDFA8001C906A /* DCPagerController.m */, 191 | ); 192 | path = Controller; 193 | sourceTree = ""; 194 | }; 195 | 9C34A90D209FDFA8001C906A /* View */ = { 196 | isa = PBXGroup; 197 | children = ( 198 | 9C34A90E209FDFA8001C906A /* DCPagerProgressView.h */, 199 | 9C34A90F209FDFA8001C906A /* DCPagerProgressView.m */, 200 | ); 201 | path = View; 202 | sourceTree = ""; 203 | }; 204 | BA645F8134E20DCD627083B5 /* Frameworks */ = { 205 | isa = PBXGroup; 206 | children = ( 207 | B0B1D212E9CA64E980F5CCA3 /* libPods-CDDPagerControllerDemo.a */, 208 | ); 209 | name = Frameworks; 210 | sourceTree = ""; 211 | }; 212 | /* End PBXGroup section */ 213 | 214 | /* Begin PBXNativeTarget section */ 215 | 18EF4B811F5E8E2200E69BC4 /* CDDPagerControllerDemo */ = { 216 | isa = PBXNativeTarget; 217 | buildConfigurationList = 18EF4B991F5E8E2200E69BC4 /* Build configuration list for PBXNativeTarget "CDDPagerControllerDemo" */; 218 | buildPhases = ( 219 | D06F068CCF0A1BFE4E577D0B /* [CP] Check Pods Manifest.lock */, 220 | 18EF4B7E1F5E8E2200E69BC4 /* Sources */, 221 | 18EF4B7F1F5E8E2200E69BC4 /* Frameworks */, 222 | 18EF4B801F5E8E2200E69BC4 /* Resources */, 223 | ); 224 | buildRules = ( 225 | ); 226 | dependencies = ( 227 | ); 228 | name = CDDPagerControllerDemo; 229 | productName = CDDPagerControllerDemo; 230 | productReference = 18EF4B821F5E8E2200E69BC4 /* CDDPagerControllerDemo.app */; 231 | productType = "com.apple.product-type.application"; 232 | }; 233 | /* End PBXNativeTarget section */ 234 | 235 | /* Begin PBXProject section */ 236 | 18EF4B7A1F5E8E2200E69BC4 /* Project object */ = { 237 | isa = PBXProject; 238 | attributes = { 239 | CLASSPREFIX = DC; 240 | LastUpgradeCheck = 0830; 241 | ORGANIZATIONNAME = RocketsChen; 242 | TargetAttributes = { 243 | 18EF4B811F5E8E2200E69BC4 = { 244 | CreatedOnToolsVersion = 8.3.3; 245 | DevelopmentTeam = U3QZXY69QQ; 246 | ProvisioningStyle = Automatic; 247 | }; 248 | }; 249 | }; 250 | buildConfigurationList = 18EF4B7D1F5E8E2200E69BC4 /* Build configuration list for PBXProject "CDDPagerControllerDemo" */; 251 | compatibilityVersion = "Xcode 3.2"; 252 | developmentRegion = English; 253 | hasScannedForEncodings = 0; 254 | knownRegions = ( 255 | English, 256 | en, 257 | Base, 258 | ); 259 | mainGroup = 18EF4B791F5E8E2200E69BC4; 260 | productRefGroup = 18EF4B831F5E8E2200E69BC4 /* Products */; 261 | projectDirPath = ""; 262 | projectRoot = ""; 263 | targets = ( 264 | 18EF4B811F5E8E2200E69BC4 /* CDDPagerControllerDemo */, 265 | ); 266 | }; 267 | /* End PBXProject section */ 268 | 269 | /* Begin PBXResourcesBuildPhase section */ 270 | 18EF4B801F5E8E2200E69BC4 /* Resources */ = { 271 | isa = PBXResourcesBuildPhase; 272 | buildActionMask = 2147483647; 273 | files = ( 274 | 18EF4B951F5E8E2200E69BC4 /* LaunchScreen.storyboard in Resources */, 275 | 18EF4B921F5E8E2200E69BC4 /* Assets.xcassets in Resources */, 276 | 18EF4B901F5E8E2200E69BC4 /* Main.storyboard in Resources */, 277 | ); 278 | runOnlyForDeploymentPostprocessing = 0; 279 | }; 280 | /* End PBXResourcesBuildPhase section */ 281 | 282 | /* Begin PBXShellScriptBuildPhase section */ 283 | D06F068CCF0A1BFE4E577D0B /* [CP] Check Pods Manifest.lock */ = { 284 | isa = PBXShellScriptBuildPhase; 285 | buildActionMask = 2147483647; 286 | files = ( 287 | ); 288 | inputPaths = ( 289 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 290 | "${PODS_ROOT}/Manifest.lock", 291 | ); 292 | name = "[CP] Check Pods Manifest.lock"; 293 | outputPaths = ( 294 | "$(DERIVED_FILE_DIR)/Pods-CDDPagerControllerDemo-checkManifestLockResult.txt", 295 | ); 296 | runOnlyForDeploymentPostprocessing = 0; 297 | shellPath = /bin/sh; 298 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 299 | showEnvVarsInLog = 0; 300 | }; 301 | /* End PBXShellScriptBuildPhase section */ 302 | 303 | /* Begin PBXSourcesBuildPhase section */ 304 | 18EF4B7E1F5E8E2200E69BC4 /* Sources */ = { 305 | isa = PBXSourcesBuildPhase; 306 | buildActionMask = 2147483647; 307 | files = ( 308 | 18EF4BA61F5E8E8300E69BC4 /* ViewController.m in Sources */, 309 | 18EF4BA91F5E8E8300E69BC4 /* DCDemo03ViewController.m in Sources */, 310 | 9C34A912209FDFA8001C906A /* DCPagerController.m in Sources */, 311 | 9C34A910209FDFA8001C906A /* DCPagerConsts.m in Sources */, 312 | 18EF4BAA1F5E8E8300E69BC4 /* DCDemo04ViewController.m in Sources */, 313 | 18EF4B8A1F5E8E2200E69BC4 /* AppDelegate.m in Sources */, 314 | 18EF4BA81F5E8E8300E69BC4 /* DCDemo02ViewController.m in Sources */, 315 | 186CFA961F6149EE006A9A9A /* DCDemo05ViewController.m in Sources */, 316 | 9C34A911209FDFA8001C906A /* UIView+DCPagerFrame.m in Sources */, 317 | 18EF4B871F5E8E2200E69BC4 /* main.m in Sources */, 318 | 9C34A913209FDFA8001C906A /* DCPagerProgressView.m in Sources */, 319 | 18EF4BA71F5E8E8300E69BC4 /* DCDemo01ViewController.m in Sources */, 320 | ); 321 | runOnlyForDeploymentPostprocessing = 0; 322 | }; 323 | /* End PBXSourcesBuildPhase section */ 324 | 325 | /* Begin PBXVariantGroup section */ 326 | 18EF4B8E1F5E8E2200E69BC4 /* Main.storyboard */ = { 327 | isa = PBXVariantGroup; 328 | children = ( 329 | 18EF4B8F1F5E8E2200E69BC4 /* Base */, 330 | ); 331 | name = Main.storyboard; 332 | sourceTree = ""; 333 | }; 334 | 18EF4B931F5E8E2200E69BC4 /* LaunchScreen.storyboard */ = { 335 | isa = PBXVariantGroup; 336 | children = ( 337 | 18EF4B941F5E8E2200E69BC4 /* Base */, 338 | ); 339 | name = LaunchScreen.storyboard; 340 | sourceTree = ""; 341 | }; 342 | /* End PBXVariantGroup section */ 343 | 344 | /* Begin XCBuildConfiguration section */ 345 | 18EF4B971F5E8E2200E69BC4 /* Debug */ = { 346 | isa = XCBuildConfiguration; 347 | buildSettings = { 348 | ALWAYS_SEARCH_USER_PATHS = NO; 349 | CLANG_ANALYZER_NONNULL = YES; 350 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 351 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 352 | CLANG_CXX_LIBRARY = "libc++"; 353 | CLANG_ENABLE_MODULES = YES; 354 | CLANG_ENABLE_OBJC_ARC = YES; 355 | CLANG_WARN_BOOL_CONVERSION = YES; 356 | CLANG_WARN_CONSTANT_CONVERSION = YES; 357 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 358 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 359 | CLANG_WARN_EMPTY_BODY = YES; 360 | CLANG_WARN_ENUM_CONVERSION = YES; 361 | CLANG_WARN_INFINITE_RECURSION = YES; 362 | CLANG_WARN_INT_CONVERSION = YES; 363 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 364 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 365 | CLANG_WARN_UNREACHABLE_CODE = YES; 366 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 367 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 368 | COPY_PHASE_STRIP = NO; 369 | DEBUG_INFORMATION_FORMAT = dwarf; 370 | ENABLE_STRICT_OBJC_MSGSEND = YES; 371 | ENABLE_TESTABILITY = YES; 372 | GCC_C_LANGUAGE_STANDARD = gnu99; 373 | GCC_DYNAMIC_NO_PIC = NO; 374 | GCC_NO_COMMON_BLOCKS = YES; 375 | GCC_OPTIMIZATION_LEVEL = 0; 376 | GCC_PREPROCESSOR_DEFINITIONS = ( 377 | "DEBUG=1", 378 | "$(inherited)", 379 | ); 380 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 381 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 382 | GCC_WARN_UNDECLARED_SELECTOR = YES; 383 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 384 | GCC_WARN_UNUSED_FUNCTION = YES; 385 | GCC_WARN_UNUSED_VARIABLE = YES; 386 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 387 | MTL_ENABLE_DEBUG_INFO = YES; 388 | ONLY_ACTIVE_ARCH = YES; 389 | SDKROOT = iphoneos; 390 | }; 391 | name = Debug; 392 | }; 393 | 18EF4B981F5E8E2200E69BC4 /* Release */ = { 394 | isa = XCBuildConfiguration; 395 | buildSettings = { 396 | ALWAYS_SEARCH_USER_PATHS = NO; 397 | CLANG_ANALYZER_NONNULL = YES; 398 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 399 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 400 | CLANG_CXX_LIBRARY = "libc++"; 401 | CLANG_ENABLE_MODULES = YES; 402 | CLANG_ENABLE_OBJC_ARC = YES; 403 | CLANG_WARN_BOOL_CONVERSION = YES; 404 | CLANG_WARN_CONSTANT_CONVERSION = YES; 405 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 406 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 407 | CLANG_WARN_EMPTY_BODY = YES; 408 | CLANG_WARN_ENUM_CONVERSION = YES; 409 | CLANG_WARN_INFINITE_RECURSION = YES; 410 | CLANG_WARN_INT_CONVERSION = YES; 411 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 412 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 413 | CLANG_WARN_UNREACHABLE_CODE = YES; 414 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 415 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 416 | COPY_PHASE_STRIP = NO; 417 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 418 | ENABLE_NS_ASSERTIONS = NO; 419 | ENABLE_STRICT_OBJC_MSGSEND = YES; 420 | GCC_C_LANGUAGE_STANDARD = gnu99; 421 | GCC_NO_COMMON_BLOCKS = YES; 422 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 423 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 424 | GCC_WARN_UNDECLARED_SELECTOR = YES; 425 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 426 | GCC_WARN_UNUSED_FUNCTION = YES; 427 | GCC_WARN_UNUSED_VARIABLE = YES; 428 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 429 | MTL_ENABLE_DEBUG_INFO = NO; 430 | SDKROOT = iphoneos; 431 | VALIDATE_PRODUCT = YES; 432 | }; 433 | name = Release; 434 | }; 435 | 18EF4B9A1F5E8E2200E69BC4 /* Debug */ = { 436 | isa = XCBuildConfiguration; 437 | baseConfigurationReference = 7BC5D74F34FA6B1A12E74A40 /* Pods-CDDPagerControllerDemo.debug.xcconfig */; 438 | buildSettings = { 439 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 440 | DEVELOPMENT_TEAM = U3QZXY69QQ; 441 | INFOPLIST_FILE = CDDPagerControllerDemo/Info.plist; 442 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 443 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 444 | MARKETING_VERSION = 1.1.7; 445 | PRODUCT_BUNDLE_IDENTIFIER = com.STO.RocketsChen.CDDPagerControllerDemo; 446 | PRODUCT_NAME = "$(TARGET_NAME)"; 447 | }; 448 | name = Debug; 449 | }; 450 | 18EF4B9B1F5E8E2200E69BC4 /* Release */ = { 451 | isa = XCBuildConfiguration; 452 | baseConfigurationReference = 8C86828A10F1F7184D862133 /* Pods-CDDPagerControllerDemo.release.xcconfig */; 453 | buildSettings = { 454 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 455 | DEVELOPMENT_TEAM = U3QZXY69QQ; 456 | INFOPLIST_FILE = CDDPagerControllerDemo/Info.plist; 457 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 458 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 459 | MARKETING_VERSION = 1.1.7; 460 | PRODUCT_BUNDLE_IDENTIFIER = com.STO.RocketsChen.CDDPagerControllerDemo; 461 | PRODUCT_NAME = "$(TARGET_NAME)"; 462 | }; 463 | name = Release; 464 | }; 465 | /* End XCBuildConfiguration section */ 466 | 467 | /* Begin XCConfigurationList section */ 468 | 18EF4B7D1F5E8E2200E69BC4 /* Build configuration list for PBXProject "CDDPagerControllerDemo" */ = { 469 | isa = XCConfigurationList; 470 | buildConfigurations = ( 471 | 18EF4B971F5E8E2200E69BC4 /* Debug */, 472 | 18EF4B981F5E8E2200E69BC4 /* Release */, 473 | ); 474 | defaultConfigurationIsVisible = 0; 475 | defaultConfigurationName = Release; 476 | }; 477 | 18EF4B991F5E8E2200E69BC4 /* Build configuration list for PBXNativeTarget "CDDPagerControllerDemo" */ = { 478 | isa = XCConfigurationList; 479 | buildConfigurations = ( 480 | 18EF4B9A1F5E8E2200E69BC4 /* Debug */, 481 | 18EF4B9B1F5E8E2200E69BC4 /* Release */, 482 | ); 483 | defaultConfigurationIsVisible = 0; 484 | defaultConfigurationName = Release; 485 | }; 486 | /* End XCConfigurationList section */ 487 | }; 488 | rootObject = 18EF4B7A1F5E8E2200E69BC4 /* Project object */; 489 | } 490 | --------------------------------------------------------------------------------