Repository: CrabMen/CMPageTitleView Branch: master Commit: 0abf0460d618 Files: 161 Total size: 552.9 KB Directory structure: gitextract_ict2499d/ ├── .gitignore ├── CMPageTitleView/ │ ├── CMPageTitleView/ │ │ ├── Class/ │ │ │ ├── CMPageContentView.h │ │ │ ├── CMPageContentView.m │ │ │ ├── CMPageTitleConfig.h │ │ │ ├── CMPageTitleConfig.m │ │ │ ├── CMPageTitleContentView.h │ │ │ ├── CMPageTitleContentView.m │ │ │ ├── CMPageTitleView.h │ │ │ ├── CMPageTitleView.m │ │ │ ├── CMPageTitleViewMacro.h │ │ │ ├── UIView+CMCommon.h │ │ │ └── UIView+CMCommon.m │ │ ├── Demo/ │ │ │ ├── CMChildTableController.h │ │ │ ├── CMChildTableController.m │ │ │ ├── CMMainTableController.h │ │ │ ├── CMMainTableController.m │ │ │ ├── CMViewController.h │ │ │ └── CMViewController.m │ │ └── Other/ │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets/ │ │ │ ├── AppIcon.appiconset/ │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ ├── add.imageset/ │ │ │ │ └── Contents.json │ │ │ └── background_image.imageset/ │ │ │ └── Contents.json │ │ ├── Base.lproj/ │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── main.m │ ├── CMPageTitleView.xcodeproj/ │ │ ├── project.pbxproj │ │ └── project.xcworkspace/ │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata/ │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings │ ├── CMPageTitleView.xcworkspace/ │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata/ │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings │ ├── Podfile │ └── Pods/ │ ├── MJRefresh/ │ │ ├── LICENSE │ │ ├── MJRefresh/ │ │ │ ├── Base/ │ │ │ │ ├── MJRefreshAutoFooter.h │ │ │ │ ├── MJRefreshAutoFooter.m │ │ │ │ ├── MJRefreshBackFooter.h │ │ │ │ ├── MJRefreshBackFooter.m │ │ │ │ ├── MJRefreshComponent.h │ │ │ │ ├── MJRefreshComponent.m │ │ │ │ ├── MJRefreshFooter.h │ │ │ │ ├── MJRefreshFooter.m │ │ │ │ ├── MJRefreshHeader.h │ │ │ │ └── MJRefreshHeader.m │ │ │ ├── Custom/ │ │ │ │ ├── Footer/ │ │ │ │ │ ├── Auto/ │ │ │ │ │ │ ├── MJRefreshAutoGifFooter.h │ │ │ │ │ │ ├── MJRefreshAutoGifFooter.m │ │ │ │ │ │ ├── MJRefreshAutoNormalFooter.h │ │ │ │ │ │ ├── MJRefreshAutoNormalFooter.m │ │ │ │ │ │ ├── MJRefreshAutoStateFooter.h │ │ │ │ │ │ └── MJRefreshAutoStateFooter.m │ │ │ │ │ └── Back/ │ │ │ │ │ ├── MJRefreshBackGifFooter.h │ │ │ │ │ ├── MJRefreshBackGifFooter.m │ │ │ │ │ ├── MJRefreshBackNormalFooter.h │ │ │ │ │ ├── MJRefreshBackNormalFooter.m │ │ │ │ │ ├── MJRefreshBackStateFooter.h │ │ │ │ │ └── MJRefreshBackStateFooter.m │ │ │ │ └── Header/ │ │ │ │ ├── MJRefreshGifHeader.h │ │ │ │ ├── MJRefreshGifHeader.m │ │ │ │ ├── MJRefreshNormalHeader.h │ │ │ │ ├── MJRefreshNormalHeader.m │ │ │ │ ├── MJRefreshStateHeader.h │ │ │ │ └── MJRefreshStateHeader.m │ │ │ ├── MJRefresh.bundle/ │ │ │ │ ├── en.lproj/ │ │ │ │ │ └── Localizable.strings │ │ │ │ ├── ko.lproj/ │ │ │ │ │ └── Localizable.strings │ │ │ │ ├── ru.lproj/ │ │ │ │ │ └── Localizable.strings │ │ │ │ ├── uk.lproj/ │ │ │ │ │ └── Localizable.strings │ │ │ │ ├── zh-Hans.lproj/ │ │ │ │ │ └── Localizable.strings │ │ │ │ └── zh-Hant.lproj/ │ │ │ │ └── Localizable.strings │ │ │ ├── MJRefresh.h │ │ │ ├── MJRefreshConfig.h │ │ │ ├── MJRefreshConfig.m │ │ │ ├── MJRefreshConst.h │ │ │ ├── MJRefreshConst.m │ │ │ ├── NSBundle+MJRefresh.h │ │ │ ├── NSBundle+MJRefresh.m │ │ │ ├── UIScrollView+MJExtension.h │ │ │ ├── UIScrollView+MJExtension.m │ │ │ ├── UIScrollView+MJRefresh.h │ │ │ ├── UIScrollView+MJRefresh.m │ │ │ ├── UIView+MJExtension.h │ │ │ └── UIView+MJExtension.m │ │ └── README.md │ ├── Masonry/ │ │ ├── LICENSE │ │ ├── Masonry/ │ │ │ ├── MASCompositeConstraint.h │ │ │ ├── MASCompositeConstraint.m │ │ │ ├── MASConstraint+Private.h │ │ │ ├── MASConstraint.h │ │ │ ├── MASConstraint.m │ │ │ ├── MASConstraintMaker.h │ │ │ ├── MASConstraintMaker.m │ │ │ ├── MASLayoutConstraint.h │ │ │ ├── MASLayoutConstraint.m │ │ │ ├── MASUtilities.h │ │ │ ├── MASViewAttribute.h │ │ │ ├── MASViewAttribute.m │ │ │ ├── MASViewConstraint.h │ │ │ ├── MASViewConstraint.m │ │ │ ├── Masonry.h │ │ │ ├── NSArray+MASAdditions.h │ │ │ ├── NSArray+MASAdditions.m │ │ │ ├── NSArray+MASShorthandAdditions.h │ │ │ ├── NSLayoutConstraint+MASDebugAdditions.h │ │ │ ├── NSLayoutConstraint+MASDebugAdditions.m │ │ │ ├── View+MASAdditions.h │ │ │ ├── View+MASAdditions.m │ │ │ ├── View+MASShorthandAdditions.h │ │ │ ├── ViewController+MASAdditions.h │ │ │ └── ViewController+MASAdditions.m │ │ └── README.md │ ├── Pods.xcodeproj/ │ │ └── project.pbxproj │ └── Target Support Files/ │ ├── MJRefresh/ │ │ ├── MJRefresh-Info.plist │ │ ├── MJRefresh-dummy.m │ │ ├── MJRefresh-prefix.pch │ │ ├── MJRefresh-umbrella.h │ │ ├── MJRefresh.debug.xcconfig │ │ ├── MJRefresh.modulemap │ │ └── MJRefresh.release.xcconfig │ ├── Masonry/ │ │ ├── Masonry-Info.plist │ │ ├── Masonry-dummy.m │ │ ├── Masonry-prefix.pch │ │ ├── Masonry-umbrella.h │ │ ├── Masonry.debug.xcconfig │ │ ├── Masonry.modulemap │ │ ├── Masonry.release.xcconfig │ │ └── Masonry.xcconfig │ ├── Pods-CMPageTitleView/ │ │ ├── Pods-CMPageTitleView-Info.plist │ │ ├── Pods-CMPageTitleView-acknowledgements.markdown │ │ ├── Pods-CMPageTitleView-acknowledgements.plist │ │ ├── Pods-CMPageTitleView-dummy.m │ │ ├── Pods-CMPageTitleView-frameworks-Debug-input-files.xcfilelist │ │ ├── Pods-CMPageTitleView-frameworks-Debug-output-files.xcfilelist │ │ ├── Pods-CMPageTitleView-frameworks-Release-input-files.xcfilelist │ │ ├── Pods-CMPageTitleView-frameworks-Release-output-files.xcfilelist │ │ ├── Pods-CMPageTitleView-frameworks.sh │ │ ├── Pods-CMPageTitleView-umbrella.h │ │ ├── Pods-CMPageTitleView.debug.xcconfig │ │ ├── Pods-CMPageTitleView.modulemap │ │ └── Pods-CMPageTitleView.release.xcconfig │ ├── Pods-CMPageTitleViewTests/ │ │ ├── Pods-CMPageTitleViewTests-Info.plist │ │ ├── Pods-CMPageTitleViewTests-acknowledgements.markdown │ │ ├── Pods-CMPageTitleViewTests-acknowledgements.plist │ │ ├── Pods-CMPageTitleViewTests-dummy.m │ │ ├── Pods-CMPageTitleViewTests-frameworks.sh │ │ ├── Pods-CMPageTitleViewTests-umbrella.h │ │ ├── Pods-CMPageTitleViewTests.debug.xcconfig │ │ ├── Pods-CMPageTitleViewTests.modulemap │ │ └── Pods-CMPageTitleViewTests.release.xcconfig │ └── Pods-CMPageTitleViewUITests/ │ ├── Pods-CMPageTitleViewUITests-Info.plist │ ├── Pods-CMPageTitleViewUITests-acknowledgements.markdown │ ├── Pods-CMPageTitleViewUITests-acknowledgements.plist │ ├── Pods-CMPageTitleViewUITests-dummy.m │ ├── Pods-CMPageTitleViewUITests-umbrella.h │ ├── Pods-CMPageTitleViewUITests.debug.xcconfig │ ├── Pods-CMPageTitleViewUITests.modulemap │ └── Pods-CMPageTitleViewUITests.release.xcconfig ├── CMPageTitleView.podspec ├── LICENSE └── README.md ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ # Xcode build/ DerivedData/ *.DS_Store *.pbxuser !default.pbxuser *.mode1v3 !default.mode1v3 *.mode2v3 !default.mode2v3 *.perspectivev3 !default.perspectivev3 xcuserdata/ *.moved-aside *.xccheckout *.xcscmblueprint *.hmap *.ipa *.dSYM.zip *.dSYM *._* ================================================ FILE: CMPageTitleView/CMPageTitleView/Class/CMPageContentView.h ================================================ // // CMPageContentView.h // CMDisplayTitleView // // GitHub 下载地址:https://github.com/CrabMen/CMPageTitleView // // Created by CrabMan on 2018/1/15. // Copyright © 2018年 Mac. All rights reserved. // #import #import "CMPageTitleConfig.h" @class CMPageContentView; @protocol CMPageContentViewDelegate @required /** 结束拖拽时,即手指离开屏幕时 会调用该代理方法 @param scrollView 当前操作的scrollView @param decelerate 是否是减速 */ - (void)cm_pageContentViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate; /** 减速停止,即结束滚动时 会调用该代理方法 @param index 结束滚动时,当前的index */ - (void)cm_pageContentViewDidEndDeceleratingWithIndex:(NSInteger)index; /** 当滚动时调用 @param progress 0~1 偏移的比例 @param leftIndex 左侧下标 @param rightIndex 右侧下标 */ - (void)cm_pageContentViewDidScrollProgress:(CGFloat)progress LeftIndex:(NSUInteger)leftIndex RightIndex:(NSUInteger)rightIndex; @end @interface CMPageContentView : UICollectionView /**delegate*/ @property (nonatomic,weak) id cm_delegate; /**是否动画*/ @property (nonatomic,assign) BOOL isAniming; /** 初始化方法 @param frame frame @param layout layout @param config config 用于配置视图 @return CMPageContentView对象 */ - (instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)layout Config:(CMPageTitleConfig *)config; /// 更新layout(不调用scrollViewDidScroll方法) /// @param layout collectionview 的layout布局 /// @param animated 是否动画 - (void)cm_setCollectionViewLayout:(UICollectionViewLayout *)layout animated:(BOOL)animated; /// 设置contentOffset(不调用scrollViewDidScroll方法) /// @param offset 偏移量 - (void)cm_setContentOffset:(CGPoint)offset; @end @interface CMFlowLayout : UICollectionViewFlowLayout @end @interface CMPageContentCell : UICollectionViewCell @property (nonatomic,strong) UIView *cm_contentView; @end ================================================ FILE: CMPageTitleView/CMPageTitleView/Class/CMPageContentView.m ================================================ // // CMPageContentView.m // CMDisplayTitleView // // GitHub 下载地址:https://github.com/CrabMen/CMPageTitleView // // Created by CrabMan on 2018/1/15. // Copyright © 2018年 Mac. All rights reserved. // #import "CMPageContentView.h" @interface CMPageContentView () /**配置*/ @property (nonatomic,strong) CMPageTitleConfig *config; @property (nonatomic,assign) BOOL scroll; @property (nonatomic,assign) BOOL isLandscape; @end @implementation CMPageContentView - (instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)layout Config:(CMPageTitleConfig *)config{ if (self = [super initWithFrame:frame collectionViewLayout:layout]) { self.config = config; self.delegate = self; self.dataSource = self; [self registerClass:[CMPageContentCell class] forCellWithReuseIdentifier:NSStringFromClass(CMPageContentCell.class)]; self.pagingEnabled = YES; self.showsHorizontalScrollIndicator = NO; self.showsVerticalScrollIndicator = NO; self.bounces = NO; self.scrollEnabled = self.config.cm_slideGestureEnable; self.backgroundColor = [UIColor colorWithWhite:1 alpha:0]; if (self.cm_navigationController && self.config.cm_slideGestureEnable) { [self.panGestureRecognizer requireGestureRecognizerToFail:self.cm_navigationController.interactivePopGestureRecognizer]; } if (@available(iOS 11.0, *)) { self.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; } } return self; } - (void)cm_setCollectionViewLayout:(UICollectionViewLayout *)layout animated:(BOOL)animated { __weak typeof(self) weakSelf = self; weakSelf.isAniming = YES; [UIView animateWithDuration:0.1 animations:^{ [self setCollectionViewLayout:layout animated:animated completion:nil]; } completion:^(BOOL finished) { weakSelf.isAniming = NO; }]; } - (void)cm_setContentOffset:(CGPoint)offset { self.bounds = CGRectMake(offset.x, offset.y, self.bounds.size.width, self.bounds.size.height); } #pragma mark --- UICollectionViewDataSource - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView { return 1; } - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { return self.config.cm_childControllers.count; } - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { CMPageContentCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass(CMPageContentCell.class) forIndexPath:indexPath]; cell.backgroundColor = [UIColor whiteColor]; cell.cm_contentView = [self.config.cm_childControllers[indexPath.row] view]; [self.config.cm_parentController addChildViewController:self.config.cm_childControllers[indexPath.row]]; [self.config.cm_childControllers[indexPath.row] didMoveToParentViewController:self.config.cm_parentController]; return cell; } #pragma --- UIScrollViewDelegate -(void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate{ if (self.cm_delegate) { [self.cm_delegate cm_pageContentViewDidEndDragging:scrollView willDecelerate:decelerate]; } } /** scrollView减速完成 */ -(void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { CGFloat offSetX = scrollView.contentOffset.x; NSInteger offSetInx = offSetX; NSInteger screenWInt = self.cm_width; NSInteger extre = offSetInx % screenWInt; if (extre > self.cm_width*0.5) { //往右边移动 offSetX = offSetX + (self.cm_width - extre); _isAniming = YES; [self setContentOffset:CGPointMake(offSetX, 0) animated:YES]; } else if (extre < self.cm_width * 0.5 && extre > 0){ _isAniming = YES; offSetX = offSetX - extre; [self setContentOffset:CGPointMake(offSetX, 0) animated:YES]; } NSInteger index = offSetX / self.cm_width; if (self.cm_delegate) { [self.cm_delegate cm_pageContentViewDidEndDeceleratingWithIndex:index]; } } - (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView { _isAniming = NO; } - (void)scrollViewDidScroll:(UIScrollView *)scrollView { if (_isAniming || self.config.cm_childControllers.count == 0) return; if (self.cm_delegate&&(scrollView.isTracking || scrollView.isDragging || scrollView.isDecelerating)) { CGFloat progress = scrollView.contentOffset.x / self.cm_width - floor(scrollView.contentOffset.x / self.cm_width); NSUInteger leftIndex = floor(scrollView.contentOffset.x / self.cm_width); NSUInteger rightIndex = leftIndex + 1; [self.cm_delegate cm_pageContentViewDidScrollProgress:progress LeftIndex:leftIndex RightIndex:rightIndex]; } } @end @implementation CMFlowLayout -(void)prepareLayout { [super prepareLayout]; self.minimumInteritemSpacing = 0; self.minimumLineSpacing = 0; if (self.collectionView.bounds.size.height) { self.itemSize = self.collectionView.bounds.size; } self.scrollDirection = UICollectionViewScrollDirectionHorizontal; } - (BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds { return YES; } @end @implementation CMPageContentCell - (void)setCm_contentView:(UIView *)cm_contentView { _cm_contentView = cm_contentView; _cm_contentView.translatesAutoresizingMaskIntoConstraints = NO; [self.contentView addSubview:_cm_contentView]; [NSLayoutConstraint activateConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[view]|" options:0 metrics:@{} views:@{@"view":_cm_contentView}]]; [NSLayoutConstraint activateConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[view]|" options:0 metrics:@{} views:@{@"view":_cm_contentView}]]; } @end ================================================ FILE: CMPageTitleView/CMPageTitleView/Class/CMPageTitleConfig.h ================================================ // // CMPageTitleConfig.h // CMPageTitleView // // GitHub 下载地址:https://github.com/CrabMen/CMPageTitleView // // Created by CrabMan on 2019/3/25. // Copyright © 2019 CrabMan. All rights reserved. // #import #import "UIView+CMCommon.h" NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(NSUInteger,CMTitleColorGradientStyle) { /**颜色无渐变*/ CMTitleColorGradientStyle_None = 0, /**rgb颜色渐变*/ CMTitleColorGradientStyle_RGB = 1, /**填充色颜色渐变*/ CMTitleColorGradientStyle_Fill = 2, }; typedef NS_OPTIONS(NSUInteger,CMPageTitleSwitchModeOptions) { /**字体放大*/ CMPageTitleSwitchMode_Scale = 1 << 0, /**下划线样式*/ CMPageTitleSwitchMode_Underline = 1 << 1, /**遮罩样式*/ CMPageTitleSwitchMode_Cover = 1 << 2, /**滑动切换时延迟,配合其他样式使用*/ CMPageTitleSwitchMode_Delay = 1 << 3 }; typedef NS_OPTIONS(NSUInteger, CMPageTitleAdditionalModeOptions) { /**标题栏下方的分割线*/ CMPageTitleAdditionalMode_Seperateline = 1 << 0, /**标题文字之间的分割线*/ CMPageTitleAdditionalMode_Splitter = 1 << 1 }; typedef NS_ENUM(NSUInteger,CMPageTitleContentMode) { /**左右边距与标题间距一致*/ CMPageTitleContentMode_Center, /**左右边距等于标题间距的一半*/ CMPageTitleContentMode_SpaceAround, /**左对齐*/ CMPageTitleContentMode_Left, /**右对齐*/ CMPageTitleContentMode_Right }; typedef NS_ENUM(NSUInteger,CMPageTitleScaleGradientContentMode) { /**居中*/ CMPageTitleScaleGradientContentMode_Center, /**上对其*/ CMPageTitleScaleGradientContentMode_Top, /**下对齐*/ CMPageTitleScaleGradientContentMode_Bottom, }; @interface CMPageTitleConfig : NSObject /** 颜色渐变样式 默认为 CMTitleColorGradientStyle_RGB */ @property (nonatomic,assign) CMTitleColorGradientStyle cm_gradientStyle; /** 标题切换样式 默认为:0,无任何效果 */ @property (nonatomic,assign) CMPageTitleSwitchModeOptions cm_switchMode; /** 标题栏附加样式 默认为:0 无任何附加效果效果 */ @property (nonatomic,assign) CMPageTitleAdditionalModeOptions cm_additionalMode; /** 对齐方式 默认值:CMPageTitleContentMode_Center */ @property (nonatomic,assign) CMPageTitleContentMode cm_contentMode; /** 垂直方向上的对齐方式 只有属性cm_switchMode包含CMPageTitleSwitchMode_Scale下有效果 默认值:CMPageTitleVerticalContentMode_Center */ @property (nonatomic,assign) CMPageTitleScaleGradientContentMode cm_scaleGradientContentMode; /**子视图控制器数组*/ @property (nonatomic,copy) NSArray *cm_childControllers; /**标题数组 默认为cm_childControllers 的 title */ @property (nonatomic,copy) NSArray *cm_titles; /** 标题正常字体 默认字体大小:[UIFont systemFontOfSize:15] */ @property (nonatomic,strong) UIFont *cm_font; /** 标题选中字体 默认选中字体大小:cm_font的1.15倍 */ @property (nonatomic,strong) UIFont *cm_selectedFont; /** 视图的背景色 默认颜色:[UIColor whiteColor] */ @property (nonatomic,strong) UIColor *cm_backgroundColor; /** 标题正常颜色 默认颜色:[UIColor blackColor] */ @property (nonatomic,strong) UIColor *cm_normalColor; /** 标题选中颜色 默认颜色:[UIColor redColor] */ @property (nonatomic,strong) UIColor *cm_selectedColor; /** 标题高度 默认高度:44 */ @property (nonatomic,assign) CGFloat cm_titleHeight; /** titileview在Y方向的位置 默认:0 */ @property (nonatomic,assign) CGFloat cm_titleTop; /** 是否支持侧滑 默认值:YES */ @property (nonatomic,assign) BOOL cm_slideGestureEnable; /** 标题之间的间隔 */ @property (nonatomic,assign) CGFloat cm_titleMargin; /** 最小的标题间距 默认值为 20 */ @property (nonatomic,assign) CGFloat cm_minTitleMargin; /** 默认选择的index 默认选择第0个 */ @property (nonatomic,assign,getter=cm_selectedIndex) NSInteger cm_defaultIndex; /** 标题栏下方分割线的颜色 默认颜色:[UIColor grayColor] */ @property (nonatomic,strong) UIColor *cm_seperaterLineColor; /** 标题分割线的高度 默认值:1px */ @property (nonatomic,assign) CGFloat cm_seperateLineHeight; /** 标题之间的分割线颜色 默认为:[UIColor lightGrayColor] */ @property (nonatomic,strong) UIColor *cm_splitterColor; /** 标题之间的分割线size 默认宽度:1px 默认高度:标题栏高度的一半 */ @property (nonatomic,assign) CGSize cm_splitterSize; /** 下划线和遮罩,在点击标题时,动画的时间间隔 默认值为:0.25 取值范围 0.25~0.8 (超出范围会使用默认值) */ @property (nonatomic,assign) CGFloat cm_animationDruction; /**右侧视图*/ @property (nonatomic,strong) UIView *cm_rightView; /** 父视图控制器 */ @property (nonatomic,weak,readonly) UIViewController *cm_parentController; /** 全屏 */ @property (nonatomic,assign,getter=cm_isFullScreen) BOOL cm_fullScreen; #pragma mark --- 缩放效果 /** 标题的缩放等级 默认为 1.15 (若觉得该属性不方便,可以使用cm_selectedFont配合cm_font属性进行设置) */ @property (nonatomic,assign) CGFloat cm_scale; /** 标题宽度 */ @property (nonatomic,strong,readonly) NSArray * _Nonnull cm_titleWidths; /** 标题的总宽度 + 左右边距 + 所有的标题最小间距 */ @property (nonatomic,assign,readonly) CGFloat cm_minContentWidth; /** 所有标题的总宽度 */ @property (nonatomic,assign,readonly) CGFloat cm_titlesWidth; #pragma mark --- 下划线效果 /** 下划线视图是否圆角 默认值:NO */ @property (nonatomic,assign) BOOL cm_underlineBorder; /** 下划线高度 默认值:2 */ @property (nonatomic,assign) CGFloat cm_underlineHeight; /** 下划线宽度 默认跟随文字宽度 设置该属性后下划线会固定使用该宽度 */ @property (nonatomic,assign) CGFloat cm_underlineWidth; /** 下划线跟随文字宽度 * 比例 比例范围 0 ~ 1.3 超出 1.3 按 1.0 处理 */ @property (nonatomic,assign) CGFloat cm_underlineWidthScale; /** 下划线颜色 默认跟随标题的选中颜色 */ @property (nonatomic,strong) UIColor *cm_underlineColor; /** 是否延长 默认值:NO 具体效果可以看github效果展示 */ @property (nonatomic,assign) BOOL cm_underlineStretch; #pragma mark --- 遮罩效果 /** 遮罩颜色 */ @property (nonatomic,strong) UIColor *cm_coverColor; /** 遮罩圆角半径 默认为 cover高度的一半 */ @property (nonatomic,assign) CGFloat cm_coverRadius; /** 遮罩固定宽度 未做最大最小限制 请根据实际情况妥善设置 */ @property (nonatomic,assign) CGFloat cm_coverWidth; /** 遮罩垂直方向边距 未做最大最小限制 请根据实际情况妥善设置 */ @property (nonatomic,assign) CGFloat cm_coverVerticalMargin; /** 遮罩水平方向边距 未做最大最小限制 请根据实际情况妥善设置 */ @property (nonatomic,assign) CGFloat cm_coverHorizontalMargin; /** 获得某个颜色的rgba的值 @param color 颜色对象 @return 返回rgba颜色值数组 */ CG_EXTERN NSArray* CMColorGetRGBA(UIColor *color); /** 获得某个颜色的r值 @param color 颜色对象 @return 返回r的值 */ CG_EXTERN CGFloat CMColorGetR(UIColor *color); /** 获得某个颜色的g值 @param color 颜色对象 @return 返回g的值 */ CG_EXTERN CGFloat CMColorGetG(UIColor *color); /** 获得某个颜色的b值 @param color 颜色对象 @return 返回b的值 */ CG_EXTERN CGFloat CMColorGetB(UIColor *color); /** 获得某个颜色的a值 @param color 颜色对象 @return 返回a的值 */ CG_EXTERN CGFloat CMColorGetA(UIColor *color); /** 获得指定font的字符串宽度 @param string 目标字符串 @param font 目标字符串对应的font @return 返回该字符串的宽度 */ CG_EXTERN CGFloat CMStringWidth(NSString *string ,UIFont *font); //宏定义单利的定义 + (instancetype)defaultConfig; +(instancetype) alloc __attribute__((unavailable("please call class method +(instancetype)defaultConfig instead"))); +(instancetype) new __attribute__((unavailable("please call class method +(instancetype)defaultConfig instead"))); -(instancetype) copy __attribute__((unavailable("please call class method +(instancetype)defaultConfig instead"))); -(instancetype) mutableCopy __attribute__((unavailable("please call class method +(instancetype)defaultConfig instead"))); @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/CMPageTitleView/Class/CMPageTitleConfig.m ================================================ // // CMPageTitlem // CMPageTitleView // // GitHub 下载地址:https://github.com/CrabMen/CMPageTitleView // // Created by CrabMan on 2019/3/25. // Copyright © 2019 CrabMan. All rights reserved. // #import "CMPageTitleConfig.h" #import "CMPageTitleViewMacro.h" @interface CMPageTitleConfig () /**视图宽度*/ @property (nonatomic,strong) NSNumber *cm_pageTitleViewWidth; @end @implementation CMPageTitleConfig #pragma mark -- setter - (void)setCm_childControllers:(NSArray *)cm_childControllers { _cm_childControllers = cm_childControllers; self.cm_titles = [_cm_childControllers valueForKey:@"title"]; } - (void)setCm_titles:(NSArray *)cm_titles { _cm_titles = cm_titles; if (_cm_titles.count) { NSMutableArray *mArray = [NSMutableArray array]; for (NSString *string in cm_titles) { [mArray addObject:@(CMStringWidth(string, self.cm_font))]; } [self setValue:[mArray copy] forKey:NSStringFromSelector(@selector(cm_titleWidths))]; NSNumber *cm_titlesWidth = [self.cm_titleWidths valueForKeyPath:@"@sum.floatValue"]; [self setValue:cm_titlesWidth forKey:NSStringFromSelector(@selector(cm_titlesWidth))]; } } - (void)setCm_selectedFont:(UIFont *)cm_selectedFont { _cm_selectedFont = cm_selectedFont; self.cm_scale = self.cm_font.pointSize ? cm_selectedFont.pointSize / self.cm_font.pointSize : self.cm_scale; } - (void)setCm_pageTitleViewWidth:(NSNumber *)cm_pageTitleViewWidth { _cm_pageTitleViewWidth = cm_pageTitleViewWidth; if (self.cm_minContentWidth > _cm_pageTitleViewWidth.floatValue) { //如果理论最小宽度已经大于视图宽度,对齐样式自动变成居中样式 if (self.cm_contentMode == CMPageTitleContentMode_Left || self.cm_contentMode == CMPageTitleContentMode_Right) { self.cm_contentMode = CMPageTitleContentMode_Center; } } } - (void)setCm_underlineWidthScale:(CGFloat)cm_underlineWidthScale { _cm_underlineWidthScale = cm_underlineWidthScale; _cm_underlineWidthScale = fabs(_cm_underlineWidthScale) > 1.3 || _cm_underlineWidthScale == 0 ? 1 :fabs(_cm_underlineWidthScale) ; } - (void)setCm_defaultIndex:(NSInteger)cm_defaultIndex { _cm_defaultIndex = cm_defaultIndex; _cm_defaultIndex = _cm_defaultIndex < self.cm_titles.count ? _cm_defaultIndex : 0; } - (void)setCm_animationDruction:(CGFloat)cm_animationDruction { _cm_animationDruction = (cm_animationDruction >= 0.25 && cm_animationDruction <= 0.8 ) ? cm_animationDruction : 0.25 ; } - (void)setCm_contentMode:(CMPageTitleContentMode)cm_contentMode { _cm_contentMode = cm_contentMode; NSUInteger count = self.cm_contentMode == CMPageTitleContentMode_Center ? self.cm_titles.count + 1 : self.cm_titles.count; [self setValue:@(self.cm_titlesWidth + count * self.cm_minTitleMargin) forKey:NSStringFromSelector(@selector(cm_minContentWidth))]; _cm_contentMode = cm_contentMode; if (cm_contentMode == CMPageTitleContentMode_Left) { //左对齐 _cm_titleMargin = _cm_titleMargin ?: self.cm_minTitleMargin; } else if (cm_contentMode == CMPageTitleContentMode_Right) { //右对齐 _cm_titleMargin = _cm_titleMargin ?: self.cm_minTitleMargin; }else if (cm_contentMode == CMPageTitleContentMode_Center ) { if (self.cm_titlesWidth >= self.cm_pageTitleViewWidth.floatValue) { _cm_titleMargin = _cm_titleMargin ?: self.cm_minTitleMargin; } else { NSUInteger count = self.cm_titles.count + 1 ; CGFloat titleMargin = (self.cm_pageTitleViewWidth.floatValue - self.cm_titlesWidth )/count; _cm_titleMargin = titleMargin < self.cm_minTitleMargin ? self.cm_minTitleMargin : titleMargin; } } else if (cm_contentMode == CMPageTitleContentMode_SpaceAround) { if (self.cm_titlesWidth >= self.cm_pageTitleViewWidth.floatValue) { _cm_titleMargin = _cm_titleMargin ?: self.cm_minTitleMargin; }else { NSUInteger count = self.cm_titles.count; CGFloat titleMargin = (self.cm_pageTitleViewWidth.floatValue - self.cm_titlesWidth )/count; _cm_titleMargin = titleMargin; } } } - (void)setCm_rightView:(UIView *)cm_rightView { _cm_rightView = cm_rightView; if (_cm_rightView.cm_height > self.cm_titleHeight) { _cm_rightView.cm_height = self.cm_titleHeight; } } + (instancetype)defaultConfig{ return [[super alloc]initWithDefaultConfig]; } - (instancetype)initWithDefaultConfig { if (self = [super init]) { self.cm_titleHeight = 44; self.cm_font = [UIFont systemFontOfSize:15]; self.cm_backgroundColor = [UIColor whiteColor]; self.cm_normalColor = [UIColor blackColor]; self.cm_selectedColor = [UIColor redColor]; _cm_defaultIndex = 0; self.cm_minTitleMargin = 20; self.cm_scale = 1.2; self.cm_animationDruction = 0.25; self.cm_contentMode = CMPageTitleContentMode_Center; self.cm_slideGestureEnable = YES; self.cm_underlineStretch = NO; self.cm_seperateLineHeight = 1.0 / [UIScreen mainScreen].scale; self.cm_seperaterLineColor = [UIColor lightGrayColor]; self.cm_underlineColor = self.cm_selectedColor; self.cm_underlineWidthScale = 1; self.cm_underlineHeight = 2; self.cm_coverVerticalMargin = 5; self.cm_coverHorizontalMargin = 10; self.cm_splitterColor = [UIColor lightGrayColor]; self.cm_splitterSize = CGSizeMake(1.0 / [UIScreen mainScreen].scale, 22); } return self; } CG_EXTERN NSArray* CMColorGetRGBA(UIColor *color) { CGFloat red = 0.0; CGFloat green = 0.0; CGFloat blue = 0.0; CGFloat alpha = 0.0; [color getRed:&red green:&green blue:&blue alpha:&alpha]; return @[@(red), @(green), @(blue), @(alpha)]; } CG_EXTERN CGFloat CMColorGetR(UIColor *color) { return [CMColorGetRGBA(color)[0] floatValue]; } CG_EXTERN CGFloat CMColorGetG(UIColor *color) { return [CMColorGetRGBA(color)[1] floatValue]; } CG_EXTERN CGFloat CMColorGetB(UIColor *color) { return [CMColorGetRGBA(color)[2] floatValue]; } CG_EXTERN CGFloat CMColorGetA(UIColor *color) { return [CMColorGetRGBA(color)[3] floatValue]; } CG_EXTERN CGFloat CMStringWidth(NSString *string ,UIFont *font) { if ([string isKindOfClass:[NSNull class]] || string == nil || string.length == 0) { NSException *exception = [NSException exceptionWithName:@"CMStringWidth C Method Exception" reason:@"title的标题不能为空" userInfo:nil]; [exception raise]; } CGFloat width = [string boundingRectWithSize:CGSizeMake(MAXFLOAT, 0) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading | NSStringDrawingTruncatesLastVisibleLine attributes:@{NSFontAttributeName:font} context:nil].size.width ; return ceilf(width); } @end ================================================ FILE: CMPageTitleView/CMPageTitleView/Class/CMPageTitleContentView.h ================================================ // // CMPageTitleContentView.h // CMDisplayTitleView // // GitHub 下载地址:https://github.com/CrabMen/CMPageTitleView // // Created by CrabMan on 2018/1/15. // Copyright © 2018年 CrabMan. All rights reserved. // #import #import "CMPageTitleConfig.h" @protocol CMPageTitleContentViewDelegate @required /** 当CMPageTitleContentView 中标题被点击会调用该代理方法 @param index 当前点击的标题的index @param repeat 是否是重复点击 */ - (void)cm_pageTitleContentViewClickWithLastIndex:(NSUInteger)LastIndex Index:(NSUInteger)index Repeat:(BOOL)repeat; @end @interface CMPageTitleContentView : UIScrollView /**选中的标题*/ @property (nonatomic,assign) NSInteger cm_selectedIndex; /**点击daili*/ @property (nonatomic,weak) id cm_delegate; /** 初始化方法 @param config 配置对象 @return CMPageTitleContentView对象 */ - (instancetype)initWithConfig:(CMPageTitleConfig *)config; /** 根据CMPageContentView对象的滚动情况, 调整CMPageTitleContentView对象的滚动情况 @param progress 0~1 推拽比例 @param leftIndex 左边的下标 @param rightIndex 右边的下标 */ - (void)cm_pageTitleViewDidScrollProgress:(CGFloat)progress LeftIndex:(NSUInteger)leftIndex RightIndex:(NSUInteger)rightIndex; /** 根据CMPageContentView对象的滚动情况, 调整CMPageTitleContentView对象的滚动情况 @param scrollView CMPageContentView对象 */ - (void)cm_pageTitleContentViewAdjustPosition:(UIScrollView *)scrollView; - (void)cm_remodifyTitlePosition; @end @interface CMDisplayTitleLabel : UILabel @property (nonatomic,assign) CGFloat cm_progress; @property (nonatomic,strong) UIColor *cm_fillColor; @end ================================================ FILE: CMPageTitleView/CMPageTitleView/Class/CMPageTitleContentView.m ================================================ // // CMPageTitleContentView.m // CMDisplayTitleView // // GitHub 下载地址:https://github.com/CrabMen/CMPageTitleView // // Created by CrabMan on 2018/1/15. // Copyright © 2018年 CrabMan. All rights reserved. // #import "CMPageTitleContentView.h" @interface CMPageTitleContentView () /**配置*/ @property (nonatomic,strong) CMPageTitleConfig *config; /**选中的标题*/ @property (nonatomic,strong) CMDisplayTitleLabel *selectedLabel; /**是否点击了标题*/ @property (nonatomic,assign) BOOL isClickTitle; /**下划线*/ @property (nonatomic,weak) UIView *underLine; /**遮罩*/ @property (nonatomic,weak) UIView *titleCover; /**label数组*/ @property (nonatomic,strong) NSMutableArray *titleLabels; /**上一次的偏移量*/ @property (nonatomic,assign) CGFloat lastOffsetX; /**分割线视图数组*/ @property (nonatomic,strong) NSArray *splitters; @end @implementation CMPageTitleContentView - (NSArray *)splitters { if (!_splitters) { NSMutableArray *mArray = [NSMutableArray array]; for (NSInteger i = 0 ; i < self.titleLabels.count - 1; i++) { UIView *splitter = [UIView new]; splitter.backgroundColor = self.config.cm_splitterColor; splitter.cm_size = CGSizeMake(self.config.cm_splitterSize.width, self.config.cm_splitterSize.height); splitter.center = CGPointMake(CGRectGetMaxX([self.titleLabels[i] frame]) + self.config.cm_titleMargin * 0.5, self.config.cm_titleHeight * 0.5); [self addSubview:splitter]; [mArray addObject:splitter]; } _splitters = [mArray copy]; } return _splitters; } - (NSMutableArray *)titleLabels { if (!_titleLabels) { _titleLabels = [NSMutableArray array]; CGFloat labelX = 0; CGFloat labelW = 0; for (int i = 0; i < self.config.cm_titles.count; i++) { CMDisplayTitleLabel *label = [CMDisplayTitleLabel new]; label.textColor = self.config.cm_normalColor; label.font = self.config.cm_font; label.text = self.config.cm_titles[i]; label.lineBreakMode = NSLineBreakByWordWrapping; label.translatesAutoresizingMaskIntoConstraints = NO; UILabel *lastLabel = [self.titleLabels lastObject]; if (i == 0 ) { if (self.config.cm_contentMode == CMPageTitleContentMode_Right) { labelX = [[self.config valueForKey:@"cm_pageTitleViewWidth"] floatValue] - self.config.cm_titleMargin * self.config.cm_titles.count - self.config.cm_titlesWidth; } else if (self.config.cm_contentMode == CMPageTitleContentMode_SpaceAround) { labelX = self.config.cm_titleMargin * 0.5; } else { labelX = self.config.cm_titleMargin; } } else { labelX = self.config.cm_titleMargin + CGRectGetMaxX(lastLabel.frame); } labelW = [self.config.cm_titleWidths[i] floatValue]; [self addSubview:label]; NSLayoutConstraint *leftConstraint = [NSLayoutConstraint constraintWithItem:label attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.titleLabels.lastObject ?: self attribute:self.titleLabels.lastObject ? NSLayoutAttributeRight : NSLayoutAttributeLeft multiplier:1 constant:labelX]; NSLayoutConstraint *centerYConstraint = [NSLayoutConstraint constraintWithItem:label attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem: self attribute: NSLayoutAttributeCenterY multiplier:1 constant:0]; [NSLayoutConstraint activateConstraints:@[leftConstraint,centerYConstraint]]; label.userInteractionEnabled = YES; UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(clickLabel:)]; [label addGestureRecognizer:tap]; [_titleLabels addObject:label]; } } return _titleLabels; } - (UIView *)underLine { if (!_underLine) { UIView *underLine = [UIView new]; underLine.backgroundColor = self.config.cm_underlineColor; underLine.layer.cornerRadius = self.config.cm_underlineBorder ? self.config.cm_underlineHeight * 0.5 : 0; underLine.layer.masksToBounds = YES; CGFloat underLineWidth = self.config.cm_underlineWidth ?: [self.titleLabels[self.config.cm_selectedIndex] cm_width] * self.config.cm_underlineWidthScale; underLine.cm_height = self.config.cm_underlineHeight; underLine.cm_bottom = self.config.cm_titleHeight; underLine.cm_width = underLineWidth; underLine.cm_centerX = [self.titleLabels[self.config.cm_selectedIndex] cm_centerX]; _underLine = underLine; [self addSubview:_underLine]; } return _underLine ; } -(UIView *)titleCover { if (!_titleCover) { UIView *titleCover = [UIView new]; titleCover.backgroundColor = self.config.cm_coverColor ?: [UIColor colorWithWhite:0 alpha:0.3]; UILabel *label = self.titleLabels[self.config.cm_selectedIndex]; CGFloat width = [self.config.cm_titleWidths[self.config.cm_selectedIndex] floatValue]; CGFloat coverW = self.config.cm_coverWidth ? : width + 2 * self.config.cm_coverHorizontalMargin; CGFloat coverH = label.font.pointSize + 2 * self.config.cm_coverVerticalMargin; titleCover.layer.cornerRadius = self.config.cm_coverRadius ?: coverH * 0.5; titleCover.cm_height = coverH; titleCover.cm_width = coverW; titleCover.cm_centerX = label.cm_centerX; titleCover.cm_centerY = self.config.cm_titleHeight * 0.5; _titleCover = titleCover; [self insertSubview:_titleCover atIndex:0]; } return _titleCover ; } - (void)setCm_selectedIndex:(NSInteger)cm_selectedIndex { _cm_selectedIndex = cm_selectedIndex; [self selectLabel:self.titleLabels[cm_selectedIndex]]; } #pragma mark --- Initial - (instancetype)initWithConfig:(CMPageTitleConfig *)config { if (self = [super init]) { self.config = config; self.backgroundColor = self.config.cm_backgroundColor ? : [UIColor whiteColor]; self.showsVerticalScrollIndicator = NO; self.showsHorizontalScrollIndicator = NO; [self initSubViews]; if (self.cm_navigationController && self.config.cm_slideGestureEnable) { [self.panGestureRecognizer requireGestureRecognizerToFail:self.cm_navigationController.interactivePopGestureRecognizer]; } } return self; } - (void)layoutSubviews { [super layoutSubviews]; [self modifyContentInset]; if (!self.selectedLabel && self.cm_delegate) { [self clickLabel:nil]; } } - (void)initSubViews { [self initContentSize]; [self initSplitters]; [self modifyContentInset]; } - (void)modifyContentInset { self.contentInset = UIEdgeInsetsMake(0, 0, 0, (self.config.cm_rightView && self.config.cm_contentMode != CMPageTitleContentMode_Right)? (self.config.cm_titleMargin+self.config.cm_rightView.cm_width) : self.config.cm_titleMargin); } - (void)initContentSize{ [self titleLabels]; [self layoutIfNeeded]; switch (self.config.cm_contentMode) { case CMPageTitleContentMode_SpaceAround: self.contentSize = CGSizeMake(CGRectGetMaxX([self.titleLabels.lastObject frame]) - self.config.cm_titleMargin * 0.5, 0); break; case CMPageTitleContentMode_Left: self.contentSize = self.bounds.size; break; case CMPageTitleContentMode_Right: self.contentSize = self.bounds.size; break; case CMPageTitleContentMode_Center: self.contentSize = CGSizeMake(CGRectGetMaxX([self.titleLabels.lastObject frame]), 0); break; default: break; } } - (void)initSplitters { if (self.config.cm_additionalMode & CMPageTitleAdditionalMode_Splitter) { [self splitters]; } } - (void)resetLayoutConstraintWithLabel:(UILabel *)label Scale:(CGFloat)scale{ if (![self.titleLabels containsObject:label] || self.config.cm_scaleGradientContentMode == CMPageTitleScaleGradientContentMode_Center || !(self.config.cm_switchMode & CMPageTitleSwitchMode_Scale)) return; NSInteger index = [self.titleLabels indexOfObject:label]; NSInteger selectedIndex = self.selectedLabel ? [self.titleLabels indexOfObject:self.selectedLabel] : -1; NSLayoutConstraint *centerYConstraint = self.constraints[index*2 + 1]; NSLayoutConstraint *selectedCenterYConstraint = self.selectedLabel ? self.constraints[selectedIndex*2 + 1] : nil; switch (self.config.cm_scaleGradientContentMode) { case CMPageTitleScaleGradientContentMode_Bottom: centerYConstraint.constant = 0 - label.font.pointSize * 0.5 * (scale - 1); selectedCenterYConstraint.constant = 0; break; case CMPageTitleScaleGradientContentMode_Top: centerYConstraint.constant = label.font.pointSize * 0.5 * (scale - 1); selectedCenterYConstraint.constant = 0; break; default: break; } } - (void)cm_pageTitleContentViewAdjustPosition:(UIScrollView *)scrollView { NSInteger centerIndex = floorf(scrollView.contentOffset.x / self.cm_width); [self setLabelTitleCenter:self.titleLabels[centerIndex] animated:YES]; } #pragma mark --- 样式视图 - (void)setUnderLineWithLabel:(UILabel *)label { if (!(self.config.cm_switchMode & CMPageTitleSwitchMode_Underline)) return; [self underLine]; CGFloat underLineWidth = self.config.cm_underlineWidth ?: label.cm_width * self.config.cm_underlineWidthScale; [UIView animateWithDuration:self.config.cm_animationDruction animations:^{ self.underLine.cm_width = underLineWidth; self.underLine.cm_centerX = label.cm_centerX; }]; } /**遮罩样式*/ - (void)setTitleCoverWithLabel:(UILabel *)label { if (!(self.config.cm_switchMode & CMPageTitleSwitchMode_Cover)) return; [self titleCover]; NSUInteger index = [self.titleLabels indexOfObject:label]; CGFloat width = [self.config.cm_titleWidths[index] floatValue]; CGFloat coverW = self.config.cm_coverWidth ? : width + 2 * self.config.cm_coverHorizontalMargin; [UIView animateWithDuration:self.config.cm_animationDruction animations:^{ self.titleCover.cm_width = coverW; self.titleCover.cm_centerX = label.cm_centerX; }]; } /**label点击事件*/ - (void)clickLabel:(UIGestureRecognizer *)tap { // 记录是否点击标题,通过这个属性防止标题二次偏移 _isClickTitle = YES; // 获取对应标题label CMDisplayTitleLabel *label = tap ? (CMDisplayTitleLabel *)tap.view : self.titleLabels[self.config.cm_selectedIndex]; if (self.cm_delegate) { [self.cm_delegate cm_pageTitleContentViewClickWithLastIndex:self.cm_selectedIndex Index:[self.titleLabels indexOfObject:label] Repeat:label == self.selectedLabel]; } _cm_selectedIndex = [self.titleLabels indexOfObject:label]; [self selectLabel:label]; _isClickTitle = NO; } - (void)cm_remodifyTitlePosition{ [self setLabelTitleCenter:self.selectedLabel animated:NO]; [self setUnderLineWithLabel:self.selectedLabel]; } - (void)modifyTitlePosition:(CMDisplayTitleLabel *)label { [self setLabelTitleCenter:label animated:YES]; [self setTitleScaleCenter:label]; [self setTitleCoverWithLabel:label]; [self setUnderLineWithLabel:label]; } /** 选中标题Label的设置 */ - (void)selectLabel:(CMDisplayTitleLabel *)label { if (_selectedLabel == label) return; [self modifyTitlePosition:label]; _selectedLabel.textColor = self.config.cm_normalColor; _selectedLabel.cm_progress = 0; label.textColor = self.config.cm_selectedColor; label.cm_fillColor = self.config.cm_selectedColor; label.cm_progress = 0; // _selectedLabel = (CMDisplayTitleLabel *)label; _lastOffsetX = [self.titleLabels indexOfObject:label] * self.cm_width; } - (void)setTitleScaleCenter:(UILabel *)label { if (!(self.config.cm_switchMode & CMPageTitleSwitchMode_Scale)) return; self.selectedLabel.cm_progress = 1; self.selectedLabel.cm_fillColor = self.config.cm_selectedColor; label.transform = CGAffineTransformMakeScale(self.config.cm_scale, self.config.cm_scale); self.selectedLabel.transform = CGAffineTransformIdentity; [self resetLayoutConstraintWithLabel:label Scale:self.config.cm_scale]; } /** 让选中的按钮居中显示 */ - (void)setLabelTitleCenter:(UILabel *)label animated:(BOOL)animated { if (self.contentSize.width <= self.cm_width) return; CGFloat offsetX = label.center.x - self.cm_width * 0.5; offsetX = offsetX > 0 ? offsetX : 0; CGFloat maxOffsetX = self.contentSize.width - self.cm_width + self.contentInset.right; maxOffsetX = maxOffsetX ?:0; offsetX = offsetX > maxOffsetX ? maxOffsetX : offsetX; [self setContentOffset:CGPointMake(offsetX, 0) animated:animated]; } - (void)cm_pageTitleViewDidScrollProgress:(CGFloat)progress LeftIndex:(NSUInteger)leftIndex RightIndex:(NSUInteger)rightIndex { [self modifyTitleScaleWithScrollProgress:progress LeftIndex:leftIndex RightIndex:rightIndex]; [self modifyColorWithScrollProgress:progress LeftIndex:leftIndex RightIndex:rightIndex]; [self modifyUnderlineWithScrollProgress:progress LeftIndex:leftIndex RightIndex:rightIndex]; [self modifyCoverWithScrollProgress:progress LeftIndex:leftIndex RightIndex:rightIndex]; self.lastOffsetX = leftIndex * self.cm_width + progress * self.cm_width; } #pragma mark --- 标题各效果渐变 - (void)modifyColorWithScrollProgress:(CGFloat)progress LeftIndex:(NSUInteger)leftIndex RightIndex:(NSUInteger)rightIndex { if (_isClickTitle || rightIndex >= self.titleLabels.count) return; CMDisplayTitleLabel *rightLabel = self.titleLabels[rightIndex]; CMDisplayTitleLabel *leftLabel = self.titleLabels[leftIndex]; CGFloat rightScale = progress; CGFloat leftScale = 1 - rightScale; if (self.config.cm_gradientStyle == CMTitleColorGradientStyle_RGB) { NSArray *endRGBA = CMColorGetRGBA(self.config.cm_selectedColor); NSArray *startRGBA = CMColorGetRGBA(self.config.cm_normalColor); CGFloat deltaR = [endRGBA[0] floatValue] - [startRGBA[0] floatValue]; CGFloat deltaG = [endRGBA[1] floatValue] - [startRGBA[1] floatValue]; CGFloat deltaB = [endRGBA[2] floatValue] - [startRGBA[2] floatValue]; CGFloat deltaA = [endRGBA[3] floatValue] - [startRGBA[3] floatValue]; UIColor *rightColor = [UIColor colorWithRed:[startRGBA[0] floatValue] + rightScale *deltaR green:[startRGBA[1] floatValue] + rightScale *deltaG blue:[startRGBA[2] floatValue] + rightScale *deltaB alpha:[startRGBA[3] floatValue] + rightScale *deltaA]; UIColor *leftColor = [UIColor colorWithRed:[startRGBA[0] floatValue] + leftScale * deltaR green:[startRGBA[1] floatValue] + leftScale *deltaG blue:[startRGBA[2] floatValue] + leftScale *deltaB alpha:[startRGBA[3] floatValue] + leftScale *deltaA]; rightLabel.textColor = rightColor; leftLabel.textColor = leftColor; } // 填充渐变 if (self.config.cm_gradientStyle == CMTitleColorGradientStyle_Fill) { rightLabel.textColor = self.config.cm_normalColor; rightLabel.cm_fillColor = self.config.cm_selectedColor; rightLabel.cm_progress = rightScale; leftLabel.textColor = self.config.cm_selectedColor; leftLabel.cm_fillColor = self.config.cm_normalColor; leftLabel.cm_progress = rightScale; } } - (void)modifyTitleScaleWithScrollProgress:(CGFloat)progress LeftIndex:(NSUInteger)leftIndex RightIndex:(NSUInteger)rightIndex { if (!(self.config.cm_switchMode & CMPageTitleSwitchMode_Scale) || _isClickTitle || rightIndex >= self.titleLabels.count || self.config.cm_switchMode & CMPageTitleSwitchMode_Delay) return; CMDisplayTitleLabel *rightLabel = self.titleLabels[rightIndex]; CMDisplayTitleLabel *leftLabel = self.titleLabels[leftIndex]; CGFloat rightScale = progress; CGFloat leftScale = 1 - rightScale; CGFloat scaleTransform = self.config.cm_scale; scaleTransform -= 1; leftLabel.transform = CGAffineTransformMakeScale(leftScale * scaleTransform + 1, leftScale * scaleTransform + 1); rightLabel.transform = CGAffineTransformMakeScale(rightScale * scaleTransform + 1, rightScale * scaleTransform +1); if (self.selectedLabel == leftLabel) { [self resetLayoutConstraintWithLabel:rightLabel Scale:round(rightScale * scaleTransform * 100)/100.0 + 1]; } if (self.selectedLabel == rightLabel) { [self resetLayoutConstraintWithLabel:leftLabel Scale:round(leftScale * scaleTransform * 100)/100.0 + 1]; } } - (void)modifyCoverWithScrollProgress:(CGFloat)progress LeftIndex:(NSUInteger)leftIndex RightIndex:(NSUInteger)rightIndex { //通过判断isClickTitle的属性来防止二次偏移 if (!(self.config.cm_switchMode & CMPageTitleSwitchMode_Cover) || _isClickTitle || rightIndex >= self.titleLabels.count|| self.config.cm_switchMode & CMPageTitleSwitchMode_Delay) return; CMDisplayTitleLabel *rightLabel = self.titleLabels[rightIndex]; CMDisplayTitleLabel *leftLabel = self.titleLabels[leftIndex]; CGFloat deltaX = self.config.cm_coverWidth ? rightLabel.cm_centerX - leftLabel.cm_centerX : rightLabel.cm_x - leftLabel.cm_x; CGFloat deltaWidth = self.config.cm_coverWidth ? 0 : rightLabel.cm_width - leftLabel.cm_width; CGFloat newCenterX = progress * deltaX + leftLabel.cm_centerX ; CGFloat newWidth = self.config.cm_coverWidth ? : (progress * deltaWidth + leftLabel.cm_width + 2*self.config.cm_coverHorizontalMargin); self.titleCover.cm_centerX = newCenterX; self.titleCover.cm_width = newWidth; } - (void)modifyUnderlineWithScrollProgress:(CGFloat)progress LeftIndex:(NSUInteger)leftIndex RightIndex:(NSUInteger)rightIndex { if (!(self.config.cm_switchMode & CMPageTitleSwitchMode_Underline) || _isClickTitle || rightIndex >= self.titleLabels.count|| self.config.cm_switchMode & CMPageTitleSwitchMode_Delay) return; CMDisplayTitleLabel *rightLabel = self.titleLabels[rightIndex]; CMDisplayTitleLabel *leftLabel = self.titleLabels[leftIndex]; CGFloat rightLabelX = rightLabel.cm_x + (1 - self.config.cm_underlineWidthScale)*rightLabel.cm_width*0.5; CGFloat leftLabelX = leftLabel.cm_x + (1 - self.config.cm_underlineWidthScale)*leftLabel.cm_width*0.5; CGFloat rightLabelWidth = rightLabel.cm_width * self.config.cm_underlineWidthScale; CGFloat leftLabelWidth = leftLabel.cm_width * self.config.cm_underlineWidthScale; if (!self.config.cm_underlineStretch) { CGFloat deltaX = self.config.cm_underlineWidth ? (rightLabel.cm_centerX - leftLabel.cm_centerX) : (rightLabelX - leftLabelX); CGFloat deltaWidth = self.config.cm_underlineWidth ? 0 : (rightLabelWidth - leftLabelWidth); CGFloat newOriginalX = self.config.cm_underlineWidth ? progress*deltaX + leftLabel.cm_centerX - self .config.cm_underlineWidth * 0.5: progress * deltaX + leftLabelX; CGFloat newWidth = self.config.cm_underlineWidth ? : (progress * deltaWidth + leftLabelWidth); self.underLine.cm_x = newOriginalX; self.underLine.cm_width = newWidth; } else { CGFloat rightLabelRight = rightLabel.cm_right - (rightLabel.cm_width - rightLabelWidth)*0.5; CGFloat leftLabelRight = leftLabel.cm_right - (leftLabel.cm_width - leftLabelWidth)*0.5; if (progress <= 0.5) { CGFloat deltaWidth = self.config.cm_underlineWidth ? (rightLabel.cm_centerX - leftLabel.cm_centerX) : rightLabelRight - leftLabelRight; CGFloat originalWidth = self.config.cm_underlineWidth ?: leftLabelWidth; CGFloat newWidth = 2 * progress * deltaWidth + originalWidth; CGFloat originalX = self.config.cm_underlineWidth ? leftLabel.cm_centerX - self.config.cm_underlineWidth * 0.5 : leftLabelX; self.underLine.cm_width = newWidth; self.underLine.cm_x = originalX; } else { CGFloat deltaWidth = self.config.cm_underlineWidth ? (rightLabel.cm_centerX - leftLabel.cm_centerX) : rightLabelX - leftLabelX; progress = 1- progress; CGFloat newWidth = 2 * progress * deltaWidth + (self.config.cm_underlineWidth ?: rightLabelWidth); CGFloat originalX = self.config.cm_underlineWidth ? rightLabel.cm_centerX + self.config.cm_underlineWidth * 0.5 - newWidth : rightLabelRight - newWidth; self.underLine.cm_x = originalX; self.underLine.cm_width = newWidth; } } } @end @implementation CMDisplayTitleLabel -(void)drawRect:(CGRect)rect { [super drawRect: rect]; [_cm_fillColor set]; rect.size.width = rect.size.width *_cm_progress; UIRectFillUsingBlendMode(rect, kCGBlendModeSourceIn); } -(instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame] ) { self.userInteractionEnabled = YES; self.textAlignment = NSTextAlignmentCenter; } return self; } - (void)setCm_progress:(CGFloat)cm_progress { _cm_progress = cm_progress; [self setNeedsDisplay]; } @end ================================================ FILE: CMPageTitleView/CMPageTitleView/Class/CMPageTitleView.h ================================================ // // CMPageTitleView.h // CMDisplayTitleView // // GitHub 下载地址:https://github.com/CrabMen/CMPageTitleView // // Created by CrabMan on 2018/1/15. // Copyright © 2018年 Mac. All rights reserved. // #import #import "CMPageTitleConfig.h" @protocol CMPageTitleViewDelegate @optional /** 当标题被点击会或滚动选中后调用该代理方法 @param index 当前选中的标题的index @param repeat 是否是重复点击 */ - (void)cm_pageTitleViewSelectedWithIndex:(NSInteger)index Repeat:(BOOL)repeat; /** 当标题被点击会调用该方法 @param index 当前选中的标题的index @param repeat 是否是重复点击 */ - (void)cm_pageTitleViewClickWithIndex:(NSInteger)index Repeat:(BOOL)repeat; /** 当标题滚动选中后调用该代理方法 @param index 当前选中的标题的index */ - (void)cm_pageTitleViewScrollToIndex:(NSInteger)index; @end @interface CMPageTitleView : UIView /** 代理 */ @property (nonatomic,assign) id delegate; /** 配置 */ @property (nonatomic,strong) CMPageTitleConfig *cm_config; /**重载配置*/ - (void)cm_reloadConfig; @end ================================================ FILE: CMPageTitleView/CMPageTitleView/Class/CMPageTitleView.m ================================================ // // CMPageTitleView.m // CMDisplayTitleView // // GitHub 下载地址:https://github.com/CrabMen/CMPageTitleView // // Created by CrabMan on 2018/1/15. // Copyright © 2018年 Mac. All rights reserved. // #import "CMPageTitleView.h" #import "CMPageTitleContentView.h" #import "CMPageContentView.h" #import "CMPageTitleViewMacro.h" #import @interface CMPageTitleView() @property (nonatomic,weak) CMPageTitleContentView *titleView; @property (nonatomic,weak) CMPageContentView *contentView; @property (nonatomic,weak) UIView *seperateline; @property (nonatomic,strong) UIViewController *parentController; @end @implementation CMPageTitleView - (UIView *)seperateline { if (!_seperateline) { UIView *seperateline = [[UIView alloc] init]; seperateline.backgroundColor = self.cm_config.cm_seperaterLineColor; _seperateline = seperateline; [self addSubview:_seperateline]; } return _seperateline; } - (CMPageTitleContentView *)titleView { if (!_titleView) { CMPageTitleContentView *titleView = [[CMPageTitleContentView alloc] initWithConfig:self.cm_config]; titleView.cm_delegate = self; _titleView = titleView; [self addSubview:_titleView]; } return _titleView; } - (CMPageContentView *)contentView { if (!_contentView) { CMFlowLayout *layout = [CMFlowLayout new]; layout.scrollDirection = UICollectionViewScrollDirectionHorizontal; CMPageContentView *contentView = [[CMPageContentView alloc] initWithFrame:CGRectZero collectionViewLayout:layout Config:self.cm_config]; contentView.cm_delegate = self; _contentView = contentView; [self addSubview:_contentView]; } return _contentView; } - (UIViewController *)parentController { for (UIView* next = [self superview]; next; next = next.superview) { UIResponder *nextResponder = [next nextResponder]; if ([nextResponder isKindOfClass:[UIViewController class]]) { return (UIViewController *)nextResponder; } } return nil; } - (void)layoutSubviews { [super layoutSubviews]; [self initSubViews]; [self orientation]; } - (void)orientation { [self.contentView cm_setContentOffset:CGPointMake(self.titleView.cm_selectedIndex * self.contentView.cm_width, 0) ]; [self.titleView cm_remodifyTitlePosition]; } - (void)cm_reloadConfig { [self.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)]; self.seperateline = nil; self.titleView = nil; self.contentView = nil; [self layoutSubviews]; } - (void)initSubViews { CMPageErrorAssert(self.cm_config != nil, @"cm_config属性不能为空"); self.userInteractionEnabled = YES; [self reviseConfig]; [self initVFLContraints]; } - (void)reviseConfig{ CMPageErrorAssert((self.cm_config.cm_childControllers != nil || self.cm_config.cm_childControllers.count == 0 ), @"cm_childControllers数组需赋值,且数组个数不为空"); CMPageErrorAssert((self.cm_config.cm_titles != nil || self.cm_config.cm_titles.count == 0 ), @"cm_titles数组需赋值,且数组个数不为空"); [self.cm_config setValue:@(self.cm_width) forKey:@"cm_pageTitleViewWidth"]; [self.cm_config setValue:self.parentController forKey:@"cm_parentController"]; [self addMethodForParentController]; self.cm_config.cm_font = self.cm_config.cm_font; self.cm_config.cm_titles = self.cm_config.cm_titles; self.cm_config.cm_titleMargin = self.cm_config.cm_titleMargin; self.cm_config.cm_contentMode = self.cm_config.cm_contentMode; } - (void)initVFLContraints { self.contentView.translatesAutoresizingMaskIntoConstraints = NO; self.titleView.translatesAutoresizingMaskIntoConstraints = NO; self.seperateline.translatesAutoresizingMaskIntoConstraints = NO; [NSLayoutConstraint activateConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[title]|" options:0 metrics:@{}views:@{@"title":self.titleView}]]; [NSLayoutConstraint activateConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[seperateline]|" options:0 metrics:@{}views:@{@"seperateline":self.seperateline}]]; [NSLayoutConstraint activateConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[content]|" options:0 metrics:@{}views:@{@"content":self.contentView}]]; NSString *vf = self.cm_config.cm_fullScreen ? @"V:|[content]|" : @"V:|-(==titleTop)-[title(==titleH)][seperateline(==seperateH)][content]|"; if (self.cm_config.cm_isFullScreen) [NSLayoutConstraint activateConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(==titleTop)-[title(==titleH)][seperateline(==seperateH)]" options:0 metrics:@{ @"titleTop":@(self.cm_config.cm_titleTop), @"titleH":@(self.cm_config.cm_titleHeight), @"seperateH":@((self.cm_config.cm_additionalMode&CMPageTitleAdditionalMode_Seperateline) ? self.cm_config.cm_seperateLineHeight : 0)}views:@{ @"title":self.titleView, @"seperateline":self.seperateline}]]; [NSLayoutConstraint activateConstraints:[NSLayoutConstraint constraintsWithVisualFormat:vf options:0 metrics:@{ @"titleTop":@(self.cm_config.cm_titleTop),@"titleH":@(self.cm_config.cm_titleHeight),@"seperateH":@((self.cm_config.cm_additionalMode&CMPageTitleAdditionalMode_Seperateline) ? self.cm_config.cm_seperateLineHeight : 0)}views:@{@"title":self.titleView,@"seperateline":self.seperateline,@"content":self.contentView}]]; if (self.cm_config.cm_rightView && self.cm_config.cm_contentMode != CMPageTitleContentMode_Right) { [self addSubview:self.cm_config.cm_rightView]; self.cm_config.cm_rightView.translatesAutoresizingMaskIntoConstraints = NO; [NSLayoutConstraint activateConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[rightView(==width)]|" options:NSLayoutFormatAlignAllRight metrics:@{@"width":@(self.cm_config.cm_rightView.cm_width)}views:@{@"rightView":self.cm_config.cm_rightView}]]; [NSLayoutConstraint activateConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(==mariginTop)-[rightView(==height)]" options:0 metrics:@{@"mariginTop":@((self.cm_config.cm_titleHeight - self.cm_config.cm_rightView.cm_height)*0.5 +self.cm_config.cm_titleTop),@"height":@(self.cm_config.cm_rightView.cm_height)}views:@{@"rightView":self.cm_config.cm_rightView}]]; } } #pragma mark --- CMPageTitleContentViewDelegate - (void)cm_pageTitleContentViewClickWithLastIndex:(NSUInteger)LastIndex Index:(NSUInteger)index Repeat:(BOOL)repeat { if (self.delegate && [self.delegate respondsToSelector:@selector(cm_pageTitleViewSelectedWithIndex:Repeat:)]) [self.delegate cm_pageTitleViewSelectedWithIndex:index Repeat:repeat]; if (self.delegate && [self.delegate respondsToSelector:@selector(cm_pageTitleViewClickWithIndex:Repeat:)]) [self.delegate cm_pageTitleViewClickWithIndex:index Repeat:repeat]; if (!repeat) [self.contentView setContentOffset:CGPointMake(index * self.cm_width, 0)]; if (!repeat) [self transtitonFromIndex:LastIndex TargetIndex:index]; } #pragma mark --- CMPageContentViewDelegate - (void)cm_pageContentViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate { [self.titleView cm_pageTitleContentViewAdjustPosition:scrollView]; } - (void)cm_pageContentViewDidEndDeceleratingWithIndex:(NSInteger)index { if (self.titleView.cm_selectedIndex == index) return; [self transtitonFromIndex:self.titleView.cm_selectedIndex TargetIndex:index]; self.titleView.cm_selectedIndex = index; if (self.delegate && [self.delegate respondsToSelector:@selector(cm_pageTitleViewSelectedWithIndex:Repeat:)]) [self.delegate cm_pageTitleViewSelectedWithIndex:index Repeat:NO]; if (self.delegate && [self.delegate respondsToSelector:@selector(cm_pageTitleViewScrollToIndex:)]) [self.delegate cm_pageTitleViewScrollToIndex:index]; } - (void)cm_pageContentViewDidScrollProgress:(CGFloat)progress LeftIndex:(NSUInteger)leftIndex RightIndex:(NSUInteger)rightIndex { [self.titleView cm_pageTitleViewDidScrollProgress:progress LeftIndex:leftIndex RightIndex:rightIndex]; } - (BOOL)shouldAutomaticallyForwardAppearanceMethods{ return NO; } - (void)endAppraranceFromIndex:(NSInteger)fromIndex TargetIndex:(NSInteger)targetIndex { NSInteger maxIndex = self.cm_config.cm_childControllers.count - 1; if ((fromIndex == maxIndex && targetIndex > maxIndex)|| (fromIndex == 0 && targetIndex<0)) return; UIViewController *fromController = self.cm_config.cm_childControllers[fromIndex]; UIViewController *targetController = self.cm_config.cm_childControllers[targetIndex]; if (fromIndex != targetIndex) [fromController endAppearanceTransition]; [targetController endAppearanceTransition]; } - (void)beginAppearanceFromIndex:(NSInteger)fromIndex TargetIndex:(NSInteger)targetIndex { NSInteger maxIndex = self.cm_config.cm_childControllers.count - 1; if ((fromIndex == maxIndex && targetIndex > maxIndex)|| (fromIndex == 0 && targetIndex<0)) return; UIViewController *fromController = self.cm_config.cm_childControllers[fromIndex]; UIViewController *targetController = self.cm_config.cm_childControllers[targetIndex]; if (fromIndex != targetIndex) [fromController beginAppearanceTransition:NO animated:NO]; [targetController beginAppearanceTransition:YES animated:NO]; } - (void)transtitonFromIndex:(NSInteger)fromIndex TargetIndex:(NSInteger)targetIndex { [self beginAppearanceFromIndex:fromIndex TargetIndex:targetIndex]; [self endAppraranceFromIndex:fromIndex TargetIndex:targetIndex]; } - (void)addMethodForParentController { class_addMethod(self.cm_config.cm_parentController.class,NSSelectorFromString(@"shouldAutomaticallyForwardAppearanceMethods") , method_getImplementation(class_getInstanceMethod(self.class,NSSelectorFromString(@"shouldAutomaticallyForwardAppearanceMethods"))), "v@:"); } @end ================================================ FILE: CMPageTitleView/CMPageTitleView/Class/CMPageTitleViewMacro.h ================================================ // // CMPageTitleViewMacro.h // CMPageTitleView // // GitHub 下载地址:https://github.com/CrabMen/CMPageTitleView // // Created by 智借iOS on 2019/5/9. // Copyright © 2019 CrabMan. All rights reserved. // #ifndef CMPageTitleViewMacro_h #define CMPageTitleViewMacro_h // 过期提醒 #define CMPageDeprecated(instead) NS_DEPRECATED(2_0, 2_0, 2_0, 2_0, instead) //断言 #define CMPageErrorAssert(condition,message) NSAssert(condition,message) #endif /* CMPageTitleViewMacro_h */ ================================================ FILE: CMPageTitleView/CMPageTitleView/Class/UIView+CMCommon.h ================================================ // // UIView+Common.h // EBan // // GitHub 下载地址:https://github.com/CrabMen/CMPageTitleView // // Created by CrabMan on 16/9/18. // Copyright © 2016年 CrabMan. All rights reserved. // #import @interface UIView (CMCommon) @property (nonatomic, assign) CGFloat cm_x; @property (nonatomic, assign) CGFloat cm_y; @property (nonatomic, assign) CGFloat cm_centerX; @property (nonatomic, assign) CGFloat cm_centerY; @property (nonatomic, assign) CGFloat cm_width; @property (nonatomic, assign) CGFloat cm_height; @property (nonatomic, assign) CGPoint cm_origin; @property (nonatomic, assign) CGSize cm_size; @property (readonly) CGPoint cm_bottomLeft; @property (readonly) CGPoint cm_bottomRight; @property (readonly) CGPoint cm_topRight; @property CGFloat cm_top; @property CGFloat cm_left; @property CGFloat cm_bottom; @property CGFloat cm_right; /**当前所在的UINavigationConntroller*/ @property (nonatomic,strong,readonly) UINavigationController *cm_navigationController; /**当前所在的UIViewController*/ @property (nonatomic,strong,readonly) UINavigationController *cm_viewController; @end ================================================ FILE: CMPageTitleView/CMPageTitleView/Class/UIView+CMCommon.m ================================================ // // UIView+Common.m // EBan // // GitHub 下载地址:https://github.com/CrabMen/CMPageTitleView // // Created by CrabMan on 16/9/18. // Copyright © 2016年 CrabMan. All rights reserved. // #import "UIView+CMCommon.h" @implementation UIView (CMCommon) - (CGFloat)cm_x{ return self.frame.origin.x; } - (void)setCm_x:(CGFloat)cm_x{ CGRect frame = self.frame; frame.origin.x = cm_x; self.frame = frame; } - (CGFloat)cm_y{ return self.frame.origin.y; } - (void)setCm_y:(CGFloat)cm_y{ CGRect frame = self.frame; frame.origin.y = cm_y; self.frame = frame; } - (CGFloat)cm_width{ return self.frame.size.width; } - (void)setCm_width:(CGFloat)cm_width{ CGRect frame = self.frame; frame.size.width = cm_width; self.frame = frame; } - (CGFloat)cm_height{ return self.frame.size.height; } - (void)setCm_height:(CGFloat)cm_height{ CGRect frame = self.frame; frame.size.height = cm_height; self.frame = frame; } - (CGFloat)cm_centerX{ return self.center.x; } - (void)setCm_centerX:(CGFloat)cm_centerX{ CGPoint center = self.center; center.x = cm_centerX; self.center = center; } - (CGFloat)cm_centerY{ return self.center.y; } - (void)setCm_centerY:(CGFloat)cm_centerY{ CGPoint center = self.center; center.y = cm_centerY; self.center = center; } - (CGPoint)cm_origin{ return self.frame.origin; } - (void)setCm_origin:(CGPoint)cm_origin{ CGRect frame = self.frame; frame.origin = cm_origin; self.frame = frame; } - (CGSize)cm_size{ return self.frame.size; } - (void)setCm_size:(CGSize)cm_size{ CGRect frame = self.frame; frame.size = cm_size; self.frame = frame; } // Query other frame locations - (CGPoint) cm_bottomRight{ CGFloat x = self.frame.origin.x + self.frame.size.width; CGFloat y = self.frame.origin.y + self.frame.size.height; return CGPointMake(x, y); } - (CGPoint) cm_bottomLeft{ CGFloat x = self.frame.origin.x; CGFloat y = self.frame.origin.y + self.frame.size.height; return CGPointMake(x, y); } - (CGPoint)cm_topRight{ CGFloat x = self.frame.origin.x + self.frame.size.width; CGFloat y = self.frame.origin.y; return CGPointMake(x, y); } // Retrieve and set top, bottom, left, right - (CGFloat) cm_top{ return self.frame.origin.y; } - (void) setCm_top:(CGFloat)cm_top{ CGRect newframe = self.frame; newframe.origin.y = cm_top; self.frame = newframe; } - (CGFloat)cm_left{ return self.frame.origin.x; } - (void)setCm_left:(CGFloat)cm_left{ CGRect newframe = self.frame; newframe.origin.x = cm_left; self.frame = newframe; } - (CGFloat)cm_bottom{ return self.frame.origin.y + self.frame.size.height; } - (void)setCm_bottom:(CGFloat)cm_bottom{ CGRect newframe = self.frame; newframe.origin.y = cm_bottom - self.frame.size.height; self.frame = newframe; } - (CGFloat)cm_right{ return self.frame.origin.x + self.frame.size.width; } - (void)setCm_right:(CGFloat)cm_right{ CGFloat delta = cm_right - (self.frame.origin.x + self.frame.size.width); CGRect newframe = self.frame; newframe.origin.x += delta ; self.frame = newframe; } -(UINavigationController *)cm_navigationController { return (self.cm_viewController ? (self.cm_viewController.navigationController ?: nil): nil); } - (UIViewController *)cm_viewController { UIResponder *next = self.nextResponder; do { if ([next isKindOfClass:[UIViewController class]]) { return (UIViewController *)next; } next = next.nextResponder; }while(next != nil); return nil; } @end ================================================ FILE: CMPageTitleView/CMPageTitleView/Demo/CMChildTableController.h ================================================ // // CMChildController.h // CMPageTitleView // // Created by 郭强 on 2019/12/14. // Copyright © 2019 CrabMan. All rights reserved. // #import NS_ASSUME_NONNULL_BEGIN @interface CMChildTableController : UITableViewController @property (nonatomic,assign) CGFloat topInset; @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/CMPageTitleView/Demo/CMChildTableController.m ================================================ // // CMChildController.m // CMPageTitleView // // Created by 郭强 on 2019/12/14. // Copyright © 2019 CrabMan. All rights reserved. // #import "CMChildTableController.h" #import #import "MJRefresh.h" @interface CMChildTableController () @property(nonatomic,weak) UIButton *button; @end @implementation CMChildTableController - (void)setTopInset:(CGFloat)topInset { _topInset = topInset; if (topInset) { self.tableView.contentInset = UIEdgeInsetsMake(44, 0, 0, 0); if (@available(iOS 11.0, *)) { self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; } else { self.automaticallyAdjustsScrollViewInsets = NO; } } else { self.tableView.contentInset = UIEdgeInsetsZero; } } - (UIButton *)button { if (!_button) { UIButton *button = [UIButton new]; [button setTitle:@"跳转到详情" forState:UIControlStateNormal]; [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; button.layer.cornerRadius = 4; button.backgroundColor = [UIColor lightGrayColor]; [button addTarget:self action:@selector(buttonnClickAction:) forControlEvents:UIControlEventTouchUpInside]; _button = button; [self.view addSubview:_button]; } return _button; } - (void)buttonnClickAction:(UIButton *)sender { UIViewController *detailVC = [UIViewController new]; detailVC.title = @"详情页"; detailVC.view.backgroundColor = UIColor.redColor; [self.parentViewController.navigationController pushViewController:detailVC animated:YES]; } - (void)viewDidLoad { [super viewDidLoad]; NSLog(@"viewDidLoad --- %@",self.title); } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; NSLog(@"viewWillAppear --- %@",self.title); if (self.topInset) { self.tableView.contentInset = UIEdgeInsetsMake(44, 0, 0, 0); self.tableView.mj_header = nil; } else { self.tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ [self.tableView.mj_header endRefreshing]; }); } ]; self.tableView.contentInset = UIEdgeInsetsZero; } if (self.tableView.mj_header) { [self.tableView.mj_header beginRefreshing]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ [self.tableView.mj_header endRefreshing]; }); } #warning --- scrollview下沉问题,请添加以下代码 if (@available(iOS 11.0, *)) { self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; } else { self.automaticallyAdjustsScrollViewInsets = NO; } } - (void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; NSLog(@"viewWillDisappear --- %@",self.title); } - (void)viewDidAppear:(BOOL)animated { [super viewWillAppear:animated]; NSLog(@"viewDidAppear --- %@",self.title); } - (void)viewDidDisappear:(BOOL)animated { [super viewWillDisappear:animated]; NSLog(@"viewDidDisappear --- %@",self.title); } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 100; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass(self.class)]; if (!cell) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass(self.class)]; } cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass(self.class)]; cell.textLabel.text = [NSString stringWithFormat:@"-------> %@ -- 第%ld行 <------- ",self.title,indexPath.row]; cell.textLabel.font = [UIFont systemFontOfSize:18]; cell.textLabel.textColor = UIColor.blackColor; cell.backgroundColor = [UIColor colorWithWhite:1 alpha:0]; return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UIViewController *detailVC = [UIViewController new]; detailVC.title = @"详情页"; detailVC.view.backgroundColor = UIColor.redColor; [self.parentViewController.navigationController pushViewController:detailVC animated:YES]; } /* #pragma mark - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { // Get the new view controller using [segue destinationViewController]. // Pass the selected object to the new view controller. } */ @end ================================================ FILE: CMPageTitleView/CMPageTitleView/Demo/CMMainTableController.h ================================================ // // CMMainTableController.h // CMPageTitleView // // Created by CrabMan on 2019/4/10. // Copyright © 2019 CrabMan. All rights reserved. // #import NS_ASSUME_NONNULL_BEGIN @interface CMMainTableController : UITableViewController @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/CMPageTitleView/Demo/CMMainTableController.m ================================================ // // CMMainTableController.m // CMPageTitleView // // Created by CrabMan on 2019/4/10. // Copyright © 2019 CrabMan. All rights reserved. // #import "CMMainTableController.h" #import "CMViewController.h" @interface CMMainTableController () /**样式数组*/ @property (nonatomic,strong) NSArray *styleArray; /**组合效果*/ @property (nonatomic,strong) NSArray *mixStyleArray; @end @implementation CMMainTableController -(NSArray *)styleArray { if (!_styleArray) { _styleArray =@[@{ @"title":@"基本样式", @"array":@[ @"颜色效果 - RGB渐变", @"颜色效果 - 填充渐变", @"颜色效果 - 无渐变", @"切换样式 - 字体放大", @"切换样式 - 下划线", @"切换样式 - 遮罩", @"切换样式 - 字体放大 - 延迟", @"切换样式 - 下划线 - 延迟", @"切换样式 - 遮罩 - 延迟", @"附加效果 - 标题栏下方分割线", @"附加效果 - 标题文字之间分割线", @"对齐方式 -- 左对齐", @"对齐方式 -- 右对齐", @"对齐方式 -- 居中", @"对齐方式 -- SpaceAround", @"字体放大效果时对其方式 -- 居中对齐(默认)", @"字体放大效果时对其方式 -- 上对齐", @"字体放大效果时对其方式 -- 下对齐" ]}, @{ @"title":@"组合样式", @"array":@[ @"字体放大 - 颜色RGB渐变", @"字体放大 - 颜色填充渐变", @"字体放大 - 颜色无渐变", @"字体放大(延迟) - 颜色RGB渐变", @"字体放大(延迟) - 颜色填充渐变", @"字体放大(延迟) - 颜色无渐变", @"下划线 - 颜色RGB渐变", @"下划线 - 颜色填充渐变", @"下划线 - 颜色无渐变", @"下划线(延迟) - 颜色RGB渐变", @"下划线(延迟) - 颜色填充渐变", @"下划线(延迟) - 颜色无渐变", @"下划线(固定宽度)- 颜色RGB渐变", @"下划线(固定宽度)- 颜色填充渐变", @"下划线(固定宽度)- 颜色无渐变", @"下划线(延迟 && 固定宽度)- 颜色RGB渐变", @"下划线(延迟 && 固定宽度)- 颜色填充渐变", @"下划线(延迟 && 固定宽度)- 颜色无渐变", @"下划线(比例宽度)- 颜色RGB渐变", @"下划线(比例宽度)- 颜色填充渐变", @"下划线(比例宽度)- 颜色无渐变", @"下划线(延迟 && 比例宽度)- 颜色RGB渐变", @"下划线(延迟 && 比例宽度)- 颜色填充渐变", @"下划线(延迟 && 比例宽度)- 颜色无渐变", @"下划线(延展)- 颜色RGB渐变", @"下划线(延展)- 颜色填充渐变", @"下划线(延展)- 颜色无渐变", @"下划线(延展 && 固定宽度)- 颜色RGB渐变", @"下划线(延展 && 固定宽度)- 颜色填充渐变", @"下划线(延展 && 固定宽度)- 颜色无渐变", @"下划线(延展 && 比例宽度)- 颜色RGB渐变", @"下划线(延展 && 比例宽度)- 颜色填充渐变", @"下划线(延展 && 比例宽度)- 颜色无渐变", @"遮罩 - 颜色RGB渐变", @"遮罩 - 颜色填充渐变", @"遮罩 - 颜色无渐变", @"遮罩(延迟) - 颜色RGB渐变", @"遮罩(延迟) - 颜色填充渐变", @"遮罩(延迟) - 颜色无渐变", @"遮罩(固定宽度)- 颜色RGB渐变", @"遮罩(固定宽度)- 颜色填充渐变", @"遮罩(固定宽度)- 颜色无渐变", @"遮罩(延迟 && 固定宽度)- 颜色RGB渐变", @"遮罩(延迟 && 固定宽度)- 颜色填充渐变", @"遮罩(延迟 && 固定宽度)- 颜色无渐变", @"字体放大 && 下划线 - 颜色填充渐变", @"字体放大 && 下划线 && 延迟 - 颜色无渐变", @"字体放大 && 下划线(延展)- 颜色填充渐变", @"字体放大 && 下划线(延展 && 固定宽度 )- 颜色填充渐变", @"字体放大 && 下划线(延展 && 比例宽度 )-颜色填充渐变", @"字体放大 && 下划线(延展 && 放大时下对齐 )-颜色填充渐变", @"字体放大 && 下划线(延展 && 放大时下对齐 && 左对齐)-颜色填充渐变", ] }, @{ @"title":@"其他样式", @"array":@[ @"标题栏背景色", @"标题栏背景图片", @"rightView", @"全屏穿透样式", @"全屏穿透样式(标题栏偏移)", @"对齐方式(Space arround)", ]}, ]; } return _styleArray; } - (void)viewDidLoad { [super viewDidLoad]; self.title = @"CMPageTitleView"; [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"Cell"]; } #pragma mark - Table view data source - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0,self.view.bounds.size.width, 40)]; header.backgroundColor = [UIColor lightGrayColor]; UILabel *label = [[UILabel alloc] initWithFrame:header.bounds]; label.textColor = [UIColor blackColor]; label.font = [UIFont boldSystemFontOfSize:18]; label.text = self.styleArray[section][@"title"]; label.textAlignment = NSTextAlignmentCenter; [header addSubview:label]; return header; } - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { return 40; } - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return self.styleArray.count; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [self.styleArray[section][@"array"] count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath]; cell.textLabel.text = [NSString stringWithFormat:@"%02ld-%02ld.%@",indexPath.section,indexPath.row,self.styleArray[indexPath.section][@"array"][indexPath.row]]; cell.textLabel.numberOfLines = 0; cell.textLabel.font = [UIFont systemFontOfSize:14]; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { CMViewController *vc = [CMViewController new]; SEL selector = NSSelectorFromString([NSString stringWithFormat:@"style%02ld_%02ld",indexPath.section,indexPath.row]); [vc performSelector:selector]; [self.navigationController pushViewController:vc animated:YES]; } /* - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:<#@"reuseIdentifier"#> forIndexPath:indexPath]; // Configure the cell... return cell; } */ /* // Override to support conditional editing of the table view. - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { // Return NO if you do not want the specified item to be editable. return YES; } */ /* // Override to support editing the table view. - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { if (editingStyle == UITableViewCellEditingStyleDelete) { // Delete the row from the data source [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; } else if (editingStyle == UITableViewCellEditingStyleInsert) { // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view } } */ /* // Override to support rearranging the table view. - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { } */ /* // Override to support conditional rearranging of the table view. - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { // Return NO if you do not want the item to be re-orderable. return YES; } */ /* #pragma mark - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { // Get the new view controller using [segue destinationViewController]. // Pass the selected object to the new view controller. } */ @end ================================================ FILE: CMPageTitleView/CMPageTitleView/Demo/CMViewController.h ================================================ // // CMViewController.h // CMPageTitleView // // Created by CrabMan on 2019/4/10. // Copyright © 2019 CrabMan. All rights reserved. // #import NS_ASSUME_NONNULL_BEGIN @interface CMViewController : UIViewController @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/CMPageTitleView/Demo/CMViewController.m ================================================ // // CMViewController.m // CMPageTitleView // // Created by CrabMan on 2019/4/10. // Copyright © 2019 CrabMan. All rights reserved. // #import "CMViewController.h" #import "CMPageTitleView.h" #import "CMChildTableController.h" #import "Masonry.h" //是否是刘海屏 #define CM_NOTCH_SCREEN \ ({BOOL isPhoneX = NO;\ if (@available(iOS 11.0, *)) {\ isPhoneX = [[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom > 0.0;\ }\ (isPhoneX);}) #define CM_Interface_Portrait UIInterfaceOrientationIsPortrait([UIApplication sharedApplication].statusBarOrientation) //屏幕尺寸 #define CM_SCREEN_W [UIScreen mainScreen].bounds.size.width #define CM_SCREEN_H [UIScreen mainScreen].bounds.size.height //导航栏高度 #define CM_NAVI_BAR_H (CM_Interface_Portrait ? (CM_NOTCH_SCREEN ? 88 : 64) : (CM_NOTCH_SCREEN ? 44 : 44)) //电池条高度 #define CM_STATUE_BAR_H (CM_Interface_Portrait ? (CM_NOTCH_SCREEN ? 44 : 20):0) //tabbar高度 #define CM_TAB_BAR_H (CM_NOTCH_SCREEN ? 83.0f: 49.0) //随机色 #define CM_RANDOM_COLOR [UIColor colorWithRed:arc4random_uniform(256)/255.0 green:arc4random_uniform(256)/255.0 blue:arc4random_uniform(256)/255.0 alpha:1.0] @interface CMViewController () /**视图控制器数组*/ @property (nonatomic,copy) NSArray *childControllers; /**个数较少的视图控制器数组*/ @property (nonatomic,strong) NSArray *lessChildControllers; @property (nonatomic,strong) NSArray *twoControllers; @property (nonatomic,weak) UIImageView *imageView; /**default notes*/ @property (nonatomic,weak) CMPageTitleView *pageTitleView; /**default note*/ @property (nonatomic,strong) UIImageView *rightView; @end @implementation CMViewController - (UIImageView *)rightView { if (!_rightView) { _rightView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 60, 66)]; // _rightView.alpha = 0.75; _rightView.backgroundColor = UIColor.lightGrayColor; _rightView.image = [UIImage imageNamed:@"add"]; _rightView.contentMode = UIViewContentModeScaleAspectFit; _rightView.userInteractionEnabled = YES; UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapGesture:)]; [_rightView addGestureRecognizer:tap]; } return _rightView; } - (CMPageTitleView *)pageTitleView { if (!_pageTitleView) { CMPageTitleView *pageTitleView = [[CMPageTitleView alloc] init]; _pageTitleView = pageTitleView; [self.view addSubview:_pageTitleView]; } return _pageTitleView; } - (UIImageView *)imageView { if (!_imageView) { UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"background_image"]]; _imageView = imageView; [self.view addSubview:_imageView]; } return _imageView; } - (NSArray *)lessChildControllers { return [self.childControllers subarrayWithRange:NSMakeRange(0, 3)]; } - (NSArray *)twoControllers { return [self.childControllers subarrayWithRange:NSMakeRange(0, 2)]; } - (NSArray *)childControllers { if (!_childControllers) { CMChildTableController *vc0 = [CMChildTableController new]; CMChildTableController *vc1 = [CMChildTableController new]; CMChildTableController *vc2 = [CMChildTableController new]; CMChildTableController *vc3 = [CMChildTableController new]; CMChildTableController *vc4 = [CMChildTableController new]; CMChildTableController *vc5 = [CMChildTableController new]; CMChildTableController *vc6 = [CMChildTableController new]; CMChildTableController *vc7 = [CMChildTableController new]; CMChildTableController *vc8 = [CMChildTableController new]; CMChildTableController *vc9 = [CMChildTableController new]; CMChildTableController *vc10 = [CMChildTableController new]; vc0.title = @"推荐"; vc1.title = @"小视频"; vc2.title = @"视频"; vc3.title = @"懂车帝"; vc4.title = @"北京"; vc5.title = @"娱乐"; vc6.title = @"图片"; vc7.title = @"热点"; vc8.title = @"体育"; vc9.title = @"财经"; vc10.title = @"国际"; vc0.view.backgroundColor = CM_RANDOM_COLOR; vc1.view.backgroundColor = CM_RANDOM_COLOR; vc2.view.backgroundColor = CM_RANDOM_COLOR; vc3.view.backgroundColor = CM_RANDOM_COLOR; vc4.view.backgroundColor = CM_RANDOM_COLOR; vc5.view.backgroundColor = CM_RANDOM_COLOR; vc6.view.backgroundColor = CM_RANDOM_COLOR; vc7.view.backgroundColor = CM_RANDOM_COLOR; vc8.view.backgroundColor = CM_RANDOM_COLOR; vc9.view.backgroundColor = CM_RANDOM_COLOR; vc10.view.backgroundColor = CM_RANDOM_COLOR; _childControllers =@[vc0,vc1,vc2,vc3,vc4,vc5,vc6,vc7]; } return _childControllers; } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; self.view.backgroundColor = [UIColor whiteColor]; [self setReloadBarButtonItem]; if (@available(iOS 11.0, *)) { self.automaticallyAdjustsScrollViewInsets = UIScrollViewContentInsetAdjustmentNever; } else { // Fallback on earlier versions self.automaticallyAdjustsScrollViewInsets = NO; } [self.pageTitleView mas_remakeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; } - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. } - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id)coordinator{ [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; CGFloat naviH = (size.height > size.width ? (CM_NOTCH_SCREEN ? 88 : 64) : (CM_NOTCH_SCREEN ? 44 : 44)); [self.pageTitleView mas_remakeConstraints:^(MASConstraintMaker *make) { make.left.right.bottom.mas_equalTo(0); make.top.mas_equalTo(naviH); }]; } - (void)setReloadBarButtonItem { self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"刷新数据" style:UIBarButtonItemStyleDone target:self action:@selector(reloadConfig:)]; } - (void)reloadConfig:(UIBarButtonItem *)sender { CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.lessChildControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline; config.cm_underlineStretch = YES; config.cm_gradientStyle = CMTitleColorGradientStyle_RGB; config.cm_contentMode = CMPageTitleContentMode_Left; config.cm_additionalMode = CMPageTitleAdditionalMode_Seperateline; // config.cm_scaleGradientContentMode = CMPageTitleScaleGradientContentMode_Bottom; config.cm_scale = 1.3; config.cm_defaultIndex = 1; config.cm_selectedColor = UIColor.blueColor; config.cm_underlineColor = UIColor.blueColor; self.pageTitleView.cm_config = config; [self.lessChildControllers setValue:@(0) forKey:@"topInset"]; [self.pageTitleView cm_reloadConfig]; } - (void)tapGesture:(UITapGestureRecognizer *)gesture { //do something ... NSLog(@"****右侧视图被点击****"); } - (void)style00_00 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_gradientStyle = CMTitleColorGradientStyle_RGB; self.pageTitleView.cm_config = config; } - (void)style00_01 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; self.pageTitleView.cm_config = config; } - (void)style00_02 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; self.pageTitleView.cm_config = config; } - (void)style00_03 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Scale; //默认放大倍数是1.2 // 可以通过下方代码自定义 // config.cm_font = [UIFont systemFontOfSize:16] // config.cm_selectedFont = [UIFont systemFontOfSize:18]; //或者 // config.cm_font = [UIFont systemFontOfSize:16] // config.cm_scale = 1.3; self.pageTitleView.cm_config = config; } - (void)style00_04 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline; self.pageTitleView.cm_config = config; } - (void)style00_05 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Cover; self.pageTitleView.cm_config = config; } - (void)style00_06 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Scale | CMPageTitleSwitchMode_Delay ; //默认放大倍数是1.2 // 可以通过下方代码自定义 // config.cm_font = [UIFont systemFontOfSize:16] // config.cm_selectedFont = [UIFont systemFontOfSize:18]; //或者 // config.cm_font = [UIFont systemFontOfSize:16] // config.cm_scale = 1.3; self.pageTitleView.cm_config = config; } - (void)style00_07 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline | CMPageTitleSwitchMode_Delay; self.pageTitleView.cm_config = config; } - (void)style00_08 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Cover | CMPageTitleSwitchMode_Delay; self.pageTitleView.cm_config = config; } - (void)style00_09 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_additionalMode = CMPageTitleAdditionalMode_Seperateline; config.cm_seperateLineHeight = 2; self.pageTitleView.cm_config = config; } - (void)style00_10 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_additionalMode = CMPageTitleAdditionalMode_Splitter; config.cm_splitterSize = CGSizeMake(1/[UIScreen mainScreen].scale, config.cm_titleHeight * 0.5); self.pageTitleView.cm_config = config; } - (void)style00_11 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.lessChildControllers; config.cm_contentMode = CMPageTitleContentMode_Left; self.pageTitleView.cm_config = config; } - (void)style00_12 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.lessChildControllers; config.cm_contentMode = CMPageTitleContentMode_Right; self.pageTitleView.cm_config = config; } - (void)style00_13 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.lessChildControllers; self.pageTitleView.cm_config = config; } - (void)style00_14 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.lessChildControllers; config.cm_contentMode = CMPageTitleContentMode_SpaceAround; self.pageTitleView.cm_config = config; } - (void)style00_15 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Scale; // 默认 // config.cm_scaleGradientContentMode = CMPageTitleScaleGradientContentMode_Center; self.pageTitleView.cm_config = config; } - (void)style00_16 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Scale; config.cm_scaleGradientContentMode = CMPageTitleScaleGradientContentMode_Top; self.pageTitleView.cm_config = config; } - (void)style00_17 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Scale; config.cm_scaleGradientContentMode = CMPageTitleScaleGradientContentMode_Bottom; self.pageTitleView.cm_config = config; } - (void)style01_00 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Scale; config.cm_gradientStyle = CMTitleColorGradientStyle_RGB; self.pageTitleView.cm_config = config; } - (void)style01_01 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Scale; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; self.pageTitleView.cm_config = config; } - (void)style01_02 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Scale; config.cm_gradientStyle = CMTitleColorGradientStyle_None; self.pageTitleView.cm_config = config; } - (void)style01_03 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Scale | CMPageTitleSwitchMode_Delay; config.cm_gradientStyle = CMTitleColorGradientStyle_RGB; self.pageTitleView.cm_config = config; } - (void)style01_04 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Scale | CMPageTitleSwitchMode_Delay; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; self.pageTitleView.cm_config = config; } - (void)style01_05 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Scale | CMPageTitleSwitchMode_Delay; config.cm_gradientStyle = CMTitleColorGradientStyle_None; self.pageTitleView.cm_config = config; } - (void)style01_06 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline; config.cm_gradientStyle = CMTitleColorGradientStyle_RGB; self.pageTitleView.cm_config = config; } - (void)style01_07 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; self.pageTitleView.cm_config = config; } - (void)style01_08 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline; config.cm_gradientStyle = CMTitleColorGradientStyle_None; self.pageTitleView.cm_config = config; } - (void)style01_09 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline | CMPageTitleSwitchMode_Delay; config.cm_gradientStyle = CMTitleColorGradientStyle_RGB; self.pageTitleView.cm_config = config; } - (void)style01_10 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline | CMPageTitleSwitchMode_Delay; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; self.pageTitleView.cm_config = config; } - (void)style01_11 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline | CMPageTitleSwitchMode_Delay; config.cm_gradientStyle = CMTitleColorGradientStyle_None; self.pageTitleView.cm_config = config; } - (void)style01_12 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline; config.cm_underlineWidth = 10; config.cm_gradientStyle = CMTitleColorGradientStyle_RGB; self.pageTitleView.cm_config = config; } - (void)style01_13 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline; config.cm_underlineWidth = 10; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; self.pageTitleView.cm_config = config; } - (void)style01_14 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline; config.cm_underlineWidth = 10; config.cm_gradientStyle = CMTitleColorGradientStyle_None; self.pageTitleView.cm_config = config; } - (void)style01_15 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline | CMPageTitleSwitchMode_Delay; config.cm_underlineWidth = 10; config.cm_gradientStyle = CMTitleColorGradientStyle_RGB; self.pageTitleView.cm_config = config; } - (void)style01_16 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline | CMPageTitleSwitchMode_Delay; config.cm_underlineWidth = 10; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; self.pageTitleView.cm_config = config; } - (void)style01_17 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline | CMPageTitleSwitchMode_Delay; config.cm_underlineWidth = 10; config.cm_gradientStyle = CMTitleColorGradientStyle_None; self.pageTitleView.cm_config = config; } - (void)style01_18 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline; config.cm_underlineWidthScale = 0.6; config.cm_gradientStyle = CMTitleColorGradientStyle_RGB; self.pageTitleView.cm_config = config; } - (void)style01_19 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline; config.cm_underlineWidthScale = 0.6; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; self.pageTitleView.cm_config = config; } - (void)style01_20 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline; config.cm_underlineWidthScale = 0.6; config.cm_gradientStyle = CMTitleColorGradientStyle_None; self.pageTitleView.cm_config = config; } - (void)style01_21 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline | CMPageTitleSwitchMode_Delay; config.cm_underlineWidthScale = 0.6; config.cm_gradientStyle = CMTitleColorGradientStyle_RGB; self.pageTitleView.cm_config = config; } - (void)style01_22 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline | CMPageTitleSwitchMode_Delay; config.cm_underlineWidthScale = 0.6; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; self.pageTitleView.cm_config = config; } - (void)style01_23 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline | CMPageTitleSwitchMode_Delay; config.cm_underlineWidthScale = 0.6; config.cm_gradientStyle = CMTitleColorGradientStyle_None; self.pageTitleView.cm_config = config; } - (void)style01_24 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline; config.cm_underlineStretch = YES; config.cm_gradientStyle = CMTitleColorGradientStyle_RGB; self.pageTitleView.cm_config = config; } - (void)style01_25 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline; config.cm_underlineStretch = YES; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; self.pageTitleView.cm_config = config; } - (void)style01_26 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline; config.cm_underlineStretch = YES; config.cm_gradientStyle = CMTitleColorGradientStyle_None; self.pageTitleView.cm_config = config; } - (void)style01_27 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline; config.cm_underlineStretch = YES; config.cm_underlineWidth = 10; config.cm_gradientStyle = CMTitleColorGradientStyle_RGB; self.pageTitleView.cm_config = config; } - (void)style01_28 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline; config.cm_underlineStretch = YES; config.cm_underlineWidth = 10; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; self.pageTitleView.cm_config = config; } - (void)style01_29 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline; config.cm_underlineWidth = 10; config.cm_underlineStretch = YES; config.cm_gradientStyle = CMTitleColorGradientStyle_None; self.pageTitleView.cm_config = config; } - (void)style01_30 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline; config.cm_underlineStretch = YES; config.cm_underlineWidthScale = 1.3; config.cm_gradientStyle = CMTitleColorGradientStyle_RGB; self.pageTitleView.cm_config = config; } - (void)style01_31 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline; config.cm_underlineStretch = YES; config.cm_underlineWidthScale = 1.3; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; self.pageTitleView.cm_config = config; } - (void)style01_32 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Underline; config.cm_underlineWidthScale = 1.3; config.cm_underlineStretch = YES; config.cm_gradientStyle = CMTitleColorGradientStyle_None; self.pageTitleView.cm_config = config; } - (void)style01_33 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Cover; config.cm_gradientStyle = CMTitleColorGradientStyle_RGB; self.pageTitleView.cm_config = config; } - (void)style01_34 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Cover; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; self.pageTitleView.cm_config = config; } - (void)style01_35 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Cover; config.cm_gradientStyle = CMTitleColorGradientStyle_None; self.pageTitleView.cm_config = config; } - (void)style01_36 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Cover | CMPageTitleSwitchMode_Delay; config.cm_gradientStyle = CMTitleColorGradientStyle_RGB; self.pageTitleView.cm_config = config; } - (void)style01_37 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Cover | CMPageTitleSwitchMode_Delay; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; self.pageTitleView.cm_config = config; } - (void)style01_38 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Cover | CMPageTitleSwitchMode_Delay; config.cm_gradientStyle = CMTitleColorGradientStyle_None; self.pageTitleView.cm_config = config; } - (void)style01_39 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Cover; config.cm_coverWidth = 56; config.cm_gradientStyle = CMTitleColorGradientStyle_RGB; self.pageTitleView.cm_config = config; } - (void)style01_40 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Cover; config.cm_coverWidth = 56; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; self.pageTitleView.cm_config = config; } - (void)style01_41 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Cover; config.cm_coverWidth = 56; config.cm_gradientStyle = CMTitleColorGradientStyle_None; self.pageTitleView.cm_config = config; } - (void)style01_42 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Cover | CMPageTitleSwitchMode_Delay; config.cm_coverWidth = 56; config.cm_gradientStyle = CMTitleColorGradientStyle_RGB; self.pageTitleView.cm_config = config; } - (void)style01_43 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Cover | CMPageTitleSwitchMode_Delay; config.cm_coverWidth = 56; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; self.pageTitleView.cm_config = config; } - (void)style01_44 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Cover | CMPageTitleSwitchMode_Delay; config.cm_coverWidth = 56; config.cm_gradientStyle = CMTitleColorGradientStyle_None; self.pageTitleView.cm_config = config; } - (void)style01_45 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Scale | CMPageTitleSwitchMode_Underline; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; self.pageTitleView.cm_config = config; } - (void)style01_46 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Scale | CMPageTitleSwitchMode_Underline | CMPageTitleSwitchMode_Delay; config.cm_gradientStyle = CMTitleColorGradientStyle_None; self.pageTitleView.cm_config = config; } - (void)style01_47 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Scale | CMPageTitleSwitchMode_Underline; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; config.cm_underlineStretch = YES; self.pageTitleView.cm_config = config; } - (void)style01_48 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Scale | CMPageTitleSwitchMode_Underline; config.cm_underlineStretch = YES; config.cm_underlineWidth = 10; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; self.pageTitleView.cm_config = config; } - (void)style01_49 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Scale | CMPageTitleSwitchMode_Underline; config.cm_underlineStretch = YES; config.cm_underlineWidthScale = 0.6; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; self.pageTitleView.cm_config = config; } - (void)style01_50 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Scale | CMPageTitleSwitchMode_Underline; config.cm_underlineStretch = YES; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; config.cm_scaleGradientContentMode = CMPageTitleScaleGradientContentMode_Bottom; config.cm_scale = 1.3; self.pageTitleView.cm_config = config; } - (void)style01_51 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.lessChildControllers; config.cm_switchMode = CMPageTitleSwitchMode_Scale | CMPageTitleSwitchMode_Underline; config.cm_underlineStretch = YES; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; config.cm_contentMode = CMPageTitleContentMode_Left; config.cm_scaleGradientContentMode = CMPageTitleScaleGradientContentMode_Bottom; config.cm_scale = 1.3; self.pageTitleView.cm_config = config; } - (void)style02_00 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_gradientStyle = CMTitleColorGradientStyle_RGB; config.cm_backgroundColor = [UIColor colorWithWhite:0 alpha:0.3]; self.pageTitleView.cm_config = config; } - (void)style02_01 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_gradientStyle = CMTitleColorGradientStyle_RGB; config.cm_backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"background_image"]]; self.pageTitleView.cm_config = config; } - (void)style02_02 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_gradientStyle = CMTitleColorGradientStyle_RGB; config.cm_titleTop = 20; config.cm_rightView = self.rightView; self.pageTitleView.cm_config = config; } - (void)style02_03 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_switchMode = CMPageTitleSwitchMode_Scale | CMPageTitleSwitchMode_Underline; config.cm_underlineStretch = YES; config.cm_fullScreen = YES; config.cm_underlineWidthScale = 0.6; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; config.cm_scale = 1.3; config.cm_additionalMode = CMPageTitleAdditionalMode_Seperateline; config.cm_seperateLineHeight = 2; config.cm_seperaterLineColor = [UIColor.lightGrayColor colorWithAlphaComponent:0.7]; config.cm_backgroundColor = [UIColor.whiteColor colorWithAlphaComponent:0.7]; [self.childControllers setValue:@(config.cm_seperateLineHeight+config.cm_titleHeight) forKey:@"topInset"]; self.pageTitleView.cm_config = config; } - (void)style02_04 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; config.cm_backgroundColor = UIColor.clearColor; config.cm_titleTop = 40; config.cm_fullScreen = YES; self.pageTitleView.cm_config = config; } - (void)style02_05 { [self.pageTitleView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; self.pageTitleView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.twoControllers; config.cm_gradientStyle = CMTitleColorGradientStyle_Fill; config.cm_switchMode = CMPageTitleSwitchMode_Underline; config.cm_contentMode = CMPageTitleContentMode_SpaceAround; config.cm_underlineWidth = CM_SCREEN_W * 0.5; self.pageTitleView.cm_config = config; } - (void)cm_pageTitleViewSelectedWithIndex:(NSInteger)index Repeat:(BOOL)repeat { NSLog(@"第%ld个标题被选中;且%@是重复选中\n当前视图的高度:%lf",index,repeat?@"":@"不",self.pageTitleView.cm_config.cm_childControllers[index].view.cm_y); } - (void)cm_pageTitleViewClickWithIndex:(NSInteger)index Repeat:(BOOL)repeat { NSLog(@"第%ld个标题被点击;且%@是重复点击",index,repeat?@"":@"不"); } - (void)cm_pageTitleViewScrollToIndex:(NSInteger)index { NSLog(@"当前滚动到第%ld个标题",index); } @end ================================================ FILE: CMPageTitleView/CMPageTitleView/Other/AppDelegate.h ================================================ // // AppDelegate.h // CMPageTitleView // // Created by CrabMan on 2018/8/13. // Copyright © 2018年 CrabMan. All rights reserved. // #import @interface AppDelegate : UIResponder @property (strong, nonatomic) UIWindow *window; @end ================================================ FILE: CMPageTitleView/CMPageTitleView/Other/AppDelegate.m ================================================ // // AppDelegate.m // CMPageTitleView // // Created by CrabMan on 2018/8/13. // Copyright © 2018年 CrabMan. All rights reserved. // #import "AppDelegate.h" #import "CMMainTableController.h" @interface AppDelegate () @end @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. _window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds]; UINavigationController *rootVC = [[UINavigationController alloc] initWithRootViewController:[CMMainTableController new]]; rootVC.interactivePopGestureRecognizer.enabled = YES; _window.rootViewController = rootVC; [_window makeKeyAndVisible]; return YES; } - (void)applicationWillResignActive:(UIApplication *)application { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. } - (void)applicationDidEnterBackground:(UIApplication *)application { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } - (void)applicationWillEnterForeground:(UIApplication *)application { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. } - (void)applicationDidBecomeActive:(UIApplication *)application { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } - (void)applicationWillTerminate:(UIApplication *)application { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } @end ================================================ FILE: CMPageTitleView/CMPageTitleView/Other/Assets.xcassets/AppIcon.appiconset/Contents.json ================================================ { "images" : [ { "idiom" : "iphone", "size" : "20x20", "scale" : "2x" }, { "idiom" : "iphone", "size" : "20x20", "scale" : "3x" }, { "idiom" : "iphone", "size" : "29x29", "scale" : "2x" }, { "idiom" : "iphone", "size" : "29x29", "scale" : "3x" }, { "idiom" : "iphone", "size" : "40x40", "scale" : "2x" }, { "idiom" : "iphone", "size" : "40x40", "scale" : "3x" }, { "idiom" : "iphone", "size" : "60x60", "scale" : "2x" }, { "idiom" : "iphone", "size" : "60x60", "scale" : "3x" }, { "idiom" : "ipad", "size" : "20x20", "scale" : "1x" }, { "idiom" : "ipad", "size" : "20x20", "scale" : "2x" }, { "idiom" : "ipad", "size" : "29x29", "scale" : "1x" }, { "idiom" : "ipad", "size" : "29x29", "scale" : "2x" }, { "idiom" : "ipad", "size" : "40x40", "scale" : "1x" }, { "idiom" : "ipad", "size" : "40x40", "scale" : "2x" }, { "idiom" : "ipad", "size" : "76x76", "scale" : "1x" }, { "idiom" : "ipad", "size" : "76x76", "scale" : "2x" }, { "idiom" : "ipad", "size" : "83.5x83.5", "scale" : "2x" }, { "idiom" : "ios-marketing", "size" : "1024x1024", "scale" : "1x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: CMPageTitleView/CMPageTitleView/Other/Assets.xcassets/Contents.json ================================================ { "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: CMPageTitleView/CMPageTitleView/Other/Assets.xcassets/add.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "添加.png", "scale" : "1x" }, { "idiom" : "universal", "scale" : "2x" }, { "idiom" : "universal", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: CMPageTitleView/CMPageTitleView/Other/Assets.xcassets/background_image.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "background_image.jpg", "scale" : "1x" }, { "idiom" : "universal", "scale" : "2x" }, { "idiom" : "universal", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: CMPageTitleView/CMPageTitleView/Other/Base.lproj/LaunchScreen.storyboard ================================================ ================================================ FILE: CMPageTitleView/CMPageTitleView/Other/Base.lproj/Main.storyboard ================================================ ================================================ FILE: CMPageTitleView/CMPageTitleView/Other/Info.plist ================================================ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType APPL CFBundleShortVersionString 1.0 CFBundleVersion 1 LSRequiresIPhoneOS UILaunchStoryboardName LaunchScreen UIMainStoryboardFile Main UIRequiredDeviceCapabilities armv7 UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UISupportedInterfaceOrientations~ipad UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight ================================================ FILE: CMPageTitleView/CMPageTitleView/Other/main.m ================================================ // // main.m // CMPageTitleView // // Created by CrabMan on 2018/8/13. // Copyright © 2018年 CrabMan. All rights reserved. // #import #import "AppDelegate.h" int main(int argc, char * argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } } ================================================ FILE: CMPageTitleView/CMPageTitleView.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 51; objects = { /* Begin PBXBuildFile section */ 0401ED6B2488D66100A4129D /* CMChildTableController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0401ED692488D66000A4129D /* CMChildTableController.m */; }; 20598ED47AE57CA3A7346B2E /* Pods_CMPageTitleViewTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A3D90BC7D0E023236111CFB8 /* Pods_CMPageTitleViewTests.framework */; }; 3D58563707075CC0ECF6EB1C /* Pods_CMPageTitleView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8348F37DD152646043507B7D /* Pods_CMPageTitleView.framework */; }; 84EFD8C7E88418373356859D /* Pods_CMPageTitleViewUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A2648515C1D6D8734A20D40 /* Pods_CMPageTitleViewUITests.framework */; }; B51FABE0225DD15C004117BD /* CMMainTableController.m in Sources */ = {isa = PBXBuildFile; fileRef = B51FABDF225DD15C004117BD /* CMMainTableController.m */; }; B51FABE3225DD2E7004117BD /* CMViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B51FABE2225DD2E7004117BD /* CMViewController.m */; }; B53D96F7224883C50092BDE3 /* CMPageTitleConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = B53D96F6224883C50092BDE3 /* CMPageTitleConfig.m */; }; B5B8ACF62249CA2D00ABF82B /* UIView+CMCommon.m in Sources */ = {isa = PBXBuildFile; fileRef = B5B8ACF52249CA2D00ABF82B /* UIView+CMCommon.m */; }; B5EBC9C821215A72000403B8 /* CMPageTitleContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = B5EBC9B921215A72000403B8 /* CMPageTitleContentView.m */; }; B5EBC9C921215A72000403B8 /* CMPageContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = B5EBC9BA21215A72000403B8 /* CMPageContentView.m */; }; B5EBC9CA21215A72000403B8 /* CMPageTitleView.m in Sources */ = {isa = PBXBuildFile; fileRef = B5EBC9BB21215A72000403B8 /* CMPageTitleView.m */; }; B5EBC9CB21215A72000403B8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B5EBC9BE21215A72000403B8 /* Assets.xcassets */; }; B5EBC9CD21215A72000403B8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B5EBC9C021215A72000403B8 /* LaunchScreen.storyboard */; }; B5EBC9CE21215A72000403B8 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B5EBC9C221215A72000403B8 /* Main.storyboard */; }; B5EBC9CF21215A72000403B8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B5EBC9C421215A72000403B8 /* main.m */; }; B5EBC9D021215A72000403B8 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B5EBC9C521215A72000403B8 /* AppDelegate.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ B5EBC99821215A31000403B8 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = B5EBC97721215A2E000403B8 /* Project object */; proxyType = 1; remoteGlobalIDString = B5EBC97E21215A2F000403B8; remoteInfo = CMPageTitleView; }; B5EBC9A321215A31000403B8 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = B5EBC97721215A2E000403B8 /* Project object */; proxyType = 1; remoteGlobalIDString = B5EBC97E21215A2F000403B8; remoteInfo = CMPageTitleView; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 0401ED692488D66000A4129D /* CMChildTableController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CMChildTableController.m; sourceTree = ""; }; 0401ED6A2488D66100A4129D /* CMChildTableController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CMChildTableController.h; sourceTree = ""; }; 1A2648515C1D6D8734A20D40 /* Pods_CMPageTitleViewUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CMPageTitleViewUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 6FB0CEAE97F306B2DE1A62A3 /* Pods-CMPageTitleViewUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CMPageTitleViewUITests.release.xcconfig"; path = "Target Support Files/Pods-CMPageTitleViewUITests/Pods-CMPageTitleViewUITests.release.xcconfig"; sourceTree = ""; }; 789334BA070C5D2F074F49C9 /* Pods-CMPageTitleViewUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CMPageTitleViewUITests.debug.xcconfig"; path = "Target Support Files/Pods-CMPageTitleViewUITests/Pods-CMPageTitleViewUITests.debug.xcconfig"; sourceTree = ""; }; 7A7BA8CFD14D0A58CCF66114 /* Pods-CMPageTitleViewTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CMPageTitleViewTests.release.xcconfig"; path = "Target Support Files/Pods-CMPageTitleViewTests/Pods-CMPageTitleViewTests.release.xcconfig"; sourceTree = ""; }; 8348F37DD152646043507B7D /* Pods_CMPageTitleView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CMPageTitleView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A3D90BC7D0E023236111CFB8 /* Pods_CMPageTitleViewTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CMPageTitleViewTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; AA21FEDE81DFC732D1A8BAFC /* Pods-CMPageTitleView.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CMPageTitleView.debug.xcconfig"; path = "Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView.debug.xcconfig"; sourceTree = ""; }; B51FABDE225DD15C004117BD /* CMMainTableController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CMMainTableController.h; sourceTree = ""; }; B51FABDF225DD15C004117BD /* CMMainTableController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CMMainTableController.m; sourceTree = ""; }; B51FABE1225DD2E7004117BD /* CMViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CMViewController.h; sourceTree = ""; }; B51FABE2225DD2E7004117BD /* CMViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CMViewController.m; sourceTree = ""; }; B53D96F5224883C50092BDE3 /* CMPageTitleConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CMPageTitleConfig.h; sourceTree = ""; }; B53D96F6224883C50092BDE3 /* CMPageTitleConfig.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CMPageTitleConfig.m; sourceTree = ""; }; B5B8ACF42249CA2D00ABF82B /* UIView+CMCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+CMCommon.h"; sourceTree = ""; }; B5B8ACF52249CA2D00ABF82B /* UIView+CMCommon.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+CMCommon.m"; sourceTree = ""; }; B5EBC97F21215A2F000403B8 /* CMPageTitleView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CMPageTitleView.app; sourceTree = BUILT_PRODUCTS_DIR; }; B5EBC99721215A31000403B8 /* CMPageTitleViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CMPageTitleViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; B5EBC9A221215A31000403B8 /* CMPageTitleViewUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CMPageTitleViewUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; B5EBC9B621215A72000403B8 /* CMPageTitleContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CMPageTitleContentView.h; sourceTree = ""; }; B5EBC9B721215A72000403B8 /* CMPageContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CMPageContentView.h; sourceTree = ""; }; B5EBC9B821215A72000403B8 /* CMPageTitleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CMPageTitleView.h; sourceTree = ""; }; B5EBC9B921215A72000403B8 /* CMPageTitleContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CMPageTitleContentView.m; sourceTree = ""; }; B5EBC9BA21215A72000403B8 /* CMPageContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CMPageContentView.m; sourceTree = ""; }; B5EBC9BB21215A72000403B8 /* CMPageTitleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CMPageTitleView.m; sourceTree = ""; }; B5EBC9BD21215A72000403B8 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; B5EBC9BE21215A72000403B8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; B5EBC9C121215A72000403B8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; B5EBC9C321215A72000403B8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; B5EBC9C421215A72000403B8 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; B5EBC9C521215A72000403B8 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; B5EBC9C621215A72000403B8 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; B5EE93B922842CE60062F7C5 /* CMPageTitleViewMacro.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CMPageTitleViewMacro.h; sourceTree = ""; }; D3EFDB73791EB7362E8D3E81 /* Pods-CMPageTitleViewTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CMPageTitleViewTests.debug.xcconfig"; path = "Target Support Files/Pods-CMPageTitleViewTests/Pods-CMPageTitleViewTests.debug.xcconfig"; sourceTree = ""; }; E71FFC097CA2E6BE0DF86E8A /* Pods-CMPageTitleView.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CMPageTitleView.release.xcconfig"; path = "Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ B5EBC97C21215A2F000403B8 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 3D58563707075CC0ECF6EB1C /* Pods_CMPageTitleView.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; B5EBC99421215A31000403B8 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 20598ED47AE57CA3A7346B2E /* Pods_CMPageTitleViewTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; B5EBC99F21215A31000403B8 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 84EFD8C7E88418373356859D /* Pods_CMPageTitleViewUITests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 96799725F871B0D79FB4BEF9 /* Frameworks */ = { isa = PBXGroup; children = ( 8348F37DD152646043507B7D /* Pods_CMPageTitleView.framework */, A3D90BC7D0E023236111CFB8 /* Pods_CMPageTitleViewTests.framework */, 1A2648515C1D6D8734A20D40 /* Pods_CMPageTitleViewUITests.framework */, ); name = Frameworks; sourceTree = ""; }; A989CE2B24D8F6E64959D5F1 /* Pods */ = { isa = PBXGroup; children = ( AA21FEDE81DFC732D1A8BAFC /* Pods-CMPageTitleView.debug.xcconfig */, E71FFC097CA2E6BE0DF86E8A /* Pods-CMPageTitleView.release.xcconfig */, D3EFDB73791EB7362E8D3E81 /* Pods-CMPageTitleViewTests.debug.xcconfig */, 7A7BA8CFD14D0A58CCF66114 /* Pods-CMPageTitleViewTests.release.xcconfig */, 789334BA070C5D2F074F49C9 /* Pods-CMPageTitleViewUITests.debug.xcconfig */, 6FB0CEAE97F306B2DE1A62A3 /* Pods-CMPageTitleViewUITests.release.xcconfig */, ); path = Pods; sourceTree = ""; }; B51FABDD225DD0E1004117BD /* Demo */ = { isa = PBXGroup; children = ( 0401ED6A2488D66100A4129D /* CMChildTableController.h */, 0401ED692488D66000A4129D /* CMChildTableController.m */, B51FABDE225DD15C004117BD /* CMMainTableController.h */, B51FABDF225DD15C004117BD /* CMMainTableController.m */, B51FABE1225DD2E7004117BD /* CMViewController.h */, B51FABE2225DD2E7004117BD /* CMViewController.m */, ); path = Demo; sourceTree = ""; }; B5EBC97621215A2E000403B8 = { isa = PBXGroup; children = ( B5EBC98121215A2F000403B8 /* CMPageTitleView */, B5EBC98021215A2F000403B8 /* Products */, A989CE2B24D8F6E64959D5F1 /* Pods */, 96799725F871B0D79FB4BEF9 /* Frameworks */, ); sourceTree = ""; }; B5EBC98021215A2F000403B8 /* Products */ = { isa = PBXGroup; children = ( B5EBC97F21215A2F000403B8 /* CMPageTitleView.app */, B5EBC99721215A31000403B8 /* CMPageTitleViewTests.xctest */, B5EBC9A221215A31000403B8 /* CMPageTitleViewUITests.xctest */, ); name = Products; sourceTree = ""; }; B5EBC98121215A2F000403B8 /* CMPageTitleView */ = { isa = PBXGroup; children = ( B5EBC9B421215A72000403B8 /* Class */, B51FABDD225DD0E1004117BD /* Demo */, B5EBC9BC21215A72000403B8 /* Other */, ); path = CMPageTitleView; sourceTree = ""; }; B5EBC9B421215A72000403B8 /* Class */ = { isa = PBXGroup; children = ( B5EBC9B821215A72000403B8 /* CMPageTitleView.h */, B5EBC9BB21215A72000403B8 /* CMPageTitleView.m */, B5EE93B922842CE60062F7C5 /* CMPageTitleViewMacro.h */, B53D96F5224883C50092BDE3 /* CMPageTitleConfig.h */, B53D96F6224883C50092BDE3 /* CMPageTitleConfig.m */, B5EBC9B621215A72000403B8 /* CMPageTitleContentView.h */, B5EBC9B921215A72000403B8 /* CMPageTitleContentView.m */, B5EBC9B721215A72000403B8 /* CMPageContentView.h */, B5EBC9BA21215A72000403B8 /* CMPageContentView.m */, B5B8ACF42249CA2D00ABF82B /* UIView+CMCommon.h */, B5B8ACF52249CA2D00ABF82B /* UIView+CMCommon.m */, ); path = Class; sourceTree = ""; }; B5EBC9BC21215A72000403B8 /* Other */ = { isa = PBXGroup; children = ( B5EBC9C621215A72000403B8 /* Info.plist */, B5EBC9BD21215A72000403B8 /* AppDelegate.h */, B5EBC9BE21215A72000403B8 /* Assets.xcassets */, B5EBC9C021215A72000403B8 /* LaunchScreen.storyboard */, B5EBC9C221215A72000403B8 /* Main.storyboard */, B5EBC9C421215A72000403B8 /* main.m */, B5EBC9C521215A72000403B8 /* AppDelegate.m */, ); path = Other; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ B5EBC97E21215A2F000403B8 /* CMPageTitleView */ = { isa = PBXNativeTarget; buildConfigurationList = B5EBC9AB21215A31000403B8 /* Build configuration list for PBXNativeTarget "CMPageTitleView" */; buildPhases = ( EA8E859A87F38CEC3EBB190B /* [CP] Check Pods Manifest.lock */, B5EBC97B21215A2F000403B8 /* Sources */, B5EBC97C21215A2F000403B8 /* Frameworks */, B5EBC97D21215A2F000403B8 /* Resources */, 13425E14AC1B19271209729D /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); dependencies = ( ); name = CMPageTitleView; productName = CMPageTitleView; productReference = B5EBC97F21215A2F000403B8 /* CMPageTitleView.app */; productType = "com.apple.product-type.application"; }; B5EBC99621215A31000403B8 /* CMPageTitleViewTests */ = { isa = PBXNativeTarget; buildConfigurationList = B5EBC9AE21215A31000403B8 /* Build configuration list for PBXNativeTarget "CMPageTitleViewTests" */; buildPhases = ( BCBF7D2B3B6268AC9396A532 /* [CP] Check Pods Manifest.lock */, B5EBC99321215A31000403B8 /* Sources */, B5EBC99421215A31000403B8 /* Frameworks */, B5EBC99521215A31000403B8 /* Resources */, ); buildRules = ( ); dependencies = ( B5EBC99921215A31000403B8 /* PBXTargetDependency */, ); name = CMPageTitleViewTests; productName = CMPageTitleViewTests; productReference = B5EBC99721215A31000403B8 /* CMPageTitleViewTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; B5EBC9A121215A31000403B8 /* CMPageTitleViewUITests */ = { isa = PBXNativeTarget; buildConfigurationList = B5EBC9B121215A31000403B8 /* Build configuration list for PBXNativeTarget "CMPageTitleViewUITests" */; buildPhases = ( 369B8B0CC80DC0B8EB0443E6 /* [CP] Check Pods Manifest.lock */, B5EBC99E21215A31000403B8 /* Sources */, B5EBC99F21215A31000403B8 /* Frameworks */, B5EBC9A021215A31000403B8 /* Resources */, ); buildRules = ( ); dependencies = ( B5EBC9A421215A31000403B8 /* PBXTargetDependency */, ); name = CMPageTitleViewUITests; productName = CMPageTitleViewUITests; productReference = B5EBC9A221215A31000403B8 /* CMPageTitleViewUITests.xctest */; productType = "com.apple.product-type.bundle.ui-testing"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ B5EBC97721215A2E000403B8 /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 1020; ORGANIZATIONNAME = CrabMan; TargetAttributes = { B5EBC97E21215A2F000403B8 = { CreatedOnToolsVersion = 9.3.1; }; B5EBC99621215A31000403B8 = { CreatedOnToolsVersion = 9.3.1; TestTargetID = B5EBC97E21215A2F000403B8; }; B5EBC9A121215A31000403B8 = { CreatedOnToolsVersion = 9.3.1; TestTargetID = B5EBC97E21215A2F000403B8; }; }; }; buildConfigurationList = B5EBC97A21215A2E000403B8 /* Build configuration list for PBXProject "CMPageTitleView" */; compatibilityVersion = "Xcode 9.3"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, Base, ); mainGroup = B5EBC97621215A2E000403B8; productRefGroup = B5EBC98021215A2F000403B8 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( B5EBC97E21215A2F000403B8 /* CMPageTitleView */, B5EBC99621215A31000403B8 /* CMPageTitleViewTests */, B5EBC9A121215A31000403B8 /* CMPageTitleViewUITests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ B5EBC97D21215A2F000403B8 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( B5EBC9CE21215A72000403B8 /* Main.storyboard in Resources */, B5EBC9CB21215A72000403B8 /* Assets.xcassets in Resources */, B5EBC9CD21215A72000403B8 /* LaunchScreen.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; B5EBC99521215A31000403B8 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; B5EBC9A021215A31000403B8 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ 13425E14AC1B19271209729D /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; 369B8B0CC80DC0B8EB0443E6 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( ); inputPaths = ( "${PODS_PODFILE_DIR_PATH}/Podfile.lock", "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( ); outputPaths = ( "$(DERIVED_FILE_DIR)/Pods-CMPageTitleViewUITests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; 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"; showEnvVarsInLog = 0; }; BCBF7D2B3B6268AC9396A532 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( ); inputPaths = ( "${PODS_PODFILE_DIR_PATH}/Podfile.lock", "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( ); outputPaths = ( "$(DERIVED_FILE_DIR)/Pods-CMPageTitleViewTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; 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"; showEnvVarsInLog = 0; }; EA8E859A87F38CEC3EBB190B /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( ); inputPaths = ( "${PODS_PODFILE_DIR_PATH}/Podfile.lock", "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( ); outputPaths = ( "$(DERIVED_FILE_DIR)/Pods-CMPageTitleView-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; 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"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ B5EBC97B21215A2F000403B8 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( B5B8ACF62249CA2D00ABF82B /* UIView+CMCommon.m in Sources */, B53D96F7224883C50092BDE3 /* CMPageTitleConfig.m in Sources */, B5EBC9CF21215A72000403B8 /* main.m in Sources */, B5EBC9C821215A72000403B8 /* CMPageTitleContentView.m in Sources */, B5EBC9D021215A72000403B8 /* AppDelegate.m in Sources */, 0401ED6B2488D66100A4129D /* CMChildTableController.m in Sources */, B51FABE3225DD2E7004117BD /* CMViewController.m in Sources */, B51FABE0225DD15C004117BD /* CMMainTableController.m in Sources */, B5EBC9CA21215A72000403B8 /* CMPageTitleView.m in Sources */, B5EBC9C921215A72000403B8 /* CMPageContentView.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; B5EBC99321215A31000403B8 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; B5EBC99E21215A31000403B8 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ B5EBC99921215A31000403B8 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = B5EBC97E21215A2F000403B8 /* CMPageTitleView */; targetProxy = B5EBC99821215A31000403B8 /* PBXContainerItemProxy */; }; B5EBC9A421215A31000403B8 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = B5EBC97E21215A2F000403B8 /* CMPageTitleView */; targetProxy = B5EBC9A321215A31000403B8 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ B5EBC9C021215A72000403B8 /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( B5EBC9C121215A72000403B8 /* Base */, ); name = LaunchScreen.storyboard; sourceTree = ""; }; B5EBC9C221215A72000403B8 /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( B5EBC9C321215A72000403B8 /* Base */, ); name = Main.storyboard; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ B5EBC9A921215A31000403B8 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 11.3; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; name = Debug; }; B5EBC9AA21215A31000403B8 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 11.3; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; name = Release; }; B5EBC9AC21215A31000403B8 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = AA21FEDE81DFC732D1A8BAFC /* Pods-CMPageTitleView.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = HBW48U6989; GCC_PREFIX_HEADER = ""; INFOPLIST_FILE = "$(SRCROOT)/CMPageTitleView/Other/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); OTHER_LDFLAGS = ( "$(inherited)", "-all_load", "-Objc", ); PRODUCT_BUNDLE_IDENTIFIER = com.CMPageTitleView.crabman; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**"; }; name = Debug; }; B5EBC9AD21215A31000403B8 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = E71FFC097CA2E6BE0DF86E8A /* Pods-CMPageTitleView.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = HBW48U6989; GCC_PREFIX_HEADER = ""; INFOPLIST_FILE = "$(SRCROOT)/CMPageTitleView/Other/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); OTHER_LDFLAGS = ( "$(inherited)", "-all_load", "-Objc", ); PRODUCT_BUNDLE_IDENTIFIER = com.CMPageTitleView.crabman; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**"; }; name = Release; }; B5EBC9AF21215A31000403B8 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = D3EFDB73791EB7362E8D3E81 /* Pods-CMPageTitleViewTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = CMPageTitleViewTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); PRODUCT_BUNDLE_IDENTIFIER = CrabMan.CMPageTitleViewTests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CMPageTitleView.app/CMPageTitleView"; }; name = Debug; }; B5EBC9B021215A31000403B8 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 7A7BA8CFD14D0A58CCF66114 /* Pods-CMPageTitleViewTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = CMPageTitleViewTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); PRODUCT_BUNDLE_IDENTIFIER = CrabMan.CMPageTitleViewTests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CMPageTitleView.app/CMPageTitleView"; }; name = Release; }; B5EBC9B221215A31000403B8 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 789334BA070C5D2F074F49C9 /* Pods-CMPageTitleViewUITests.debug.xcconfig */; buildSettings = { CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = CMPageTitleViewUITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); PRODUCT_BUNDLE_IDENTIFIER = CrabMan.CMPageTitleViewUITests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; TEST_TARGET_NAME = CMPageTitleView; }; name = Debug; }; B5EBC9B321215A31000403B8 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 6FB0CEAE97F306B2DE1A62A3 /* Pods-CMPageTitleViewUITests.release.xcconfig */; buildSettings = { CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = CMPageTitleViewUITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); PRODUCT_BUNDLE_IDENTIFIER = CrabMan.CMPageTitleViewUITests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; TEST_TARGET_NAME = CMPageTitleView; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ B5EBC97A21215A2E000403B8 /* Build configuration list for PBXProject "CMPageTitleView" */ = { isa = XCConfigurationList; buildConfigurations = ( B5EBC9A921215A31000403B8 /* Debug */, B5EBC9AA21215A31000403B8 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; B5EBC9AB21215A31000403B8 /* Build configuration list for PBXNativeTarget "CMPageTitleView" */ = { isa = XCConfigurationList; buildConfigurations = ( B5EBC9AC21215A31000403B8 /* Debug */, B5EBC9AD21215A31000403B8 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; B5EBC9AE21215A31000403B8 /* Build configuration list for PBXNativeTarget "CMPageTitleViewTests" */ = { isa = XCConfigurationList; buildConfigurations = ( B5EBC9AF21215A31000403B8 /* Debug */, B5EBC9B021215A31000403B8 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; B5EBC9B121215A31000403B8 /* Build configuration list for PBXNativeTarget "CMPageTitleViewUITests" */ = { isa = XCConfigurationList; buildConfigurations = ( B5EBC9B221215A31000403B8 /* Debug */, B5EBC9B321215A31000403B8 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = B5EBC97721215A2E000403B8 /* Project object */; } ================================================ FILE: CMPageTitleView/CMPageTitleView.xcodeproj/project.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: CMPageTitleView/CMPageTitleView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist ================================================ IDEDidComputeMac32BitWarning ================================================ FILE: CMPageTitleView/CMPageTitleView.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings ================================================ BuildSystemType Original ================================================ FILE: CMPageTitleView/CMPageTitleView.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: CMPageTitleView/CMPageTitleView.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist ================================================ IDEDidComputeMac32BitWarning ================================================ FILE: CMPageTitleView/CMPageTitleView.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings ================================================ BuildSystemType Original ================================================ FILE: CMPageTitleView/Podfile ================================================ # Uncomment the next line to define a global platform for your project platform :ios, '9.0' target 'CMPageTitleView' do # Uncomment the next line if you're using Swift or would like to use dynamic frameworks use_frameworks! # Pods for CMPageTitleView pod 'Masonry' pod 'MJRefresh' target 'CMPageTitleViewTests' do inherit! :search_paths # Pods for testing end target 'CMPageTitleViewUITests' do inherit! :search_paths # Pods for testing end end ================================================ FILE: CMPageTitleView/Pods/MJRefresh/LICENSE ================================================ Copyright (c) 2013-2015 MJRefresh (https://github.com/CoderMJLee/MJRefresh) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Base/MJRefreshAutoFooter.h ================================================ // // MJRefreshAutoFooter.h // MJRefreshExample // // Created by MJ Lee on 15/4/24. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "MJRefreshFooter.h" NS_ASSUME_NONNULL_BEGIN @interface MJRefreshAutoFooter : MJRefreshFooter /** 是否自动刷新(默认为YES) */ @property (assign, nonatomic, getter=isAutomaticallyRefresh) BOOL automaticallyRefresh; /** 当底部控件出现多少时就自动刷新(默认为1.0,也就是底部控件完全出现时,才会自动刷新) */ @property (assign, nonatomic) CGFloat appearencePercentTriggerAutoRefresh MJRefreshDeprecated("请使用triggerAutomaticallyRefreshPercent属性"); /** 当底部控件出现多少时就自动刷新(默认为1.0,也就是底部控件完全出现时,才会自动刷新) */ @property (assign, nonatomic) CGFloat triggerAutomaticallyRefreshPercent; /** 自动触发次数, 默认为 1, 仅在拖拽 ScrollView 时才生效, 如果为 -1, 则为无限触发 */ @property (nonatomic) NSInteger autoTriggerTimes; @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Base/MJRefreshAutoFooter.m ================================================ // // MJRefreshAutoFooter.m // MJRefreshExample // // Created by MJ Lee on 15/4/24. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "MJRefreshAutoFooter.h" @interface MJRefreshAutoFooter() /** 一个新的拖拽 */ @property (nonatomic) BOOL triggerByDrag; @property (nonatomic) NSInteger leftTriggerTimes; @end @implementation MJRefreshAutoFooter #pragma mark - 初始化 - (void)willMoveToSuperview:(UIView *)newSuperview { [super willMoveToSuperview:newSuperview]; if (newSuperview) { // 新的父控件 if (self.hidden == NO) { self.scrollView.mj_insetB += self.mj_h; } // 设置位置 self.mj_y = _scrollView.mj_contentH; } else { // 被移除了 if (self.hidden == NO) { self.scrollView.mj_insetB -= self.mj_h; } } } #pragma mark - 过期方法 - (void)setAppearencePercentTriggerAutoRefresh:(CGFloat)appearencePercentTriggerAutoRefresh { self.triggerAutomaticallyRefreshPercent = appearencePercentTriggerAutoRefresh; } - (CGFloat)appearencePercentTriggerAutoRefresh { return self.triggerAutomaticallyRefreshPercent; } #pragma mark - 实现父类的方法 - (void)prepare { [super prepare]; // 默认底部控件100%出现时才会自动刷新 self.triggerAutomaticallyRefreshPercent = 1.0; // 设置为默认状态 self.automaticallyRefresh = YES; self.autoTriggerTimes = 1; } - (void)scrollViewContentSizeDidChange:(NSDictionary *)change { [super scrollViewContentSizeDidChange:change]; // 设置位置 self.mj_y = self.scrollView.mj_contentH + self.ignoredScrollViewContentInsetBottom; } - (void)scrollViewContentOffsetDidChange:(NSDictionary *)change { [super scrollViewContentOffsetDidChange:change]; if (self.state != MJRefreshStateIdle || !self.automaticallyRefresh || self.mj_y == 0) return; if (_scrollView.mj_insetT + _scrollView.mj_contentH > _scrollView.mj_h) { // 内容超过一个屏幕 // 这里的_scrollView.mj_contentH替换掉self.mj_y更为合理 if (_scrollView.mj_offsetY >= _scrollView.mj_contentH - _scrollView.mj_h + self.mj_h * self.triggerAutomaticallyRefreshPercent + _scrollView.mj_insetB - self.mj_h) { // 防止手松开时连续调用 CGPoint old = [change[@"old"] CGPointValue]; CGPoint new = [change[@"new"] CGPointValue]; if (new.y <= old.y) return; if (_scrollView.isDragging) { self.triggerByDrag = YES; } // 当底部刷新控件完全出现时,才刷新 [self beginRefreshing]; } } } - (void)scrollViewPanStateDidChange:(NSDictionary *)change { [super scrollViewPanStateDidChange:change]; if (self.state != MJRefreshStateIdle) return; UIGestureRecognizerState panState = _scrollView.panGestureRecognizer.state; switch (panState) { // 手松开 case UIGestureRecognizerStateEnded: { if (_scrollView.mj_insetT + _scrollView.mj_contentH <= _scrollView.mj_h) { // 不够一个屏幕 if (_scrollView.mj_offsetY >= - _scrollView.mj_insetT) { // 向上拽 self.triggerByDrag = YES; [self beginRefreshing]; } } else { // 超出一个屏幕 if (_scrollView.mj_offsetY >= _scrollView.mj_contentH + _scrollView.mj_insetB - _scrollView.mj_h) { self.triggerByDrag = YES; [self beginRefreshing]; } } } break; case UIGestureRecognizerStateBegan: { [self resetTriggerTimes]; } break; default: break; } } - (BOOL)unlimitedTrigger { return self.leftTriggerTimes == -1; } - (void)beginRefreshing { if (self.triggerByDrag && self.leftTriggerTimes <= 0 && !self.unlimitedTrigger) { return; } [super beginRefreshing]; } - (void)setState:(MJRefreshState)state { MJRefreshCheckState if (state == MJRefreshStateRefreshing) { [self executeRefreshingCallback]; } else if (state == MJRefreshStateNoMoreData || state == MJRefreshStateIdle) { if (self.triggerByDrag) { if (!self.unlimitedTrigger) { self.leftTriggerTimes -= 1; } self.triggerByDrag = NO; } if (MJRefreshStateRefreshing == oldState) { if (self.scrollView.pagingEnabled) { CGPoint offset = self.scrollView.contentOffset; offset.y -= self.scrollView.mj_insetB; [UIView animateWithDuration:MJRefreshSlowAnimationDuration animations:^{ self.scrollView.contentOffset = offset; if (self.endRefreshingAnimationBeginAction) { self.endRefreshingAnimationBeginAction(); } } completion:^(BOOL finished) { if (self.endRefreshingCompletionBlock) { self.endRefreshingCompletionBlock(); } }]; return; } if (self.endRefreshingCompletionBlock) { self.endRefreshingCompletionBlock(); } } } } - (void)resetTriggerTimes { self.leftTriggerTimes = self.autoTriggerTimes; } - (void)setHidden:(BOOL)hidden { BOOL lastHidden = self.isHidden; [super setHidden:hidden]; if (!lastHidden && hidden) { self.state = MJRefreshStateIdle; self.scrollView.mj_insetB -= self.mj_h; } else if (lastHidden && !hidden) { self.scrollView.mj_insetB += self.mj_h; // 设置位置 self.mj_y = _scrollView.mj_contentH; } } - (void)setAutoTriggerTimes:(NSInteger)autoTriggerTimes { _autoTriggerTimes = autoTriggerTimes; self.leftTriggerTimes = autoTriggerTimes; } @end ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Base/MJRefreshBackFooter.h ================================================ // // MJRefreshBackFooter.h // MJRefreshExample // // Created by MJ Lee on 15/4/24. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "MJRefreshFooter.h" NS_ASSUME_NONNULL_BEGIN @interface MJRefreshBackFooter : MJRefreshFooter @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Base/MJRefreshBackFooter.m ================================================ // // MJRefreshBackFooter.m // MJRefreshExample // // Created by MJ Lee on 15/4/24. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "MJRefreshBackFooter.h" @interface MJRefreshBackFooter() @property (assign, nonatomic) NSInteger lastRefreshCount; @property (assign, nonatomic) CGFloat lastBottomDelta; @end @implementation MJRefreshBackFooter #pragma mark - 初始化 - (void)willMoveToSuperview:(UIView *)newSuperview { [super willMoveToSuperview:newSuperview]; [self scrollViewContentSizeDidChange:nil]; } #pragma mark - 实现父类的方法 - (void)scrollViewContentOffsetDidChange:(NSDictionary *)change { [super scrollViewContentOffsetDidChange:change]; // 如果正在刷新,直接返回 if (self.state == MJRefreshStateRefreshing) return; _scrollViewOriginalInset = self.scrollView.mj_inset; // 当前的contentOffset CGFloat currentOffsetY = self.scrollView.mj_offsetY; // 尾部控件刚好出现的offsetY CGFloat happenOffsetY = [self happenOffsetY]; // 如果是向下滚动到看不见尾部控件,直接返回 if (currentOffsetY <= happenOffsetY) return; CGFloat pullingPercent = (currentOffsetY - happenOffsetY) / self.mj_h; // 如果已全部加载,仅设置pullingPercent,然后返回 if (self.state == MJRefreshStateNoMoreData) { self.pullingPercent = pullingPercent; return; } if (self.scrollView.isDragging) { self.pullingPercent = pullingPercent; // 普通 和 即将刷新 的临界点 CGFloat normal2pullingOffsetY = happenOffsetY + self.mj_h; if (self.state == MJRefreshStateIdle && currentOffsetY > normal2pullingOffsetY) { // 转为即将刷新状态 self.state = MJRefreshStatePulling; } else if (self.state == MJRefreshStatePulling && currentOffsetY <= normal2pullingOffsetY) { // 转为普通状态 self.state = MJRefreshStateIdle; } } else if (self.state == MJRefreshStatePulling) {// 即将刷新 && 手松开 // 开始刷新 [self beginRefreshing]; } else if (pullingPercent < 1) { self.pullingPercent = pullingPercent; } } - (void)scrollViewContentSizeDidChange:(NSDictionary *)change { [super scrollViewContentSizeDidChange:change]; // 内容的高度 CGFloat contentHeight = self.scrollView.mj_contentH + self.ignoredScrollViewContentInsetBottom; // 表格的高度 CGFloat scrollHeight = self.scrollView.mj_h - self.scrollViewOriginalInset.top - self.scrollViewOriginalInset.bottom + self.ignoredScrollViewContentInsetBottom; // 设置位置和尺寸 self.mj_y = MAX(contentHeight, scrollHeight); } - (void)setState:(MJRefreshState)state { MJRefreshCheckState // 根据状态来设置属性 if (state == MJRefreshStateNoMoreData || state == MJRefreshStateIdle) { // 刷新完毕 if (MJRefreshStateRefreshing == oldState) { [UIView animateWithDuration:MJRefreshSlowAnimationDuration animations:^{ if (self.endRefreshingAnimationBeginAction) { self.endRefreshingAnimationBeginAction(); } self.scrollView.mj_insetB -= self.lastBottomDelta; // 自动调整透明度 if (self.isAutomaticallyChangeAlpha) self.alpha = 0.0; } completion:^(BOOL finished) { self.pullingPercent = 0.0; if (self.endRefreshingCompletionBlock) { self.endRefreshingCompletionBlock(); } }]; } CGFloat deltaH = [self heightForContentBreakView]; // 刚刷新完毕 if (MJRefreshStateRefreshing == oldState && deltaH > 0 && self.scrollView.mj_totalDataCount != self.lastRefreshCount) { self.scrollView.mj_offsetY = self.scrollView.mj_offsetY; } } else if (state == MJRefreshStateRefreshing) { // 记录刷新前的数量 self.lastRefreshCount = self.scrollView.mj_totalDataCount; [UIView animateWithDuration:MJRefreshFastAnimationDuration animations:^{ CGFloat bottom = self.mj_h + self.scrollViewOriginalInset.bottom; CGFloat deltaH = [self heightForContentBreakView]; if (deltaH < 0) { // 如果内容高度小于view的高度 bottom -= deltaH; } self.lastBottomDelta = bottom - self.scrollView.mj_insetB; self.scrollView.mj_insetB = bottom; self.scrollView.mj_offsetY = [self happenOffsetY] + self.mj_h; } completion:^(BOOL finished) { [self executeRefreshingCallback]; }]; } } #pragma mark - 私有方法 #pragma mark 获得scrollView的内容 超出 view 的高度 - (CGFloat)heightForContentBreakView { CGFloat h = self.scrollView.frame.size.height - self.scrollViewOriginalInset.bottom - self.scrollViewOriginalInset.top; return self.scrollView.contentSize.height - h; } #pragma mark 刚好看到上拉刷新控件时的contentOffset.y - (CGFloat)happenOffsetY { CGFloat deltaH = [self heightForContentBreakView]; if (deltaH > 0) { return deltaH - self.scrollViewOriginalInset.top; } else { return - self.scrollViewOriginalInset.top; } } @end ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Base/MJRefreshComponent.h ================================================ // 代码地址: https://github.com/CoderMJLee/MJRefresh // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 // MJRefreshComponent.h // MJRefreshExample // // Created by MJ Lee on 15/3/4. // Copyright (c) 2015年 小码哥. All rights reserved. // 刷新控件的基类 #import #import "MJRefreshConst.h" #import "UIView+MJExtension.h" #import "UIScrollView+MJExtension.h" #import "UIScrollView+MJRefresh.h" #import "NSBundle+MJRefresh.h" NS_ASSUME_NONNULL_BEGIN /** 刷新控件的状态 */ typedef NS_ENUM(NSInteger, MJRefreshState) { /** 普通闲置状态 */ MJRefreshStateIdle = 1, /** 松开就可以进行刷新的状态 */ MJRefreshStatePulling, /** 正在刷新中的状态 */ MJRefreshStateRefreshing, /** 即将刷新的状态 */ MJRefreshStateWillRefresh, /** 所有数据加载完毕,没有更多的数据了 */ MJRefreshStateNoMoreData }; /** 进入刷新状态的回调 */ typedef void (^MJRefreshComponentRefreshingBlock)(void) MJRefreshDeprecated("first deprecated in 3.3.0 - Use `MJRefreshComponentAction` instead"); /** 开始刷新后的回调(进入刷新状态后的回调) */ typedef void (^MJRefreshComponentBeginRefreshingCompletionBlock)(void) MJRefreshDeprecated("first deprecated in 3.3.0 - Use `MJRefreshComponentAction` instead"); /** 结束刷新后的回调 */ typedef void (^MJRefreshComponentEndRefreshingCompletionBlock)(void) MJRefreshDeprecated("first deprecated in 3.3.0 - Use `MJRefreshComponentAction` instead"); /** 刷新用到的回调类型 */ typedef void (^MJRefreshComponentAction)(void); /** 刷新控件的基类 */ @interface MJRefreshComponent : UIView { /** 记录scrollView刚开始的inset */ UIEdgeInsets _scrollViewOriginalInset; /** 父控件 */ __weak UIScrollView *_scrollView; } #pragma mark - 刷新回调 /** 正在刷新的回调 */ @property (copy, nonatomic, nullable) MJRefreshComponentAction refreshingBlock; /** 设置回调对象和回调方法 */ - (void)setRefreshingTarget:(id)target refreshingAction:(SEL)action; /** 回调对象 */ @property (weak, nonatomic) id refreshingTarget; /** 回调方法 */ @property (assign, nonatomic) SEL refreshingAction; /** 触发回调(交给子类去调用) */ - (void)executeRefreshingCallback; #pragma mark - 刷新状态控制 /** 进入刷新状态 */ - (void)beginRefreshing; - (void)beginRefreshingWithCompletionBlock:(void (^)(void))completionBlock; /** 开始刷新后的回调(进入刷新状态后的回调) */ @property (copy, nonatomic, nullable) MJRefreshComponentAction beginRefreshingCompletionBlock; /** 带动画的结束刷新的回调 */ @property (copy, nonatomic, nullable) MJRefreshComponentAction endRefreshingAnimateCompletionBlock MJRefreshDeprecated("first deprecated in 3.3.0 - Use `endRefreshingAnimationBeginAction` instead"); @property (copy, nonatomic, nullable) MJRefreshComponentAction endRefreshingAnimationBeginAction; /** 结束刷新的回调 */ @property (copy, nonatomic, nullable) MJRefreshComponentAction endRefreshingCompletionBlock; /** 结束刷新状态 */ - (void)endRefreshing; - (void)endRefreshingWithCompletionBlock:(void (^)(void))completionBlock; /** 是否正在刷新 */ @property (assign, nonatomic, readonly, getter=isRefreshing) BOOL refreshing; /** 刷新状态 一般交给子类内部实现 */ @property (assign, nonatomic) MJRefreshState state; #pragma mark - 交给子类去访问 /** 记录scrollView刚开始的inset */ @property (assign, nonatomic, readonly) UIEdgeInsets scrollViewOriginalInset; /** 父控件 */ @property (weak, nonatomic, readonly) UIScrollView *scrollView; #pragma mark - 交给子类们去实现 /** 初始化 */ - (void)prepare NS_REQUIRES_SUPER; /** 摆放子控件frame */ - (void)placeSubviews NS_REQUIRES_SUPER; /** 当scrollView的contentOffset发生改变的时候调用 */ - (void)scrollViewContentOffsetDidChange:(nullable NSDictionary *)change NS_REQUIRES_SUPER; /** 当scrollView的contentSize发生改变的时候调用 */ - (void)scrollViewContentSizeDidChange:(nullable NSDictionary *)change NS_REQUIRES_SUPER; /** 当scrollView的拖拽状态发生改变的时候调用 */ - (void)scrollViewPanStateDidChange:(nullable NSDictionary *)change NS_REQUIRES_SUPER; #pragma mark - 其他 /** 拉拽的百分比(交给子类重写) */ @property (assign, nonatomic) CGFloat pullingPercent; /** 根据拖拽比例自动切换透明度 */ @property (assign, nonatomic, getter=isAutoChangeAlpha) BOOL autoChangeAlpha MJRefreshDeprecated("请使用automaticallyChangeAlpha属性"); /** 根据拖拽比例自动切换透明度 */ @property (assign, nonatomic, getter=isAutomaticallyChangeAlpha) BOOL automaticallyChangeAlpha; @end @interface UILabel(MJRefresh) + (instancetype)mj_label; - (CGFloat)mj_textWidth; @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Base/MJRefreshComponent.m ================================================ // 代码地址: https://github.com/CoderMJLee/MJRefresh // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 // MJRefreshComponent.m // MJRefreshExample // // Created by MJ Lee on 15/3/4. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "MJRefreshComponent.h" #import "MJRefreshConst.h" @interface MJRefreshComponent() @property (strong, nonatomic) UIPanGestureRecognizer *pan; @end @implementation MJRefreshComponent #pragma mark - 初始化 - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { // 准备工作 [self prepare]; // 默认是普通状态 self.state = MJRefreshStateIdle; } return self; } - (void)prepare { // 基本属性 self.autoresizingMask = UIViewAutoresizingFlexibleWidth; self.backgroundColor = [UIColor clearColor]; } - (void)layoutSubviews { [self placeSubviews]; [super layoutSubviews]; } - (void)placeSubviews{} - (void)willMoveToSuperview:(UIView *)newSuperview { [super willMoveToSuperview:newSuperview]; // 如果不是UIScrollView,不做任何事情 if (newSuperview && ![newSuperview isKindOfClass:[UIScrollView class]]) return; // 旧的父控件移除监听 [self removeObservers]; if (newSuperview) { // 新的父控件 // 记录UIScrollView _scrollView = (UIScrollView *)newSuperview; // 设置宽度 self.mj_w = _scrollView.mj_w; // 设置位置 self.mj_x = -_scrollView.mj_insetL; // 设置永远支持垂直弹簧效果 _scrollView.alwaysBounceVertical = YES; // 记录UIScrollView最开始的contentInset _scrollViewOriginalInset = _scrollView.mj_inset; // 添加监听 [self addObservers]; } } - (void)drawRect:(CGRect)rect { [super drawRect:rect]; if (self.state == MJRefreshStateWillRefresh) { // 预防view还没显示出来就调用了beginRefreshing self.state = MJRefreshStateRefreshing; } } #pragma mark - KVO监听 - (void)addObservers { NSKeyValueObservingOptions options = NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld; [self.scrollView addObserver:self forKeyPath:MJRefreshKeyPathContentOffset options:options context:nil]; [self.scrollView addObserver:self forKeyPath:MJRefreshKeyPathContentSize options:options context:nil]; self.pan = self.scrollView.panGestureRecognizer; [self.pan addObserver:self forKeyPath:MJRefreshKeyPathPanState options:options context:nil]; } - (void)removeObservers { [self.superview removeObserver:self forKeyPath:MJRefreshKeyPathContentOffset]; [self.superview removeObserver:self forKeyPath:MJRefreshKeyPathContentSize]; [self.pan removeObserver:self forKeyPath:MJRefreshKeyPathPanState]; self.pan = nil; } - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { // 遇到这些情况就直接返回 if (!self.userInteractionEnabled) return; // 这个就算看不见也需要处理 if ([keyPath isEqualToString:MJRefreshKeyPathContentSize]) { [self scrollViewContentSizeDidChange:change]; } // 看不见 if (self.hidden) return; if ([keyPath isEqualToString:MJRefreshKeyPathContentOffset]) { [self scrollViewContentOffsetDidChange:change]; } else if ([keyPath isEqualToString:MJRefreshKeyPathPanState]) { [self scrollViewPanStateDidChange:change]; } } - (void)scrollViewContentOffsetDidChange:(NSDictionary *)change{} - (void)scrollViewContentSizeDidChange:(NSDictionary *)change{} - (void)scrollViewPanStateDidChange:(NSDictionary *)change{} #pragma mark - 公共方法 #pragma mark 设置回调对象和回调方法 - (void)setRefreshingTarget:(id)target refreshingAction:(SEL)action { self.refreshingTarget = target; self.refreshingAction = action; } - (void)setState:(MJRefreshState)state { _state = state; // 加入主队列的目的是等setState:方法调用完毕、设置完文字后再去布局子控件 MJRefreshDispatchAsyncOnMainQueue([self setNeedsLayout];) } #pragma mark 进入刷新状态 - (void)beginRefreshing { [UIView animateWithDuration:MJRefreshFastAnimationDuration animations:^{ self.alpha = 1.0; }]; self.pullingPercent = 1.0; // 只要正在刷新,就完全显示 if (self.window) { self.state = MJRefreshStateRefreshing; } else { // 预防正在刷新中时,调用本方法使得header inset回置失败 if (self.state != MJRefreshStateRefreshing) { self.state = MJRefreshStateWillRefresh; // 刷新(预防从另一个控制器回到这个控制器的情况,回来要重新刷新一下) [self setNeedsDisplay]; } } } - (void)beginRefreshingWithCompletionBlock:(void (^)(void))completionBlock { self.beginRefreshingCompletionBlock = completionBlock; [self beginRefreshing]; } #pragma mark 结束刷新状态 - (void)endRefreshing { MJRefreshDispatchAsyncOnMainQueue(self.state = MJRefreshStateIdle;) } - (void)endRefreshingWithCompletionBlock:(void (^)(void))completionBlock { self.endRefreshingCompletionBlock = completionBlock; [self endRefreshing]; } #pragma mark 是否正在刷新 - (BOOL)isRefreshing { return self.state == MJRefreshStateRefreshing || self.state == MJRefreshStateWillRefresh; } #pragma mark 自动切换透明度 - (void)setAutoChangeAlpha:(BOOL)autoChangeAlpha { self.automaticallyChangeAlpha = autoChangeAlpha; } - (BOOL)isAutoChangeAlpha { return self.isAutomaticallyChangeAlpha; } - (void)setAutomaticallyChangeAlpha:(BOOL)automaticallyChangeAlpha { _automaticallyChangeAlpha = automaticallyChangeAlpha; if (self.isRefreshing) return; if (automaticallyChangeAlpha) { self.alpha = self.pullingPercent; } else { self.alpha = 1.0; } } #pragma mark 根据拖拽进度设置透明度 - (void)setPullingPercent:(CGFloat)pullingPercent { _pullingPercent = pullingPercent; if (self.isRefreshing) return; if (self.isAutomaticallyChangeAlpha) { self.alpha = pullingPercent; } } #pragma mark - 内部方法 - (void)executeRefreshingCallback { MJRefreshDispatchAsyncOnMainQueue({ if (self.refreshingBlock) { self.refreshingBlock(); } if ([self.refreshingTarget respondsToSelector:self.refreshingAction]) { MJRefreshMsgSend(MJRefreshMsgTarget(self.refreshingTarget), self.refreshingAction, self); } if (self.beginRefreshingCompletionBlock) { self.beginRefreshingCompletionBlock(); } }) } #pragma mark - <<< Deprecation compatible function >>> - - (void)setEndRefreshingAnimateCompletionBlock:(MJRefreshComponentEndRefreshingCompletionBlock)endRefreshingAnimateCompletionBlock { _endRefreshingAnimationBeginAction = endRefreshingAnimateCompletionBlock; } @end @implementation UILabel(MJRefresh) + (instancetype)mj_label { UILabel *label = [[self alloc] init]; label.font = MJRefreshLabelFont; label.textColor = MJRefreshLabelTextColor; label.autoresizingMask = UIViewAutoresizingFlexibleWidth; label.textAlignment = NSTextAlignmentCenter; label.backgroundColor = [UIColor clearColor]; return label; } - (CGFloat)mj_textWidth { CGFloat stringWidth = 0; CGSize size = CGSizeMake(MAXFLOAT, MAXFLOAT); if (self.attributedText) { if (self.attributedText.length == 0) { return 0; } stringWidth = [self.attributedText boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin context:nil].size.width; } else { if (self.text.length == 0) { return 0; } NSAssert(self.font != nil, @"请检查 mj_label's `font` 是否设置正确"); stringWidth = [self.text boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:self.font} context:nil].size.width; } return stringWidth; } @end ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Base/MJRefreshFooter.h ================================================ // 代码地址: https://github.com/CoderMJLee/MJRefresh // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 // MJRefreshFooter.h // MJRefreshExample // // Created by MJ Lee on 15/3/5. // Copyright (c) 2015年 小码哥. All rights reserved. // 上拉刷新控件 #import "MJRefreshComponent.h" NS_ASSUME_NONNULL_BEGIN @interface MJRefreshFooter : MJRefreshComponent /** 创建footer */ + (instancetype)footerWithRefreshingBlock:(MJRefreshComponentAction)refreshingBlock; /** 创建footer */ + (instancetype)footerWithRefreshingTarget:(id)target refreshingAction:(SEL)action; /** 提示没有更多的数据 */ - (void)endRefreshingWithNoMoreData; - (void)noticeNoMoreData MJRefreshDeprecated("使用endRefreshingWithNoMoreData"); /** 重置没有更多的数据(消除没有更多数据的状态) */ - (void)resetNoMoreData; /** 忽略多少scrollView的contentInset的bottom */ @property (assign, nonatomic) CGFloat ignoredScrollViewContentInsetBottom; /** 自动根据有无数据来显示和隐藏(有数据就显示,没有数据隐藏。默认是NO) */ @property (assign, nonatomic, getter=isAutomaticallyHidden) BOOL automaticallyHidden MJRefreshDeprecated("已废弃此属性,开发者请自行控制footer的显示和隐藏"); @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Base/MJRefreshFooter.m ================================================ // 代码地址: https://github.com/CoderMJLee/MJRefresh // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 // MJRefreshFooter.m // MJRefreshExample // // Created by MJ Lee on 15/3/5. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "MJRefreshFooter.h" #include "UIScrollView+MJRefresh.h" @interface MJRefreshFooter() @end @implementation MJRefreshFooter #pragma mark - 构造方法 + (instancetype)footerWithRefreshingBlock:(MJRefreshComponentAction)refreshingBlock { MJRefreshFooter *cmp = [[self alloc] init]; cmp.refreshingBlock = refreshingBlock; return cmp; } + (instancetype)footerWithRefreshingTarget:(id)target refreshingAction:(SEL)action { MJRefreshFooter *cmp = [[self alloc] init]; [cmp setRefreshingTarget:target refreshingAction:action]; return cmp; } #pragma mark - 重写父类的方法 - (void)prepare { [super prepare]; // 设置自己的高度 self.mj_h = MJRefreshFooterHeight; // 默认不会自动隐藏 // self.automaticallyHidden = NO; } #pragma mark - 公共方法 - (void)endRefreshingWithNoMoreData { MJRefreshDispatchAsyncOnMainQueue(self.state = MJRefreshStateNoMoreData;) } - (void)noticeNoMoreData { [self endRefreshingWithNoMoreData]; } - (void)resetNoMoreData { MJRefreshDispatchAsyncOnMainQueue(self.state = MJRefreshStateIdle;) } - (void)setAutomaticallyHidden:(BOOL)automaticallyHidden { _automaticallyHidden = automaticallyHidden; } @end ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Base/MJRefreshHeader.h ================================================ // 代码地址: https://github.com/CoderMJLee/MJRefresh // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 // MJRefreshHeader.h // MJRefreshExample // // Created by MJ Lee on 15/3/4. // Copyright (c) 2015年 小码哥. All rights reserved. // 下拉刷新控件:负责监控用户下拉的状态 #import "MJRefreshComponent.h" NS_ASSUME_NONNULL_BEGIN @interface MJRefreshHeader : MJRefreshComponent /** 创建header */ + (instancetype)headerWithRefreshingBlock:(MJRefreshComponentAction)refreshingBlock; /** 创建header */ + (instancetype)headerWithRefreshingTarget:(id)target refreshingAction:(SEL)action; /** 这个key用来存储上一次下拉刷新成功的时间 */ @property (copy, nonatomic) NSString *lastUpdatedTimeKey; /** 上一次下拉刷新成功的时间 */ @property (strong, nonatomic, readonly, nullable) NSDate *lastUpdatedTime; /** 忽略多少scrollView的contentInset的top */ @property (assign, nonatomic) CGFloat ignoredScrollViewContentInsetTop; /** 默认是关闭状态, 如果遇到 CollectionView 的动画异常问题可以尝试打开 */ @property (nonatomic) BOOL isCollectionViewAnimationBug; @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Base/MJRefreshHeader.m ================================================ // 代码地址: https://github.com/CoderMJLee/MJRefresh // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 // MJRefreshHeader.m // MJRefreshExample // // Created by MJ Lee on 15/3/4. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "MJRefreshHeader.h" NSString * const MJRefreshHeaderRefreshing2IdleBoundsKey = @"MJRefreshHeaderRefreshing2IdleBounds"; NSString * const MJRefreshHeaderRefreshingBoundsKey = @"MJRefreshHeaderRefreshingBounds"; @interface MJRefreshHeader() @property (assign, nonatomic) CGFloat insetTDelta; @end @implementation MJRefreshHeader #pragma mark - 构造方法 + (instancetype)headerWithRefreshingBlock:(MJRefreshComponentAction)refreshingBlock { MJRefreshHeader *cmp = [[self alloc] init]; cmp.refreshingBlock = refreshingBlock; return cmp; } + (instancetype)headerWithRefreshingTarget:(id)target refreshingAction:(SEL)action { MJRefreshHeader *cmp = [[self alloc] init]; [cmp setRefreshingTarget:target refreshingAction:action]; return cmp; } #pragma mark - 覆盖父类的方法 - (void)prepare { [super prepare]; // 设置key self.lastUpdatedTimeKey = MJRefreshHeaderLastUpdatedTimeKey; // 设置高度 self.mj_h = MJRefreshHeaderHeight; } - (void)placeSubviews { [super placeSubviews]; // 设置y值(当自己的高度发生改变了,肯定要重新调整Y值,所以放到placeSubviews方法中设置y值) self.mj_y = - self.mj_h - self.ignoredScrollViewContentInsetTop; } - (void)resetInset { if (@available(iOS 11.0, *)) { } else { // 如果 iOS 10 及以下系统在刷新时, push 新的 VC, 等待刷新完成后回来, 会导致顶部 Insets.top 异常, 不能 resetInset, 检查一下这种特殊情况 if (!self.window) { return; } } // sectionheader停留解决 CGFloat insetT = - self.scrollView.mj_offsetY > _scrollViewOriginalInset.top ? - self.scrollView.mj_offsetY : _scrollViewOriginalInset.top; insetT = insetT > self.mj_h + _scrollViewOriginalInset.top ? self.mj_h + _scrollViewOriginalInset.top : insetT; self.insetTDelta = _scrollViewOriginalInset.top - insetT; // 避免 CollectionView 在使用根据 Autolayout 和 内容自动伸缩 Cell, 刷新时导致的 Layout 异常渲染问题 if (self.scrollView.mj_insetT != insetT) { self.scrollView.mj_insetT = insetT; } } - (void)scrollViewContentOffsetDidChange:(NSDictionary *)change { [super scrollViewContentOffsetDidChange:change]; // 在刷新的refreshing状态 if (self.state == MJRefreshStateRefreshing) { [self resetInset]; return; } // 跳转到下一个控制器时,contentInset可能会变 _scrollViewOriginalInset = self.scrollView.mj_inset; // 当前的contentOffset CGFloat offsetY = self.scrollView.mj_offsetY; // 头部控件刚好出现的offsetY CGFloat happenOffsetY = - self.scrollViewOriginalInset.top; // 如果是向上滚动到看不见头部控件,直接返回 // >= -> > if (offsetY > happenOffsetY) return; // 普通 和 即将刷新 的临界点 CGFloat normal2pullingOffsetY = happenOffsetY - self.mj_h; CGFloat pullingPercent = (happenOffsetY - offsetY) / self.mj_h; if (self.scrollView.isDragging) { // 如果正在拖拽 self.pullingPercent = pullingPercent; if (self.state == MJRefreshStateIdle && offsetY < normal2pullingOffsetY) { // 转为即将刷新状态 self.state = MJRefreshStatePulling; } else if (self.state == MJRefreshStatePulling && offsetY >= normal2pullingOffsetY) { // 转为普通状态 self.state = MJRefreshStateIdle; } } else if (self.state == MJRefreshStatePulling) {// 即将刷新 && 手松开 // 开始刷新 [self beginRefreshing]; } else if (pullingPercent < 1) { self.pullingPercent = pullingPercent; } } - (void)setState:(MJRefreshState)state { MJRefreshCheckState // 根据状态做事情 if (state == MJRefreshStateIdle) { if (oldState != MJRefreshStateRefreshing) return; [self headerEndingAction]; } else if (state == MJRefreshStateRefreshing) { [self headerRefreshingAction]; } } - (void)headerEndingAction { // 保存刷新时间 [[NSUserDefaults standardUserDefaults] setObject:[NSDate date] forKey:self.lastUpdatedTimeKey]; [[NSUserDefaults standardUserDefaults] synchronize]; // 默认使用 UIViewAnimation 动画 if (!self.isCollectionViewAnimationBug) { // 恢复inset和offset [UIView animateWithDuration:MJRefreshSlowAnimationDuration animations:^{ self.scrollView.mj_insetT += self.insetTDelta; if (self.endRefreshingAnimationBeginAction) { self.endRefreshingAnimationBeginAction(); } // 自动调整透明度 if (self.isAutomaticallyChangeAlpha) self.alpha = 0.0; } completion:^(BOOL finished) { self.pullingPercent = 0.0; if (self.endRefreshingCompletionBlock) { self.endRefreshingCompletionBlock(); } }]; return; } /** 这个解决方法的思路出自 https://github.com/CoderMJLee/MJRefresh/pull/844 修改了用+ [UIView animateWithDuration: animations:]实现的修改contentInset的动画 fix issue#225 https://github.com/CoderMJLee/MJRefresh/issues/225 另一种解法 pull#737 https://github.com/CoderMJLee/MJRefresh/pull/737 同时, 处理了 Refreshing 中的动画替换. */ // 由于修改 Inset 会导致 self.pullingPercent 联动设置 self.alpha, 故提前获取 alpha 值, 后续用于还原 alpha 动画 CGFloat viewAlpha = self.alpha; self.scrollView.mj_insetT += self.insetTDelta; // 禁用交互, 如果不禁用可能会引起渲染问题. self.scrollView.userInteractionEnabled = NO; //CAAnimation keyPath 不支持 contentInset 用Bounds的动画代替 CABasicAnimation *boundsAnimation = [CABasicAnimation animationWithKeyPath:@"bounds"]; boundsAnimation.fromValue = [NSValue valueWithCGRect:CGRectOffset(self.scrollView.bounds, 0, self.insetTDelta)]; boundsAnimation.duration = MJRefreshSlowAnimationDuration; //在delegate里移除 boundsAnimation.removedOnCompletion = NO; boundsAnimation.fillMode = kCAFillModeBoth; boundsAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; boundsAnimation.delegate = self; [boundsAnimation setValue:MJRefreshHeaderRefreshing2IdleBoundsKey forKey:@"identity"]; [self.scrollView.layer addAnimation:boundsAnimation forKey:MJRefreshHeaderRefreshing2IdleBoundsKey]; if (self.endRefreshingAnimationBeginAction) { self.endRefreshingAnimationBeginAction(); } // 自动调整透明度的动画 if (self.isAutomaticallyChangeAlpha) { CABasicAnimation *opacityAnimation = [CABasicAnimation animationWithKeyPath:@"opacity"]; opacityAnimation.fromValue = @(viewAlpha); opacityAnimation.toValue = @(0.0); opacityAnimation.duration = MJRefreshSlowAnimationDuration; opacityAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; [self.layer addAnimation:opacityAnimation forKey:@"MJRefreshHeaderRefreshing2IdleOpacity"]; // 由于修改了 inset 导致, pullingPercent 被设置值, alpha 已经被提前修改为 0 了. 所以这里不用置 0, 但为了代码的严谨性, 不依赖其他的特殊实现方式, 这里还是置 0. self.alpha = 0; } } - (void)headerRefreshingAction { // 默认使用 UIViewAnimation 动画 if (!self.isCollectionViewAnimationBug) { MJRefreshDispatchAsyncOnMainQueue({ [UIView animateWithDuration:MJRefreshFastAnimationDuration animations:^{ if (self.scrollView.panGestureRecognizer.state != UIGestureRecognizerStateCancelled) { CGFloat top = self.scrollViewOriginalInset.top + self.mj_h; // 增加滚动区域top self.scrollView.mj_insetT = top; // 设置滚动位置 CGPoint offset = self.scrollView.contentOffset; offset.y = -top; [self.scrollView setContentOffset:offset animated:NO]; } } completion:^(BOOL finished) { [self executeRefreshingCallback]; }]; }) return; } if (self.scrollView.panGestureRecognizer.state != UIGestureRecognizerStateCancelled) { CGFloat top = self.scrollViewOriginalInset.top + self.mj_h; // 禁用交互, 如果不禁用可能会引起渲染问题. self.scrollView.userInteractionEnabled = NO; // CAAnimation keyPath不支持 contentOffset 用Bounds的动画代替 CABasicAnimation *boundsAnimation = [CABasicAnimation animationWithKeyPath:@"bounds"]; CGRect bounds = self.scrollView.bounds; bounds.origin.y = -top; boundsAnimation.fromValue = [NSValue valueWithCGRect:self.scrollView.bounds]; boundsAnimation.toValue = [NSValue valueWithCGRect:bounds]; boundsAnimation.duration = MJRefreshFastAnimationDuration; //在delegate里移除 boundsAnimation.removedOnCompletion = NO; boundsAnimation.fillMode = kCAFillModeBoth; boundsAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; boundsAnimation.delegate = self; [boundsAnimation setValue:MJRefreshHeaderRefreshingBoundsKey forKey:@"identity"]; [self.scrollView.layer addAnimation:boundsAnimation forKey:MJRefreshHeaderRefreshingBoundsKey]; } else { [self executeRefreshingCallback]; } } #pragma mark - CAAnimationDelegate - (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag { NSString *identity = [anim valueForKey:@"identity"]; if ([identity isEqualToString:MJRefreshHeaderRefreshing2IdleBoundsKey]) { self.pullingPercent = 0.0; self.scrollView.userInteractionEnabled = YES; if (self.endRefreshingCompletionBlock) { self.endRefreshingCompletionBlock(); } } else if ([identity isEqualToString:MJRefreshHeaderRefreshingBoundsKey]) { // 避免出现 end 先于 Refreshing 状态 if (self.state != MJRefreshStateIdle) { CGFloat top = self.scrollViewOriginalInset.top + self.mj_h; self.scrollView.mj_insetT = top; // 设置最终滚动位置 CGPoint offset = self.scrollView.contentOffset; offset.y = -top; [self.scrollView setContentOffset:offset animated:NO]; } self.scrollView.userInteractionEnabled = YES; [self executeRefreshingCallback]; } if ([self.scrollView.layer animationForKey:MJRefreshHeaderRefreshing2IdleBoundsKey]) { [self.scrollView.layer removeAnimationForKey:MJRefreshHeaderRefreshing2IdleBoundsKey]; } if ([self.scrollView.layer animationForKey:MJRefreshHeaderRefreshingBoundsKey]) { [self.scrollView.layer removeAnimationForKey:MJRefreshHeaderRefreshingBoundsKey]; } } #pragma mark - 公共方法 - (NSDate *)lastUpdatedTime { return [[NSUserDefaults standardUserDefaults] objectForKey:self.lastUpdatedTimeKey]; } - (void)setIgnoredScrollViewContentInsetTop:(CGFloat)ignoredScrollViewContentInsetTop { _ignoredScrollViewContentInsetTop = ignoredScrollViewContentInsetTop; self.mj_y = - self.mj_h - _ignoredScrollViewContentInsetTop; } @end ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoGifFooter.h ================================================ // // MJRefreshAutoGifFooter.h // MJRefreshExample // // Created by MJ Lee on 15/4/24. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "MJRefreshAutoStateFooter.h" NS_ASSUME_NONNULL_BEGIN @interface MJRefreshAutoGifFooter : MJRefreshAutoStateFooter @property (weak, nonatomic, readonly) UIImageView *gifView; /** 设置state状态下的动画图片images 动画持续时间duration*/ - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state; - (void)setImages:(NSArray *)images forState:(MJRefreshState)state; @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoGifFooter.m ================================================ // // MJRefreshAutoGifFooter.m // MJRefreshExample // // Created by MJ Lee on 15/4/24. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "MJRefreshAutoGifFooter.h" @interface MJRefreshAutoGifFooter() { __unsafe_unretained UIImageView *_gifView; } /** 所有状态对应的动画图片 */ @property (strong, nonatomic) NSMutableDictionary *stateImages; /** 所有状态对应的动画时间 */ @property (strong, nonatomic) NSMutableDictionary *stateDurations; @end @implementation MJRefreshAutoGifFooter #pragma mark - 懒加载 - (UIImageView *)gifView { if (!_gifView) { UIImageView *gifView = [[UIImageView alloc] init]; [self addSubview:_gifView = gifView]; } return _gifView; } - (NSMutableDictionary *)stateImages { if (!_stateImages) { self.stateImages = [NSMutableDictionary dictionary]; } return _stateImages; } - (NSMutableDictionary *)stateDurations { if (!_stateDurations) { self.stateDurations = [NSMutableDictionary dictionary]; } return _stateDurations; } #pragma mark - 公共方法 - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state { if (images == nil) return; self.stateImages[@(state)] = images; self.stateDurations[@(state)] = @(duration); /* 根据图片设置控件的高度 */ UIImage *image = [images firstObject]; if (image.size.height > self.mj_h) { self.mj_h = image.size.height; } } - (void)setImages:(NSArray *)images forState:(MJRefreshState)state { [self setImages:images duration:images.count * 0.1 forState:state]; } #pragma mark - 实现父类的方法 - (void)prepare { [super prepare]; // 初始化间距 self.labelLeftInset = 20; } - (void)placeSubviews { [super placeSubviews]; if (self.gifView.constraints.count) return; self.gifView.frame = self.bounds; if (self.isRefreshingTitleHidden) { self.gifView.contentMode = UIViewContentModeCenter; } else { self.gifView.contentMode = UIViewContentModeRight; self.gifView.mj_w = self.mj_w * 0.5 - self.labelLeftInset - self.stateLabel.mj_textWidth * 0.5; } } - (void)setState:(MJRefreshState)state { MJRefreshCheckState // 根据状态做事情 if (state == MJRefreshStateRefreshing) { NSArray *images = self.stateImages[@(state)]; if (images.count == 0) return; [self.gifView stopAnimating]; self.gifView.hidden = NO; if (images.count == 1) { // 单张图片 self.gifView.image = [images lastObject]; } else { // 多张图片 self.gifView.animationImages = images; self.gifView.animationDuration = [self.stateDurations[@(state)] doubleValue]; [self.gifView startAnimating]; } } else if (state == MJRefreshStateNoMoreData || state == MJRefreshStateIdle) { [self.gifView stopAnimating]; self.gifView.hidden = YES; } } @end ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.h ================================================ // // MJRefreshAutoNormalFooter.h // MJRefreshExample // // Created by MJ Lee on 15/4/24. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "MJRefreshAutoStateFooter.h" NS_ASSUME_NONNULL_BEGIN @interface MJRefreshAutoNormalFooter : MJRefreshAutoStateFooter @property (weak, nonatomic, readonly) UIActivityIndicatorView *loadingView; /** 菊花的样式 */ @property (assign, nonatomic) UIActivityIndicatorViewStyle activityIndicatorViewStyle MJRefreshDeprecated("first deprecated in 3.2.2 - Use `loadingView` property"); @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.m ================================================ // // MJRefreshAutoNormalFooter.m // MJRefreshExample // // Created by MJ Lee on 15/4/24. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "MJRefreshAutoNormalFooter.h" @interface MJRefreshAutoNormalFooter() @property (weak, nonatomic) UIActivityIndicatorView *loadingView; @end @implementation MJRefreshAutoNormalFooter #pragma mark - 懒加载子控件 - (UIActivityIndicatorView *)loadingView { if (!_loadingView) { UIActivityIndicatorView *loadingView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:_activityIndicatorViewStyle]; loadingView.hidesWhenStopped = YES; [self addSubview:_loadingView = loadingView]; } return _loadingView; } - (void)setActivityIndicatorViewStyle:(UIActivityIndicatorViewStyle)activityIndicatorViewStyle { _activityIndicatorViewStyle = activityIndicatorViewStyle; [self.loadingView removeFromSuperview]; self.loadingView = nil; [self setNeedsLayout]; } #pragma mark - 重写父类的方法 - (void)prepare { [super prepare]; #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 if (@available(iOS 13.0, *)) { _activityIndicatorViewStyle = UIActivityIndicatorViewStyleMedium; return; } #endif _activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray; } - (void)placeSubviews { [super placeSubviews]; if (self.loadingView.constraints.count) return; // 圈圈 CGFloat loadingCenterX = self.mj_w * 0.5; if (!self.isRefreshingTitleHidden) { loadingCenterX -= self.stateLabel.mj_textWidth * 0.5 + self.labelLeftInset; } CGFloat loadingCenterY = self.mj_h * 0.5; self.loadingView.center = CGPointMake(loadingCenterX, loadingCenterY); } - (void)setState:(MJRefreshState)state { MJRefreshCheckState // 根据状态做事情 if (state == MJRefreshStateNoMoreData || state == MJRefreshStateIdle) { [self.loadingView stopAnimating]; } else if (state == MJRefreshStateRefreshing) { [self.loadingView startAnimating]; } } @end ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoStateFooter.h ================================================ // // MJRefreshAutoStateFooter.h // MJRefreshExample // // Created by MJ Lee on 15/6/13. // Copyright © 2015年 小码哥. All rights reserved. // #import "MJRefreshAutoFooter.h" NS_ASSUME_NONNULL_BEGIN @interface MJRefreshAutoStateFooter : MJRefreshAutoFooter /** 文字距离圈圈、箭头的距离 */ @property (assign, nonatomic) CGFloat labelLeftInset; /** 显示刷新状态的label */ @property (weak, nonatomic, readonly) UILabel *stateLabel; /** 设置state状态下的文字 */ - (void)setTitle:(NSString *)title forState:(MJRefreshState)state; /** 隐藏刷新状态的文字 */ @property (assign, nonatomic, getter=isRefreshingTitleHidden) BOOL refreshingTitleHidden; @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoStateFooter.m ================================================ // // MJRefreshAutoStateFooter.m // MJRefreshExample // // Created by MJ Lee on 15/6/13. // Copyright © 2015年 小码哥. All rights reserved. // #import "MJRefreshAutoStateFooter.h" @interface MJRefreshAutoStateFooter() { /** 显示刷新状态的label */ __unsafe_unretained UILabel *_stateLabel; } /** 所有状态对应的文字 */ @property (strong, nonatomic) NSMutableDictionary *stateTitles; @end @implementation MJRefreshAutoStateFooter #pragma mark - 懒加载 - (NSMutableDictionary *)stateTitles { if (!_stateTitles) { self.stateTitles = [NSMutableDictionary dictionary]; } return _stateTitles; } - (UILabel *)stateLabel { if (!_stateLabel) { [self addSubview:_stateLabel = [UILabel mj_label]]; } return _stateLabel; } #pragma mark - 公共方法 - (void)setTitle:(NSString *)title forState:(MJRefreshState)state { if (title == nil) return; self.stateTitles[@(state)] = title; self.stateLabel.text = self.stateTitles[@(self.state)]; } #pragma mark - 私有方法 - (void)stateLabelClick { if (self.state == MJRefreshStateIdle) { [self beginRefreshing]; } } #pragma mark - 重写父类的方法 - (void)prepare { [super prepare]; // 初始化间距 self.labelLeftInset = MJRefreshLabelLeftInset; // 初始化文字 [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshAutoFooterIdleText] forState:MJRefreshStateIdle]; [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshAutoFooterRefreshingText] forState:MJRefreshStateRefreshing]; [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshAutoFooterNoMoreDataText] forState:MJRefreshStateNoMoreData]; // 监听label self.stateLabel.userInteractionEnabled = YES; [self.stateLabel addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(stateLabelClick)]]; } - (void)placeSubviews { [super placeSubviews]; if (self.stateLabel.constraints.count) return; // 状态标签 self.stateLabel.frame = self.bounds; } - (void)setState:(MJRefreshState)state { MJRefreshCheckState if (self.isRefreshingTitleHidden && state == MJRefreshStateRefreshing) { self.stateLabel.text = nil; } else { self.stateLabel.text = self.stateTitles[@(state)]; } } @end ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackGifFooter.h ================================================ // // MJRefreshBackGifFooter.h // MJRefreshExample // // Created by MJ Lee on 15/4/24. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "MJRefreshBackStateFooter.h" NS_ASSUME_NONNULL_BEGIN @interface MJRefreshBackGifFooter : MJRefreshBackStateFooter @property (weak, nonatomic, readonly) UIImageView *gifView; /** 设置state状态下的动画图片images 动画持续时间duration*/ - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state; - (void)setImages:(NSArray *)images forState:(MJRefreshState)state; @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackGifFooter.m ================================================ // // MJRefreshBackGifFooter.m // MJRefreshExample // // Created by MJ Lee on 15/4/24. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "MJRefreshBackGifFooter.h" @interface MJRefreshBackGifFooter() { __unsafe_unretained UIImageView *_gifView; } /** 所有状态对应的动画图片 */ @property (strong, nonatomic) NSMutableDictionary *stateImages; /** 所有状态对应的动画时间 */ @property (strong, nonatomic) NSMutableDictionary *stateDurations; @end @implementation MJRefreshBackGifFooter #pragma mark - 懒加载 - (UIImageView *)gifView { if (!_gifView) { UIImageView *gifView = [[UIImageView alloc] init]; [self addSubview:_gifView = gifView]; } return _gifView; } - (NSMutableDictionary *)stateImages { if (!_stateImages) { self.stateImages = [NSMutableDictionary dictionary]; } return _stateImages; } - (NSMutableDictionary *)stateDurations { if (!_stateDurations) { self.stateDurations = [NSMutableDictionary dictionary]; } return _stateDurations; } #pragma mark - 公共方法 - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state { if (images == nil) return; self.stateImages[@(state)] = images; self.stateDurations[@(state)] = @(duration); /* 根据图片设置控件的高度 */ UIImage *image = [images firstObject]; if (image.size.height > self.mj_h) { self.mj_h = image.size.height; } } - (void)setImages:(NSArray *)images forState:(MJRefreshState)state { [self setImages:images duration:images.count * 0.1 forState:state]; } #pragma mark - 实现父类的方法 - (void)prepare { [super prepare]; // 初始化间距 self.labelLeftInset = 20; } - (void)setPullingPercent:(CGFloat)pullingPercent { [super setPullingPercent:pullingPercent]; NSArray *images = self.stateImages[@(MJRefreshStateIdle)]; if (self.state != MJRefreshStateIdle || images.count == 0) return; [self.gifView stopAnimating]; NSUInteger index = images.count * pullingPercent; if (index >= images.count) index = images.count - 1; self.gifView.image = images[index]; } - (void)placeSubviews { [super placeSubviews]; if (self.gifView.constraints.count) return; self.gifView.frame = self.bounds; if (self.stateLabel.hidden) { self.gifView.contentMode = UIViewContentModeCenter; } else { self.gifView.contentMode = UIViewContentModeRight; self.gifView.mj_w = self.mj_w * 0.5 - self.labelLeftInset - self.stateLabel.mj_textWidth * 0.5; } } - (void)setState:(MJRefreshState)state { MJRefreshCheckState // 根据状态做事情 if (state == MJRefreshStatePulling || state == MJRefreshStateRefreshing) { NSArray *images = self.stateImages[@(state)]; if (images.count == 0) return; self.gifView.hidden = NO; [self.gifView stopAnimating]; if (images.count == 1) { // 单张图片 self.gifView.image = [images lastObject]; } else { // 多张图片 self.gifView.animationImages = images; self.gifView.animationDuration = [self.stateDurations[@(state)] doubleValue]; [self.gifView startAnimating]; } } else if (state == MJRefreshStateIdle) { self.gifView.hidden = NO; } else if (state == MJRefreshStateNoMoreData) { self.gifView.hidden = YES; } } @end ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackNormalFooter.h ================================================ // // MJRefreshBackNormalFooter.h // MJRefreshExample // // Created by MJ Lee on 15/4/24. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "MJRefreshBackStateFooter.h" NS_ASSUME_NONNULL_BEGIN @interface MJRefreshBackNormalFooter : MJRefreshBackStateFooter @property (weak, nonatomic, readonly) UIImageView *arrowView; @property (weak, nonatomic, readonly) UIActivityIndicatorView *loadingView; /** 菊花的样式 */ @property (assign, nonatomic) UIActivityIndicatorViewStyle activityIndicatorViewStyle MJRefreshDeprecated("first deprecated in 3.2.2 - Use `loadingView` property"); @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackNormalFooter.m ================================================ // // MJRefreshBackNormalFooter.m // MJRefreshExample // // Created by MJ Lee on 15/4/24. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "MJRefreshBackNormalFooter.h" #import "NSBundle+MJRefresh.h" @interface MJRefreshBackNormalFooter() { __unsafe_unretained UIImageView *_arrowView; } @property (weak, nonatomic) UIActivityIndicatorView *loadingView; @end @implementation MJRefreshBackNormalFooter #pragma mark - 懒加载子控件 - (UIImageView *)arrowView { if (!_arrowView) { UIImageView *arrowView = [[UIImageView alloc] initWithImage:[NSBundle mj_arrowImage]]; [self addSubview:_arrowView = arrowView]; } return _arrowView; } - (UIActivityIndicatorView *)loadingView { if (!_loadingView) { UIActivityIndicatorView *loadingView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:_activityIndicatorViewStyle]; loadingView.hidesWhenStopped = YES; [self addSubview:_loadingView = loadingView]; } return _loadingView; } - (void)setActivityIndicatorViewStyle:(UIActivityIndicatorViewStyle)activityIndicatorViewStyle { _activityIndicatorViewStyle = activityIndicatorViewStyle; [self.loadingView removeFromSuperview]; self.loadingView = nil; [self setNeedsLayout]; } #pragma mark - 重写父类的方法 - (void)prepare { [super prepare]; #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 if (@available(iOS 13.0, *)) { _activityIndicatorViewStyle = UIActivityIndicatorViewStyleMedium; return; } #endif _activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray; } - (void)placeSubviews { [super placeSubviews]; // 箭头的中心点 CGFloat arrowCenterX = self.mj_w * 0.5; if (!self.stateLabel.hidden) { arrowCenterX -= self.labelLeftInset + self.stateLabel.mj_textWidth * 0.5; } CGFloat arrowCenterY = self.mj_h * 0.5; CGPoint arrowCenter = CGPointMake(arrowCenterX, arrowCenterY); // 箭头 if (self.arrowView.constraints.count == 0) { self.arrowView.mj_size = self.arrowView.image.size; self.arrowView.center = arrowCenter; } // 圈圈 if (self.loadingView.constraints.count == 0) { self.loadingView.center = arrowCenter; } self.arrowView.tintColor = self.stateLabel.textColor; } - (void)setState:(MJRefreshState)state { MJRefreshCheckState // 根据状态做事情 if (state == MJRefreshStateIdle) { if (oldState == MJRefreshStateRefreshing) { self.arrowView.transform = CGAffineTransformMakeRotation(0.000001 - M_PI); [UIView animateWithDuration:MJRefreshSlowAnimationDuration animations:^{ self.loadingView.alpha = 0.0; } completion:^(BOOL finished) { // 防止动画结束后,状态已经不是MJRefreshStateIdle if (self.state != MJRefreshStateIdle) return; self.loadingView.alpha = 1.0; [self.loadingView stopAnimating]; self.arrowView.hidden = NO; }]; } else { self.arrowView.hidden = NO; [self.loadingView stopAnimating]; [UIView animateWithDuration:MJRefreshFastAnimationDuration animations:^{ self.arrowView.transform = CGAffineTransformMakeRotation(0.000001 - M_PI); }]; } } else if (state == MJRefreshStatePulling) { self.arrowView.hidden = NO; [self.loadingView stopAnimating]; [UIView animateWithDuration:MJRefreshFastAnimationDuration animations:^{ self.arrowView.transform = CGAffineTransformIdentity; }]; } else if (state == MJRefreshStateRefreshing) { self.arrowView.hidden = YES; [self.loadingView startAnimating]; } else if (state == MJRefreshStateNoMoreData) { self.arrowView.hidden = YES; [self.loadingView stopAnimating]; } } @end ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.h ================================================ // // MJRefreshBackStateFooter.h // MJRefreshExample // // Created by MJ Lee on 15/6/13. // Copyright © 2015年 小码哥. All rights reserved. // #import "MJRefreshBackFooter.h" NS_ASSUME_NONNULL_BEGIN @interface MJRefreshBackStateFooter : MJRefreshBackFooter /** 文字距离圈圈、箭头的距离 */ @property (assign, nonatomic) CGFloat labelLeftInset; /** 显示刷新状态的label */ @property (weak, nonatomic, readonly) UILabel *stateLabel; /** 设置state状态下的文字 */ - (void)setTitle:(NSString *)title forState:(MJRefreshState)state; /** 获取state状态下的title */ - (NSString *)titleForState:(MJRefreshState)state; @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.m ================================================ // // MJRefreshBackStateFooter.m // MJRefreshExample // // Created by MJ Lee on 15/6/13. // Copyright © 2015年 小码哥. All rights reserved. // #import "MJRefreshBackStateFooter.h" @interface MJRefreshBackStateFooter() { /** 显示刷新状态的label */ __unsafe_unretained UILabel *_stateLabel; } /** 所有状态对应的文字 */ @property (strong, nonatomic) NSMutableDictionary *stateTitles; @end @implementation MJRefreshBackStateFooter #pragma mark - 懒加载 - (NSMutableDictionary *)stateTitles { if (!_stateTitles) { self.stateTitles = [NSMutableDictionary dictionary]; } return _stateTitles; } - (UILabel *)stateLabel { if (!_stateLabel) { [self addSubview:_stateLabel = [UILabel mj_label]]; } return _stateLabel; } #pragma mark - 公共方法 - (void)setTitle:(NSString *)title forState:(MJRefreshState)state { if (title == nil) return; self.stateTitles[@(state)] = title; self.stateLabel.text = self.stateTitles[@(self.state)]; } - (NSString *)titleForState:(MJRefreshState)state { return self.stateTitles[@(state)]; } #pragma mark - 重写父类的方法 - (void)prepare { [super prepare]; // 初始化间距 self.labelLeftInset = MJRefreshLabelLeftInset; // 初始化文字 [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshBackFooterIdleText] forState:MJRefreshStateIdle]; [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshBackFooterPullingText] forState:MJRefreshStatePulling]; [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshBackFooterRefreshingText] forState:MJRefreshStateRefreshing]; [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshBackFooterNoMoreDataText] forState:MJRefreshStateNoMoreData]; } - (void)placeSubviews { [super placeSubviews]; if (self.stateLabel.constraints.count) return; // 状态标签 self.stateLabel.frame = self.bounds; } - (void)setState:(MJRefreshState)state { MJRefreshCheckState // 设置状态文字 self.stateLabel.text = self.stateTitles[@(state)]; } @end ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Custom/Header/MJRefreshGifHeader.h ================================================ // // MJRefreshGifHeader.h // MJRefreshExample // // Created by MJ Lee on 15/4/24. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "MJRefreshStateHeader.h" NS_ASSUME_NONNULL_BEGIN @interface MJRefreshGifHeader : MJRefreshStateHeader @property (weak, nonatomic, readonly) UIImageView *gifView; /** 设置state状态下的动画图片images 动画持续时间duration*/ - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state; - (void)setImages:(NSArray *)images forState:(MJRefreshState)state; @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Custom/Header/MJRefreshGifHeader.m ================================================ // // MJRefreshGifHeader.m // MJRefreshExample // // Created by MJ Lee on 15/4/24. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "MJRefreshGifHeader.h" @interface MJRefreshGifHeader() { __unsafe_unretained UIImageView *_gifView; } /** 所有状态对应的动画图片 */ @property (strong, nonatomic) NSMutableDictionary *stateImages; /** 所有状态对应的动画时间 */ @property (strong, nonatomic) NSMutableDictionary *stateDurations; @end @implementation MJRefreshGifHeader #pragma mark - 懒加载 - (UIImageView *)gifView { if (!_gifView) { UIImageView *gifView = [[UIImageView alloc] init]; [self addSubview:_gifView = gifView]; } return _gifView; } - (NSMutableDictionary *)stateImages { if (!_stateImages) { self.stateImages = [NSMutableDictionary dictionary]; } return _stateImages; } - (NSMutableDictionary *)stateDurations { if (!_stateDurations) { self.stateDurations = [NSMutableDictionary dictionary]; } return _stateDurations; } #pragma mark - 公共方法 - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state { if (images == nil) return; self.stateImages[@(state)] = images; self.stateDurations[@(state)] = @(duration); /* 根据图片设置控件的高度 */ UIImage *image = [images firstObject]; if (image.size.height > self.mj_h) { self.mj_h = image.size.height; } } - (void)setImages:(NSArray *)images forState:(MJRefreshState)state { [self setImages:images duration:images.count * 0.1 forState:state]; } #pragma mark - 实现父类的方法 - (void)prepare { [super prepare]; // 初始化间距 self.labelLeftInset = 20; } - (void)setPullingPercent:(CGFloat)pullingPercent { [super setPullingPercent:pullingPercent]; NSArray *images = self.stateImages[@(MJRefreshStateIdle)]; if (self.state != MJRefreshStateIdle || images.count == 0) return; // 停止动画 [self.gifView stopAnimating]; // 设置当前需要显示的图片 NSUInteger index = images.count * pullingPercent; if (index >= images.count) index = images.count - 1; self.gifView.image = images[index]; } - (void)placeSubviews { [super placeSubviews]; if (self.gifView.constraints.count) return; self.gifView.frame = self.bounds; if (self.stateLabel.hidden && self.lastUpdatedTimeLabel.hidden) { self.gifView.contentMode = UIViewContentModeCenter; } else { self.gifView.contentMode = UIViewContentModeRight; CGFloat stateWidth = self.stateLabel.mj_textWidth; CGFloat timeWidth = 0.0; if (!self.lastUpdatedTimeLabel.hidden) { timeWidth = self.lastUpdatedTimeLabel.mj_textWidth; } CGFloat textWidth = MAX(stateWidth, timeWidth); self.gifView.mj_w = self.mj_w * 0.5 - textWidth * 0.5 - self.labelLeftInset; } } - (void)setState:(MJRefreshState)state { MJRefreshCheckState // 根据状态做事情 if (state == MJRefreshStatePulling || state == MJRefreshStateRefreshing) { NSArray *images = self.stateImages[@(state)]; if (images.count == 0) return; [self.gifView stopAnimating]; if (images.count == 1) { // 单张图片 self.gifView.image = [images lastObject]; } else { // 多张图片 self.gifView.animationImages = images; self.gifView.animationDuration = [self.stateDurations[@(state)] doubleValue]; [self.gifView startAnimating]; } } else if (state == MJRefreshStateIdle) { [self.gifView stopAnimating]; } } @end ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Custom/Header/MJRefreshNormalHeader.h ================================================ // // MJRefreshNormalHeader.h // MJRefreshExample // // Created by MJ Lee on 15/4/24. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "MJRefreshStateHeader.h" NS_ASSUME_NONNULL_BEGIN @interface MJRefreshNormalHeader : MJRefreshStateHeader @property (weak, nonatomic, readonly) UIImageView *arrowView; @property (weak, nonatomic, readonly) UIActivityIndicatorView *loadingView; /** 菊花的样式 */ @property (assign, nonatomic) UIActivityIndicatorViewStyle activityIndicatorViewStyle MJRefreshDeprecated("first deprecated in 3.2.2 - Use `loadingView` property"); @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Custom/Header/MJRefreshNormalHeader.m ================================================ // // MJRefreshNormalHeader.m // MJRefreshExample // // Created by MJ Lee on 15/4/24. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "MJRefreshNormalHeader.h" #import "NSBundle+MJRefresh.h" @interface MJRefreshNormalHeader() { __unsafe_unretained UIImageView *_arrowView; } @property (weak, nonatomic) UIActivityIndicatorView *loadingView; @end @implementation MJRefreshNormalHeader #pragma mark - 懒加载子控件 - (UIImageView *)arrowView { if (!_arrowView) { UIImageView *arrowView = [[UIImageView alloc] initWithImage:[NSBundle mj_arrowImage]]; [self addSubview:_arrowView = arrowView]; } return _arrowView; } - (UIActivityIndicatorView *)loadingView { if (!_loadingView) { UIActivityIndicatorView *loadingView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:_activityIndicatorViewStyle]; loadingView.hidesWhenStopped = YES; [self addSubview:_loadingView = loadingView]; } return _loadingView; } #pragma mark - 公共方法 - (void)setActivityIndicatorViewStyle:(UIActivityIndicatorViewStyle)activityIndicatorViewStyle { _activityIndicatorViewStyle = activityIndicatorViewStyle; [self.loadingView removeFromSuperview]; self.loadingView = nil; [self setNeedsLayout]; } #pragma mark - 重写父类的方法 - (void)prepare { [super prepare]; #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 if (@available(iOS 13.0, *)) { _activityIndicatorViewStyle = UIActivityIndicatorViewStyleMedium; return; } #endif _activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray; } - (void)placeSubviews { [super placeSubviews]; // 箭头的中心点 CGFloat arrowCenterX = self.mj_w * 0.5; if (!self.stateLabel.hidden) { CGFloat stateWidth = self.stateLabel.mj_textWidth; CGFloat timeWidth = 0.0; if (!self.lastUpdatedTimeLabel.hidden) { timeWidth = self.lastUpdatedTimeLabel.mj_textWidth; } CGFloat textWidth = MAX(stateWidth, timeWidth); arrowCenterX -= textWidth / 2 + self.labelLeftInset; } CGFloat arrowCenterY = self.mj_h * 0.5; CGPoint arrowCenter = CGPointMake(arrowCenterX, arrowCenterY); // 箭头 if (self.arrowView.constraints.count == 0) { self.arrowView.mj_size = self.arrowView.image.size; self.arrowView.center = arrowCenter; } // 圈圈 if (self.loadingView.constraints.count == 0) { self.loadingView.center = arrowCenter; } self.arrowView.tintColor = self.stateLabel.textColor; } - (void)setState:(MJRefreshState)state { MJRefreshCheckState // 根据状态做事情 if (state == MJRefreshStateIdle) { if (oldState == MJRefreshStateRefreshing) { self.arrowView.transform = CGAffineTransformIdentity; [UIView animateWithDuration:MJRefreshSlowAnimationDuration animations:^{ self.loadingView.alpha = 0.0; } completion:^(BOOL finished) { // 如果执行完动画发现不是idle状态,就直接返回,进入其他状态 if (self.state != MJRefreshStateIdle) return; self.loadingView.alpha = 1.0; [self.loadingView stopAnimating]; self.arrowView.hidden = NO; }]; } else { [self.loadingView stopAnimating]; self.arrowView.hidden = NO; [UIView animateWithDuration:MJRefreshFastAnimationDuration animations:^{ self.arrowView.transform = CGAffineTransformIdentity; }]; } } else if (state == MJRefreshStatePulling) { [self.loadingView stopAnimating]; self.arrowView.hidden = NO; [UIView animateWithDuration:MJRefreshFastAnimationDuration animations:^{ self.arrowView.transform = CGAffineTransformMakeRotation(0.000001 - M_PI); }]; } else if (state == MJRefreshStateRefreshing) { self.loadingView.alpha = 1.0; // 防止refreshing -> idle的动画完毕动作没有被执行 [self.loadingView startAnimating]; self.arrowView.hidden = YES; } } @end ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Custom/Header/MJRefreshStateHeader.h ================================================ // // MJRefreshStateHeader.h // MJRefreshExample // // Created by MJ Lee on 15/4/24. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "MJRefreshHeader.h" NS_ASSUME_NONNULL_BEGIN @interface MJRefreshStateHeader : MJRefreshHeader #pragma mark - 刷新时间相关 /** 利用这个block来决定显示的更新时间文字 */ @property (copy, nonatomic, nullable) NSString *(^lastUpdatedTimeText)(NSDate * _Nullable lastUpdatedTime); /** 显示上一次刷新时间的label */ @property (weak, nonatomic, readonly) UILabel *lastUpdatedTimeLabel; #pragma mark - 状态相关 /** 文字距离圈圈、箭头的距离 */ @property (assign, nonatomic) CGFloat labelLeftInset; /** 显示刷新状态的label */ @property (weak, nonatomic, readonly) UILabel *stateLabel; /** 设置state状态下的文字 */ - (void)setTitle:(NSString *)title forState:(MJRefreshState)state; @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/Custom/Header/MJRefreshStateHeader.m ================================================ // // MJRefreshStateHeader.m // MJRefreshExample // // Created by MJ Lee on 15/4/24. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "MJRefreshStateHeader.h" @interface MJRefreshStateHeader() { /** 显示上一次刷新时间的label */ __unsafe_unretained UILabel *_lastUpdatedTimeLabel; /** 显示刷新状态的label */ __unsafe_unretained UILabel *_stateLabel; } /** 所有状态对应的文字 */ @property (strong, nonatomic) NSMutableDictionary *stateTitles; @end @implementation MJRefreshStateHeader #pragma mark - 懒加载 - (NSMutableDictionary *)stateTitles { if (!_stateTitles) { self.stateTitles = [NSMutableDictionary dictionary]; } return _stateTitles; } - (UILabel *)stateLabel { if (!_stateLabel) { [self addSubview:_stateLabel = [UILabel mj_label]]; } return _stateLabel; } - (UILabel *)lastUpdatedTimeLabel { if (!_lastUpdatedTimeLabel) { [self addSubview:_lastUpdatedTimeLabel = [UILabel mj_label]]; } return _lastUpdatedTimeLabel; } #pragma mark - 公共方法 - (void)setTitle:(NSString *)title forState:(MJRefreshState)state { if (title == nil) return; self.stateTitles[@(state)] = title; self.stateLabel.text = self.stateTitles[@(self.state)]; } #pragma mark key的处理 - (void)setLastUpdatedTimeKey:(NSString *)lastUpdatedTimeKey { [super setLastUpdatedTimeKey:lastUpdatedTimeKey]; // 如果label隐藏了,就不用再处理 if (self.lastUpdatedTimeLabel.hidden) return; NSDate *lastUpdatedTime = [[NSUserDefaults standardUserDefaults] objectForKey:lastUpdatedTimeKey]; // 如果有block if (self.lastUpdatedTimeText) { self.lastUpdatedTimeLabel.text = self.lastUpdatedTimeText(lastUpdatedTime); return; } if (lastUpdatedTime) { // 1.获得年月日 NSCalendar *calendar = [NSCalendar calendarWithIdentifier:NSCalendarIdentifierGregorian]; NSUInteger unitFlags = NSCalendarUnitYear| NSCalendarUnitMonth | NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute; NSDateComponents *cmp1 = [calendar components:unitFlags fromDate:lastUpdatedTime]; NSDateComponents *cmp2 = [calendar components:unitFlags fromDate:[NSDate date]]; // 2.格式化日期 NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; BOOL isToday = NO; if ([cmp1 day] == [cmp2 day]) { // 今天 formatter.dateFormat = @" HH:mm"; isToday = YES; } else if ([cmp1 year] == [cmp2 year]) { // 今年 formatter.dateFormat = @"MM-dd HH:mm"; } else { formatter.dateFormat = @"yyyy-MM-dd HH:mm"; } NSString *time = [formatter stringFromDate:lastUpdatedTime]; // 3.显示日期 self.lastUpdatedTimeLabel.text = [NSString stringWithFormat:@"%@%@%@", [NSBundle mj_localizedStringForKey:MJRefreshHeaderLastTimeText], isToday ? [NSBundle mj_localizedStringForKey:MJRefreshHeaderDateTodayText] : @"", time]; } else { self.lastUpdatedTimeLabel.text = [NSString stringWithFormat:@"%@%@", [NSBundle mj_localizedStringForKey:MJRefreshHeaderLastTimeText], [NSBundle mj_localizedStringForKey:MJRefreshHeaderNoneLastDateText]]; } } #pragma mark - 覆盖父类的方法 - (void)prepare { [super prepare]; // 初始化间距 self.labelLeftInset = MJRefreshLabelLeftInset; // 初始化文字 [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshHeaderIdleText] forState:MJRefreshStateIdle]; [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshHeaderPullingText] forState:MJRefreshStatePulling]; [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshHeaderRefreshingText] forState:MJRefreshStateRefreshing]; } - (void)placeSubviews { [super placeSubviews]; if (self.stateLabel.hidden) return; BOOL noConstrainsOnStatusLabel = self.stateLabel.constraints.count == 0; if (self.lastUpdatedTimeLabel.hidden) { // 状态 if (noConstrainsOnStatusLabel) self.stateLabel.frame = self.bounds; } else { CGFloat stateLabelH = self.mj_h * 0.5; // 状态 if (noConstrainsOnStatusLabel) { self.stateLabel.mj_x = 0; self.stateLabel.mj_y = 0; self.stateLabel.mj_w = self.mj_w; self.stateLabel.mj_h = stateLabelH; } // 更新时间 if (self.lastUpdatedTimeLabel.constraints.count == 0) { self.lastUpdatedTimeLabel.mj_x = 0; self.lastUpdatedTimeLabel.mj_y = stateLabelH; self.lastUpdatedTimeLabel.mj_w = self.mj_w; self.lastUpdatedTimeLabel.mj_h = self.mj_h - self.lastUpdatedTimeLabel.mj_y; } } } - (void)setState:(MJRefreshState)state { MJRefreshCheckState // 设置状态文字 self.stateLabel.text = self.stateTitles[@(state)]; // 重新设置key(重新显示时间) self.lastUpdatedTimeKey = self.lastUpdatedTimeKey; } @end ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/ko.lproj/Localizable.strings ================================================ "MJRefreshHeaderIdleText" = "아래로 당겨 새로고침"; "MJRefreshHeaderPullingText" = "놓으면 새로고침"; "MJRefreshHeaderRefreshingText" = "로딩중..."; "MJRefreshAutoFooterIdleText" = "탭 또는 위로 당겨 로드함"; "MJRefreshAutoFooterRefreshingText" = "로딩중..."; "MJRefreshAutoFooterNoMoreDataText" = "더이상 데이터 없음"; "MJRefreshBackFooterIdleText" = "위로 당겨 더 로드 가능"; "MJRefreshBackFooterPullingText" = "놓으면 더 로드됨."; "MJRefreshBackFooterRefreshingText" = "로딩중..."; "MJRefreshBackFooterNoMoreDataText" = "더이상 데이터 없음"; "MJRefreshHeaderLastTimeText" = "마지막 업데이트: "; "MJRefreshHeaderDateTodayText" = "오늘"; "MJRefreshHeaderNoneLastDateText" = "기록 없음"; ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/zh-Hant.lproj/Localizable.strings ================================================ "MJRefreshHeaderIdleText" = "下拉可以刷新"; "MJRefreshHeaderPullingText" = "鬆開立即刷新"; "MJRefreshHeaderRefreshingText" = "正在刷新數據中..."; "MJRefreshAutoFooterIdleText" = "點擊或上拉加載更多"; "MJRefreshAutoFooterRefreshingText" = "正在加載更多的數據..."; "MJRefreshAutoFooterNoMoreDataText" = "已經全部加載完畢"; "MJRefreshBackFooterIdleText" = "上拉可以加載更多"; "MJRefreshBackFooterPullingText" = "鬆開立即加載更多"; "MJRefreshBackFooterRefreshingText" = "正在加載更多的數據..."; "MJRefreshBackFooterNoMoreDataText" = "已經全部加載完畢"; "MJRefreshHeaderLastTimeText" = "最後更新:"; "MJRefreshHeaderDateTodayText" = "今天"; "MJRefreshHeaderNoneLastDateText" = "無記錄"; ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/MJRefresh.h ================================================ // 代码地址: https://github.com/CoderMJLee/MJRefresh // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 #import "UIScrollView+MJRefresh.h" #import "UIScrollView+MJExtension.h" #import "UIView+MJExtension.h" #import "MJRefreshNormalHeader.h" #import "MJRefreshGifHeader.h" #import "MJRefreshBackNormalFooter.h" #import "MJRefreshBackGifFooter.h" #import "MJRefreshAutoNormalFooter.h" #import "MJRefreshAutoGifFooter.h" ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/MJRefreshConfig.h ================================================ // // MJRefreshConfig.h // // Created by Frank on 2018/11/27. // Copyright © 2018 小码哥. All rights reserved. // #import NS_ASSUME_NONNULL_BEGIN @interface MJRefreshConfig : NSObject /** 默认使用的语言版本, 默认为 nil. 将随系统的语言自动改变 */ @property (copy, nonatomic, nullable) NSString *languageCode; /** @return Singleton Config instance */ + (instancetype)defaultConfig; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/MJRefreshConfig.m ================================================ // // MJRefreshConfig.m // // Created by Frank on 2018/11/27. // Copyright © 2018 小码哥. All rights reserved. // #import "MJRefreshConfig.h" @implementation MJRefreshConfig static MJRefreshConfig *mj_RefreshConfig = nil; + (instancetype)defaultConfig { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ mj_RefreshConfig = [[self alloc] init]; }); return mj_RefreshConfig; } @end ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/MJRefreshConst.h ================================================ // 代码地址: https://github.com/CoderMJLee/MJRefresh // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 #import #import // 弱引用 #define MJWeakSelf __weak typeof(self) weakSelf = self; // 日志输出 #ifdef DEBUG #define MJRefreshLog(...) NSLog(__VA_ARGS__) #else #define MJRefreshLog(...) #endif // 过期提醒 #define MJRefreshDeprecated(DESCRIPTION) __attribute__((deprecated(DESCRIPTION))) // 运行时objc_msgSend #define MJRefreshMsgSend(...) ((void (*)(void *, SEL, UIView *))objc_msgSend)(__VA_ARGS__) #define MJRefreshMsgTarget(target) (__bridge void *)(target) // RGB颜色 #define MJRefreshColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0] // 文字颜色 #define MJRefreshLabelTextColor MJRefreshColor(90, 90, 90) // 字体大小 #define MJRefreshLabelFont [UIFont boldSystemFontOfSize:14] // 常量 UIKIT_EXTERN const CGFloat MJRefreshLabelLeftInset; UIKIT_EXTERN const CGFloat MJRefreshHeaderHeight; UIKIT_EXTERN const CGFloat MJRefreshFooterHeight; UIKIT_EXTERN const CGFloat MJRefreshFastAnimationDuration; UIKIT_EXTERN const CGFloat MJRefreshSlowAnimationDuration; UIKIT_EXTERN NSString *const MJRefreshKeyPathContentOffset; UIKIT_EXTERN NSString *const MJRefreshKeyPathContentSize; UIKIT_EXTERN NSString *const MJRefreshKeyPathContentInset; UIKIT_EXTERN NSString *const MJRefreshKeyPathPanState; UIKIT_EXTERN NSString *const MJRefreshHeaderLastUpdatedTimeKey; UIKIT_EXTERN NSString *const MJRefreshHeaderIdleText; UIKIT_EXTERN NSString *const MJRefreshHeaderPullingText; UIKIT_EXTERN NSString *const MJRefreshHeaderRefreshingText; UIKIT_EXTERN NSString *const MJRefreshAutoFooterIdleText; UIKIT_EXTERN NSString *const MJRefreshAutoFooterRefreshingText; UIKIT_EXTERN NSString *const MJRefreshAutoFooterNoMoreDataText; UIKIT_EXTERN NSString *const MJRefreshBackFooterIdleText; UIKIT_EXTERN NSString *const MJRefreshBackFooterPullingText; UIKIT_EXTERN NSString *const MJRefreshBackFooterRefreshingText; UIKIT_EXTERN NSString *const MJRefreshBackFooterNoMoreDataText; UIKIT_EXTERN NSString *const MJRefreshHeaderLastTimeText; UIKIT_EXTERN NSString *const MJRefreshHeaderDateTodayText; UIKIT_EXTERN NSString *const MJRefreshHeaderNoneLastDateText; // 状态检查 #define MJRefreshCheckState \ MJRefreshState oldState = self.state; \ if (state == oldState) return; \ [super setState:state]; // 异步主线程执行,不强持有Self #define MJRefreshDispatchAsyncOnMainQueue(x) \ __weak typeof(self) weakSelf = self; \ dispatch_async(dispatch_get_main_queue(), ^{ \ typeof(weakSelf) self = weakSelf; \ {x} \ }); ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/MJRefreshConst.m ================================================ // 代码地址: https://github.com/CoderMJLee/MJRefresh // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 #import const CGFloat MJRefreshLabelLeftInset = 25; const CGFloat MJRefreshHeaderHeight = 54.0; const CGFloat MJRefreshFooterHeight = 44.0; const CGFloat MJRefreshFastAnimationDuration = 0.25; const CGFloat MJRefreshSlowAnimationDuration = 0.4; NSString *const MJRefreshKeyPathContentOffset = @"contentOffset"; NSString *const MJRefreshKeyPathContentInset = @"contentInset"; NSString *const MJRefreshKeyPathContentSize = @"contentSize"; NSString *const MJRefreshKeyPathPanState = @"state"; NSString *const MJRefreshHeaderLastUpdatedTimeKey = @"MJRefreshHeaderLastUpdatedTimeKey"; NSString *const MJRefreshHeaderIdleText = @"MJRefreshHeaderIdleText"; NSString *const MJRefreshHeaderPullingText = @"MJRefreshHeaderPullingText"; NSString *const MJRefreshHeaderRefreshingText = @"MJRefreshHeaderRefreshingText"; NSString *const MJRefreshAutoFooterIdleText = @"MJRefreshAutoFooterIdleText"; NSString *const MJRefreshAutoFooterRefreshingText = @"MJRefreshAutoFooterRefreshingText"; NSString *const MJRefreshAutoFooterNoMoreDataText = @"MJRefreshAutoFooterNoMoreDataText"; NSString *const MJRefreshBackFooterIdleText = @"MJRefreshBackFooterIdleText"; NSString *const MJRefreshBackFooterPullingText = @"MJRefreshBackFooterPullingText"; NSString *const MJRefreshBackFooterRefreshingText = @"MJRefreshBackFooterRefreshingText"; NSString *const MJRefreshBackFooterNoMoreDataText = @"MJRefreshBackFooterNoMoreDataText"; NSString *const MJRefreshHeaderLastTimeText = @"MJRefreshHeaderLastTimeText"; NSString *const MJRefreshHeaderDateTodayText = @"MJRefreshHeaderDateTodayText"; NSString *const MJRefreshHeaderNoneLastDateText = @"MJRefreshHeaderNoneLastDateText"; ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/NSBundle+MJRefresh.h ================================================ // // NSBundle+MJRefresh.h // MJRefreshExample // // Created by MJ Lee on 16/6/13. // Copyright © 2016年 小码哥. All rights reserved. // #import NS_ASSUME_NONNULL_BEGIN @interface NSBundle (MJRefresh) + (instancetype)mj_refreshBundle; + (UIImage *)mj_arrowImage; + (NSString *)mj_localizedStringForKey:(NSString *)key value:(nullable NSString *)value; + (NSString *)mj_localizedStringForKey:(NSString *)key; @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/NSBundle+MJRefresh.m ================================================ // // NSBundle+MJRefresh.m // MJRefreshExample // // Created by MJ Lee on 16/6/13. // Copyright © 2016年 小码哥. All rights reserved. // #import "NSBundle+MJRefresh.h" #import "MJRefreshComponent.h" #import "MJRefreshConfig.h" @implementation NSBundle (MJRefresh) + (instancetype)mj_refreshBundle { static NSBundle *refreshBundle = nil; if (refreshBundle == nil) { // 这里不使用mainBundle是为了适配pod 1.x和0.x refreshBundle = [NSBundle bundleWithPath:[[NSBundle bundleForClass:[MJRefreshComponent class]] pathForResource:@"MJRefresh" ofType:@"bundle"]]; } return refreshBundle; } + (UIImage *)mj_arrowImage { static UIImage *arrowImage = nil; if (arrowImage == nil) { arrowImage = [[UIImage imageWithContentsOfFile:[[self mj_refreshBundle] pathForResource:@"arrow@2x" ofType:@"png"]] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; } return arrowImage; } + (NSString *)mj_localizedStringForKey:(NSString *)key { return [self mj_localizedStringForKey:key value:nil]; } + (NSString *)mj_localizedStringForKey:(NSString *)key value:(NSString *)value { static NSBundle *bundle = nil; if (bundle == nil) { NSString *language = MJRefreshConfig.defaultConfig.languageCode; // 如果配置中没有配置语言 if (!language) { // (iOS获取的语言字符串比较不稳定)目前框架只处理en、zh-Hans、zh-Hant三种情况,其他按照系统默认处理 language = [NSLocale preferredLanguages].firstObject; } if ([language hasPrefix:@"en"]) { language = @"en"; } else if ([language hasPrefix:@"zh"]) { if ([language rangeOfString:@"Hans"].location != NSNotFound) { language = @"zh-Hans"; // 简体中文 } else { // zh-Hant\zh-HK\zh-TW language = @"zh-Hant"; // 繁體中文 } } else if ([language hasPrefix:@"ko"]) { language = @"ko"; } else if ([language hasPrefix:@"ru"]) { language = @"ru"; } else if ([language hasPrefix:@"uk"]) { language = @"uk"; } else { language = @"en"; } // 从MJRefresh.bundle中查找资源 bundle = [NSBundle bundleWithPath:[[NSBundle mj_refreshBundle] pathForResource:language ofType:@"lproj"]]; } value = [bundle localizedStringForKey:key value:value table:nil]; return [[NSBundle mainBundle] localizedStringForKey:key value:value table:nil]; } @end ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/UIScrollView+MJExtension.h ================================================ // 代码地址: https://github.com/CoderMJLee/MJRefresh // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 // UIScrollView+Extension.h // MJRefreshExample // // Created by MJ Lee on 14-5-28. // Copyright (c) 2014年 小码哥. All rights reserved. // #import NS_ASSUME_NONNULL_BEGIN @interface UIScrollView (MJExtension) @property (readonly, nonatomic) UIEdgeInsets mj_inset; @property (assign, nonatomic) CGFloat mj_insetT; @property (assign, nonatomic) CGFloat mj_insetB; @property (assign, nonatomic) CGFloat mj_insetL; @property (assign, nonatomic) CGFloat mj_insetR; @property (assign, nonatomic) CGFloat mj_offsetX; @property (assign, nonatomic) CGFloat mj_offsetY; @property (assign, nonatomic) CGFloat mj_contentW; @property (assign, nonatomic) CGFloat mj_contentH; @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/UIScrollView+MJExtension.m ================================================ // 代码地址: https://github.com/CoderMJLee/MJRefresh // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 // UIScrollView+Extension.m // MJRefreshExample // // Created by MJ Lee on 14-5-28. // Copyright (c) 2014年 小码哥. All rights reserved. // #import "UIScrollView+MJExtension.h" #import #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunguarded-availability-new" @implementation UIScrollView (MJExtension) static BOOL respondsToAdjustedContentInset_; + (void)initialize { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ respondsToAdjustedContentInset_ = [self instancesRespondToSelector:@selector(adjustedContentInset)]; }); } - (UIEdgeInsets)mj_inset { #ifdef __IPHONE_11_0 if (respondsToAdjustedContentInset_) { return self.adjustedContentInset; } #endif return self.contentInset; } - (void)setMj_insetT:(CGFloat)mj_insetT { UIEdgeInsets inset = self.contentInset; inset.top = mj_insetT; #ifdef __IPHONE_11_0 if (respondsToAdjustedContentInset_) { inset.top -= (self.adjustedContentInset.top - self.contentInset.top); } #endif self.contentInset = inset; } - (CGFloat)mj_insetT { return self.mj_inset.top; } - (void)setMj_insetB:(CGFloat)mj_insetB { UIEdgeInsets inset = self.contentInset; inset.bottom = mj_insetB; #ifdef __IPHONE_11_0 if (respondsToAdjustedContentInset_) { inset.bottom -= (self.adjustedContentInset.bottom - self.contentInset.bottom); } #endif self.contentInset = inset; } - (CGFloat)mj_insetB { return self.mj_inset.bottom; } - (void)setMj_insetL:(CGFloat)mj_insetL { UIEdgeInsets inset = self.contentInset; inset.left = mj_insetL; #ifdef __IPHONE_11_0 if (respondsToAdjustedContentInset_) { inset.left -= (self.adjustedContentInset.left - self.contentInset.left); } #endif self.contentInset = inset; } - (CGFloat)mj_insetL { return self.mj_inset.left; } - (void)setMj_insetR:(CGFloat)mj_insetR { UIEdgeInsets inset = self.contentInset; inset.right = mj_insetR; #ifdef __IPHONE_11_0 if (respondsToAdjustedContentInset_) { inset.right -= (self.adjustedContentInset.right - self.contentInset.right); } #endif self.contentInset = inset; } - (CGFloat)mj_insetR { return self.mj_inset.right; } - (void)setMj_offsetX:(CGFloat)mj_offsetX { CGPoint offset = self.contentOffset; offset.x = mj_offsetX; self.contentOffset = offset; } - (CGFloat)mj_offsetX { return self.contentOffset.x; } - (void)setMj_offsetY:(CGFloat)mj_offsetY { CGPoint offset = self.contentOffset; offset.y = mj_offsetY; self.contentOffset = offset; } - (CGFloat)mj_offsetY { return self.contentOffset.y; } - (void)setMj_contentW:(CGFloat)mj_contentW { CGSize size = self.contentSize; size.width = mj_contentW; self.contentSize = size; } - (CGFloat)mj_contentW { return self.contentSize.width; } - (void)setMj_contentH:(CGFloat)mj_contentH { CGSize size = self.contentSize; size.height = mj_contentH; self.contentSize = size; } - (CGFloat)mj_contentH { return self.contentSize.height; } @end #pragma clang diagnostic pop ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/UIScrollView+MJRefresh.h ================================================ // 代码地址: https://github.com/CoderMJLee/MJRefresh // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 // UIScrollView+MJRefresh.h // MJRefreshExample // // Created by MJ Lee on 15/3/4. // Copyright (c) 2015年 小码哥. All rights reserved. // 给ScrollView增加下拉刷新、上拉刷新的功能 #import #import "MJRefreshConst.h" @class MJRefreshHeader, MJRefreshFooter; NS_ASSUME_NONNULL_BEGIN @interface UIScrollView (MJRefresh) /** 下拉刷新控件 */ @property (strong, nonatomic, nullable) MJRefreshHeader *mj_header; @property (strong, nonatomic, nullable) MJRefreshHeader *header MJRefreshDeprecated("使用mj_header"); /** 上拉刷新控件 */ @property (strong, nonatomic, nullable) MJRefreshFooter *mj_footer; @property (strong, nonatomic, nullable) MJRefreshFooter *footer MJRefreshDeprecated("使用mj_footer"); #pragma mark - other - (NSInteger)mj_totalDataCount; @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/UIScrollView+MJRefresh.m ================================================ // 代码地址: https://github.com/CoderMJLee/MJRefresh // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 // UIScrollView+MJRefresh.m // MJRefreshExample // // Created by MJ Lee on 15/3/4. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "UIScrollView+MJRefresh.h" #import "MJRefreshHeader.h" #import "MJRefreshFooter.h" #import @implementation UIScrollView (MJRefresh) #pragma mark - header static const char MJRefreshHeaderKey = '\0'; - (void)setMj_header:(MJRefreshHeader *)mj_header { if (mj_header != self.mj_header) { // 删除旧的,添加新的 [self.mj_header removeFromSuperview]; [self insertSubview:mj_header atIndex:0]; // 存储新的 objc_setAssociatedObject(self, &MJRefreshHeaderKey, mj_header, OBJC_ASSOCIATION_RETAIN); } } - (MJRefreshHeader *)mj_header { return objc_getAssociatedObject(self, &MJRefreshHeaderKey); } #pragma mark - footer static const char MJRefreshFooterKey = '\0'; - (void)setMj_footer:(MJRefreshFooter *)mj_footer { if (mj_footer != self.mj_footer) { // 删除旧的,添加新的 [self.mj_footer removeFromSuperview]; [self insertSubview:mj_footer atIndex:0]; // 存储新的 objc_setAssociatedObject(self, &MJRefreshFooterKey, mj_footer, OBJC_ASSOCIATION_RETAIN); } } - (MJRefreshFooter *)mj_footer { return objc_getAssociatedObject(self, &MJRefreshFooterKey); } #pragma mark - 过期 - (void)setFooter:(MJRefreshFooter *)footer { self.mj_footer = footer; } - (MJRefreshFooter *)footer { return self.mj_footer; } - (void)setHeader:(MJRefreshHeader *)header { self.mj_header = header; } - (MJRefreshHeader *)header { return self.mj_header; } #pragma mark - other - (NSInteger)mj_totalDataCount { NSInteger totalCount = 0; if ([self isKindOfClass:[UITableView class]]) { UITableView *tableView = (UITableView *)self; for (NSInteger section = 0; section < tableView.numberOfSections; section++) { totalCount += [tableView numberOfRowsInSection:section]; } } else if ([self isKindOfClass:[UICollectionView class]]) { UICollectionView *collectionView = (UICollectionView *)self; for (NSInteger section = 0; section < collectionView.numberOfSections; section++) { totalCount += [collectionView numberOfItemsInSection:section]; } } return totalCount; } @end ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/UIView+MJExtension.h ================================================ // 代码地址: https://github.com/CoderMJLee/MJRefresh // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 // UIView+Extension.h // MJRefreshExample // // Created by MJ Lee on 14-5-28. // Copyright (c) 2014年 小码哥. All rights reserved. // #import NS_ASSUME_NONNULL_BEGIN @interface UIView (MJExtension) @property (assign, nonatomic) CGFloat mj_x; @property (assign, nonatomic) CGFloat mj_y; @property (assign, nonatomic) CGFloat mj_w; @property (assign, nonatomic) CGFloat mj_h; @property (assign, nonatomic) CGSize mj_size; @property (assign, nonatomic) CGPoint mj_origin; @end NS_ASSUME_NONNULL_END ================================================ FILE: CMPageTitleView/Pods/MJRefresh/MJRefresh/UIView+MJExtension.m ================================================ // 代码地址: https://github.com/CoderMJLee/MJRefresh // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 // UIView+Extension.m // MJRefreshExample // // Created by MJ Lee on 14-5-28. // Copyright (c) 2014年 小码哥. All rights reserved. // #import "UIView+MJExtension.h" @implementation UIView (MJExtension) - (void)setMj_x:(CGFloat)mj_x { CGRect frame = self.frame; frame.origin.x = mj_x; self.frame = frame; } - (CGFloat)mj_x { return self.frame.origin.x; } - (void)setMj_y:(CGFloat)mj_y { CGRect frame = self.frame; frame.origin.y = mj_y; self.frame = frame; } - (CGFloat)mj_y { return self.frame.origin.y; } - (void)setMj_w:(CGFloat)mj_w { CGRect frame = self.frame; frame.size.width = mj_w; self.frame = frame; } - (CGFloat)mj_w { return self.frame.size.width; } - (void)setMj_h:(CGFloat)mj_h { CGRect frame = self.frame; frame.size.height = mj_h; self.frame = frame; } - (CGFloat)mj_h { return self.frame.size.height; } - (void)setMj_size:(CGSize)mj_size { CGRect frame = self.frame; frame.size = mj_size; self.frame = frame; } - (CGSize)mj_size { return self.frame.size; } - (void)setMj_origin:(CGPoint)mj_origin { CGRect frame = self.frame; frame.origin = mj_origin; self.frame = frame; } - (CGPoint)mj_origin { return self.frame.origin; } @end ================================================ FILE: CMPageTitleView/Pods/MJRefresh/README.md ================================================ ## MJRefresh [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) ![podversion](https://img.shields.io/cocoapods/v/MJRefresh.svg) * An easy way to use pull-to-refresh [📜✍🏻**Release Notes**: more details](https://github.com/CoderMJLee/MJRefresh/releases) ## Contents * Getting Started * [Features【Support what kinds of controls to refresh】](#Support_what_kinds_of_controls_to_refresh) * [Installation【How to use MJRefresh】](#How_to_use_MJRefresh) * [Who's using【More than hundreds of Apps are using MJRefresh】](#More_than_hundreds_of_Apps_are_using_MJRefresh) * [Classes【The Class Structure Chart of MJRefresh】](#The_Class_Structure_Chart_of_MJRefresh) * Comment API * [MJRefreshComponent.h](#MJRefreshComponent.h) * [MJRefreshHeader.h](#MJRefreshHeader.h) * [MJRefreshFooter.h](#MJRefreshFooter.h) * [MJRefreshAutoFooter.h](#MJRefreshAutoFooter.h) * Examples * [Reference](#Reference) * [The drop-down refresh 01-Default](#The_drop-down_refresh_01-Default) * [The drop-down refresh 02-Animation image](#The_drop-down_refresh_02-Animation_image) * [The drop-down refresh 03-Hide the time](#The_drop-down_refresh_03-Hide_the_time) * [The drop-down refresh 04-Hide status and time](#The_drop-down_refresh_04-Hide_status_and_time) * [The drop-down refresh 05-DIY title](#The_drop-down_refresh_05-DIY_title) * [The drop-down refresh 06-DIY the control of refresh](#The_drop-down_refresh_06-DIY_the_control_of_refresh) * [The pull to refresh 01-Default](#The_pull_to_refresh_01-Default) * [The pull to refresh 02-Animation image](#The_pull_to_refresh_02-Animation_image) * [The pull to refresh 03-Hide the title of refresh status](#The_pull_to_refresh_03-Hide_the_title_of_refresh_status) * [The pull to refresh 04-All loaded](#The_pull_to_refresh_04-All_loaded) * [The pull to refresh 05-DIY title](#The_pull_to_refresh_05-DIY_title) * [The pull to refresh 06-Hidden After loaded](#The_pull_to_refresh_06-Hidden_After_loaded) * [The pull to refresh 07-Automatic back of the pull01](#The_pull_to_refresh_07-Automatic_back_of_the_pull01) * [The pull to refresh 08-Automatic back of the pull02](#The_pull_to_refresh_08-Automatic_back_of_the_pull02) * [The pull to refresh 09-DIY the control of refresh(Automatic refresh)](#The_pull_to_refresh_09-DIY_the_control_of_refresh(Automatic_refresh)) * [The pull to refresh 10-DIY the control of refresh(Automatic back)](#The_pull_to_refresh_10-DIY_the_control_of_refresh(Automatic_back)) * [UICollectionView01-The pull and drop-down refresh](#UICollectionView01-The_pull_and_drop-down_refresh) * [WKWebView01-The drop-down refresh](#WKWebView01-The_drop-down_refresh) * [Hope](#Hope) ## Support what kinds of controls to refresh * `UIScrollView`、`UITableView`、`UICollectionView`、`WKWebView` ## How to use MJRefresh * Installation with CocoaPods:`pod 'MJRefresh'` * Installation with [Carthage](https://github.com/Carthage/Carthage):`github "CoderMJLee/MJRefresh"` * Manual import: * Drag All files in the `MJRefresh` folder to project * Import the main file:`#import "MJRefresh.h"` ```objc Base Custom MJRefresh.bundle MJRefresh.h MJRefreshConst.h MJRefreshConst.m UIScrollView+MJExtension.h UIScrollView+MJExtension.m UIScrollView+MJRefresh.h UIScrollView+MJRefresh.m UIView+MJExtension.h UIView+MJExtension.m ``` ## More than hundreds of Apps are using MJRefresh * More information of App can focus on:[M了个J-博客园](http://www.cnblogs.com/mjios/p/4409853.html) ## The Class Structure Chart of MJRefresh ![](http://images0.cnblogs.com/blog2015/497279/201506/132232456139177.png) - `The class of red text` in the chart:You can use them directly - The drop-down refresh control types - Normal:`MJRefreshNormalHeader` - Gif:`MJRefreshGifHeader` - The pull to refresh control types - Auto refresh - Normal:`MJRefreshAutoNormalFooter` - Gif:`MJRefreshAutoGifFooter` - Auto Back - Normal:`MJRefreshBackNormalFooter` - Gif:`MJRefreshBackGifFooter` - `The class of non-red text` in the chart:For inheritance,to use DIY the control of refresh - About how to DIY the control of refresh,You can refer the Class in below Chart
## MJRefreshComponent.h ```objc /** The Base Class of refresh control */ @interface MJRefreshComponent : UIView #pragma mark - Control the state of Refresh /** BeginRefreshing */ - (void)beginRefreshing; /** EndRefreshing */ - (void)endRefreshing; /** IsRefreshing */ - (BOOL)isRefreshing; #pragma mark - Other /** According to the drag ratio to change alpha automatically */ @property (assign, nonatomic, getter=isAutomaticallyChangeAlpha) BOOL automaticallyChangeAlpha; @end ``` ## MJRefreshHeader.h ```objc @interface MJRefreshHeader : MJRefreshComponent /** Creat header */ + (instancetype)headerWithRefreshingBlock:(MJRefreshComponentRefreshingBlock)refreshingBlock; /** Creat header */ + (instancetype)headerWithRefreshingTarget:(id)target refreshingAction:(SEL)action; /** This key is used to storage the time that the last time of drown-down successfully */ @property (copy, nonatomic) NSString *lastUpdatedTimeKey; /** The last time of drown-down successfully */ @property (strong, nonatomic, readonly) NSDate *lastUpdatedTime; /** Ignored scrollView contentInset top */ @property (assign, nonatomic) CGFloat ignoredScrollViewContentInsetTop; @end ``` ## MJRefreshFooter.h ```objc @interface MJRefreshFooter : MJRefreshComponent /** Creat footer */ + (instancetype)footerWithRefreshingBlock:(MJRefreshComponentRefreshingBlock)refreshingBlock; /** Creat footer */ + (instancetype)footerWithRefreshingTarget:(id)target refreshingAction:(SEL)action; /** NoticeNoMoreData */ - (void)noticeNoMoreData; /** ResetNoMoreData(Clear the status of NoMoreData ) */ - (void)resetNoMoreData; /** Ignored scrollView contentInset bottom */ @property (assign, nonatomic) CGFloat ignoredScrollViewContentInsetBottom; @end ``` ## MJRefreshAutoFooter.h ```objc @interface MJRefreshAutoFooter : MJRefreshFooter /** Is Automatically Refresh(Default is Yes) */ @property (assign, nonatomic, getter=isAutomaticallyRefresh) BOOL automaticallyRefresh; /** When there is much at the bottom of the control is automatically refresh(Default is 1.0,Is at the bottom of the control appears in full, will refresh automatically) */ @property (assign, nonatomic) CGFloat triggerAutomaticallyRefreshPercent; @end ``` ## Reference ```objc * Due to there are more functions of this framework,Don't write specific text describe its usage * You can directly reference examples MJTableViewController、MJCollectionViewController、MJWebViewController,More intuitive and fast. ``` ## The drop-down refresh 01-Default ```objc self.tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ //Call this Block When enter the refresh status automatically }]; 或 // Set the callback(Once you enter the refresh status,then call the action of target,that is call [self loadNewData]) self.tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(loadNewData)]; // Enter the refresh status immediately [self.tableView.mj_header beginRefreshing]; ``` ![(下拉刷新01-普通)](http://images0.cnblogs.com/blog2015/497279/201506/141204343486151.gif) ## The drop-down refresh 02-Animation image ```objc // Set the callback(一Once you enter the refresh status,then call the action of target,that is call [self loadNewData]) MJRefreshGifHeader *header = [MJRefreshGifHeader headerWithRefreshingTarget:self refreshingAction:@selector(loadNewData)]; // Set the ordinary state of animated images [header setImages:idleImages forState:MJRefreshStateIdle]; // Set the pulling state of animated images(Enter the status of refreshing as soon as loosen) [header setImages:pullingImages forState:MJRefreshStatePulling]; // Set the refreshing state of animated images [header setImages:refreshingImages forState:MJRefreshStateRefreshing]; // Set header self.tableView.mj_header = header; ``` ![(下拉刷新02-动画图片)](http://images0.cnblogs.com/blog2015/497279/201506/141204402238389.gif) ## The drop-down refresh 03-Hide the time ```objc // Hide the time header.lastUpdatedTimeLabel.hidden = YES; ``` ![(下拉刷新03-隐藏时间)](http://images0.cnblogs.com/blog2015/497279/201506/141204456132944.gif) ## The drop-down refresh 04-Hide status and time ```objc // Hide the time header.lastUpdatedTimeLabel.hidden = YES; // Hide the status header.stateLabel.hidden = YES; ``` ![(下拉刷新04-隐藏状态和时间0)](http://images0.cnblogs.com/blog2015/497279/201506/141204508639539.gif) ## The drop-down refresh 05-DIY title ```objc // Set title [header setTitle:@"Pull down to refresh" forState:MJRefreshStateIdle]; [header setTitle:@"Release to refresh" forState:MJRefreshStatePulling]; [header setTitle:@"Loading ..." forState:MJRefreshStateRefreshing]; // Set font header.stateLabel.font = [UIFont systemFontOfSize:15]; header.lastUpdatedTimeLabel.font = [UIFont systemFontOfSize:14]; // Set textColor header.stateLabel.textColor = [UIColor redColor]; header.lastUpdatedTimeLabel.textColor = [UIColor blueColor]; ``` ![(下拉刷新05-自定义文字)](http://images0.cnblogs.com/blog2015/497279/201506/141204563633593.gif) ## The drop-down refresh 06-DIY the control of refresh ```objc self.tableView.mj_header = [MJDIYHeader headerWithRefreshingTarget:self refreshingAction:@selector(loadNewData)]; // Implementation reference to MJDIYHeader.h和MJDIYHeader.m ``` ![(下拉刷新06-自定义刷新控件)](http://images0.cnblogs.com/blog2015/497279/201506/141205019261159.gif) ## The pull to refresh 01-Default ```objc self.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{ //Call this Block When enter the refresh status automatically }]; 或 // Set the callback(Once you enter the refresh status,then call the action of target,that is call [self loadMoreData]) self.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)]; ``` ![(上拉刷新01-默认)](http://images0.cnblogs.com/blog2015/497279/201506/141205090047696.gif) ## The pull to refresh 02-Animation image ```objc // Set the callback(Once you enter the refresh status,then call the action of target,that is call [self loadMoreData]) MJRefreshAutoGifFooter *footer = [MJRefreshAutoGifFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)]; // Set the refresh image [footer setImages:refreshingImages forState:MJRefreshStateRefreshing]; // Set footer self.tableView.mj_footer = footer; ``` ![(上拉刷新02-动画图片)](http://images0.cnblogs.com/blog2015/497279/201506/141205141445793.gif) ## The pull to refresh 03-Hide the title of refresh status ```objc // Hide the title of refresh status footer.refreshingTitleHidden = YES; // If does have not above method,then use footer.stateLabel.hidden = YES; ``` ![(上拉刷新03-隐藏刷新状态的文字)](http://images0.cnblogs.com/blog2015/497279/201506/141205200985774.gif) ## The pull to refresh 04-All loaded ```objc //Become the status of NoMoreData [footer noticeNoMoreData]; ``` ![(上拉刷新04-全部加载完毕)](http://images0.cnblogs.com/blog2015/497279/201506/141205248634686.gif) ## The pull to refresh 05-DIY title ```objc // Set title [footer setTitle:@"Click or drag up to refresh" forState:MJRefreshStateIdle]; [footer setTitle:@"Loading more ..." forState:MJRefreshStateRefreshing]; [footer setTitle:@"No more data" forState:MJRefreshStateNoMoreData]; // Set font footer.stateLabel.font = [UIFont systemFontOfSize:17]; // Set textColor footer.stateLabel.textColor = [UIColor blueColor]; ``` ![(上拉刷新05-自定义文字)](http://images0.cnblogs.com/blog2015/497279/201506/141205295511153.gif) ## The pull to refresh 06-Hidden After loaded ```objc //Hidden current control of the pull to refresh self.tableView.mj_footer.hidden = YES; ``` ![(上拉刷新06-加载后隐藏)](http://images0.cnblogs.com/blog2015/497279/201506/141205343481821.gif) ## The pull to refresh 07-Automatic back of the pull01 ```objc self.tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)]; ``` ![(上拉刷新07-自动回弹的上拉01)](http://images0.cnblogs.com/blog2015/497279/201506/141205392239231.gif) ## The pull to refresh 08-Automatic back of the pull02 ```objc MJRefreshBackGifFooter *footer = [MJRefreshBackGifFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)]; // Set the normal state of the animated image [footer setImages:idleImages forState:MJRefreshStateIdle]; // Set the pulling state of animated images(Enter the status of refreshing as soon as loosen) [footer setImages:pullingImages forState:MJRefreshStatePulling]; // Set the refreshing state of animated images [footer setImages:refreshingImages forState:MJRefreshStateRefreshing]; // Set footer self.tableView.mj_footer = footer; ``` ![(上拉刷新07-自动回弹的上拉02)](http://images0.cnblogs.com/blog2015/497279/201506/141205441443628.gif) ## The pull to refresh 09-DIY the control of refresh(Automatic refresh) ```objc self.tableView.mj_footer = [MJDIYAutoFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)]; // Implementation reference to MJDIYAutoFooter.h和MJDIYAutoFooter.m ``` ![(上拉刷新09-自定义刷新控件(自动刷新))](http://images0.cnblogs.com/blog2015/497279/201506/141205500195866.gif) ## The pull to refresh 10-DIY the control of refresh(Automatic back) ```objc self.tableView.mj_footer = [MJDIYBackFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)]; // Implementation reference to MJDIYBackFooter.h和MJDIYBackFooter.m ``` ![(上拉刷新10-自定义刷新控件(自动回弹))](http://images0.cnblogs.com/blog2015/497279/201506/141205560666819.gif) ## UICollectionView01-The pull and drop-down refresh ```objc // The drop-down refresh self.collectionView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ //Call this Block When enter the refresh status automatically }]; // The pull to refresh self.collectionView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{ //Call this Block When enter the refresh status automatically }]; ``` ![(UICollectionView01-上下拉刷新)](http://images0.cnblogs.com/blog2015/497279/201506/141206021603758.gif) ## WKWebView01-The drop-down refresh ```objc //Add the control of The drop-down refresh self.webView.scrollView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ //Call this Block When enter the refresh status automatically }]; ``` ![(UICollectionView01-上下拉刷新)](http://images0.cnblogs.com/blog2015/497279/201506/141206080514524.gif) ## Remind * ARC * iOS>=8.0 * iPhone \ iPad screen anyway ## 寻求志同道合的小伙伴 - 因本人工作忙,没有太多时间去维护MJRefresh,在此向广大框架使用者说声:非常抱歉!😞 - 现寻求志同道合的小伙伴一起维护此框架,有兴趣的小伙伴可以[发邮件](mailto:richermj123go@vip.qq.com)给我,非常感谢😊 - 如果一切OK,我将开放框架维护权限(github、pod等) - 目前已经找到3位小伙伴(^-^)V ================================================ FILE: CMPageTitleView/Pods/Masonry/LICENSE ================================================ Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/MASCompositeConstraint.h ================================================ // // MASCompositeConstraint.h // Masonry // // Created by Jonas Budelmann on 21/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASConstraint.h" #import "MASUtilities.h" /** * A group of MASConstraint objects */ @interface MASCompositeConstraint : MASConstraint /** * Creates a composite with a predefined array of children * * @param children child MASConstraints * * @return a composite constraint */ - (id)initWithChildren:(NSArray *)children; @end ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/MASCompositeConstraint.m ================================================ // // MASCompositeConstraint.m // Masonry // // Created by Jonas Budelmann on 21/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASCompositeConstraint.h" #import "MASConstraint+Private.h" @interface MASCompositeConstraint () @property (nonatomic, strong) id mas_key; @property (nonatomic, strong) NSMutableArray *childConstraints; @end @implementation MASCompositeConstraint - (id)initWithChildren:(NSArray *)children { self = [super init]; if (!self) return nil; _childConstraints = [children mutableCopy]; for (MASConstraint *constraint in _childConstraints) { constraint.delegate = self; } return self; } #pragma mark - MASConstraintDelegate - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint { NSUInteger index = [self.childConstraints indexOfObject:constraint]; NSAssert(index != NSNotFound, @"Could not find constraint %@", constraint); [self.childConstraints replaceObjectAtIndex:index withObject:replacementConstraint]; } - (MASConstraint *)constraint:(MASConstraint __unused *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { id strongDelegate = self.delegate; MASConstraint *newConstraint = [strongDelegate constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; newConstraint.delegate = self; [self.childConstraints addObject:newConstraint]; return newConstraint; } #pragma mark - NSLayoutConstraint multiplier proxies - (MASConstraint * (^)(CGFloat))multipliedBy { return ^id(CGFloat multiplier) { for (MASConstraint *constraint in self.childConstraints) { constraint.multipliedBy(multiplier); } return self; }; } - (MASConstraint * (^)(CGFloat))dividedBy { return ^id(CGFloat divider) { for (MASConstraint *constraint in self.childConstraints) { constraint.dividedBy(divider); } return self; }; } #pragma mark - MASLayoutPriority proxy - (MASConstraint * (^)(MASLayoutPriority))priority { return ^id(MASLayoutPriority priority) { for (MASConstraint *constraint in self.childConstraints) { constraint.priority(priority); } return self; }; } #pragma mark - NSLayoutRelation proxy - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation { return ^id(id attr, NSLayoutRelation relation) { for (MASConstraint *constraint in self.childConstraints.copy) { constraint.equalToWithRelation(attr, relation); } return self; }; } #pragma mark - attribute chaining - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { [self constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; return self; } #pragma mark - Animator proxy #if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV) - (MASConstraint *)animator { for (MASConstraint *constraint in self.childConstraints) { [constraint animator]; } return self; } #endif #pragma mark - debug helpers - (MASConstraint * (^)(id))key { return ^id(id key) { self.mas_key = key; int i = 0; for (MASConstraint *constraint in self.childConstraints) { constraint.key([NSString stringWithFormat:@"%@[%d]", key, i++]); } return self; }; } #pragma mark - NSLayoutConstraint constant setters - (void)setInsets:(MASEdgeInsets)insets { for (MASConstraint *constraint in self.childConstraints) { constraint.insets = insets; } } - (void)setInset:(CGFloat)inset { for (MASConstraint *constraint in self.childConstraints) { constraint.inset = inset; } } - (void)setOffset:(CGFloat)offset { for (MASConstraint *constraint in self.childConstraints) { constraint.offset = offset; } } - (void)setSizeOffset:(CGSize)sizeOffset { for (MASConstraint *constraint in self.childConstraints) { constraint.sizeOffset = sizeOffset; } } - (void)setCenterOffset:(CGPoint)centerOffset { for (MASConstraint *constraint in self.childConstraints) { constraint.centerOffset = centerOffset; } } #pragma mark - MASConstraint - (void)activate { for (MASConstraint *constraint in self.childConstraints) { [constraint activate]; } } - (void)deactivate { for (MASConstraint *constraint in self.childConstraints) { [constraint deactivate]; } } - (void)install { for (MASConstraint *constraint in self.childConstraints) { constraint.updateExisting = self.updateExisting; [constraint install]; } } - (void)uninstall { for (MASConstraint *constraint in self.childConstraints) { [constraint uninstall]; } } @end ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/MASConstraint+Private.h ================================================ // // MASConstraint+Private.h // Masonry // // Created by Nick Tymchenko on 29/04/14. // Copyright (c) 2014 cloudling. All rights reserved. // #import "MASConstraint.h" @protocol MASConstraintDelegate; @interface MASConstraint () /** * Whether or not to check for an existing constraint instead of adding constraint */ @property (nonatomic, assign) BOOL updateExisting; /** * Usually MASConstraintMaker but could be a parent MASConstraint */ @property (nonatomic, weak) id delegate; /** * Based on a provided value type, is equal to calling: * NSNumber - setOffset: * NSValue with CGPoint - setPointOffset: * NSValue with CGSize - setSizeOffset: * NSValue with MASEdgeInsets - setInsets: */ - (void)setLayoutConstantWithValue:(NSValue *)value; @end @interface MASConstraint (Abstract) /** * Sets the constraint relation to given NSLayoutRelation * returns a block which accepts one of the following: * MASViewAttribute, UIView, NSValue, NSArray * see readme for more details. */ - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation; /** * Override to set a custom chaining behaviour */ - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute; @end @protocol MASConstraintDelegate /** * Notifies the delegate when the constraint needs to be replaced with another constraint. For example * A MASViewConstraint may turn into a MASCompositeConstraint when an array is passed to one of the equality blocks */ - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint; - (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute; @end ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/MASConstraint.h ================================================ // // MASConstraint.h // Masonry // // Created by Jonas Budelmann on 22/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASUtilities.h" /** * Enables Constraints to be created with chainable syntax * Constraint can represent single NSLayoutConstraint (MASViewConstraint) * or a group of NSLayoutConstraints (MASComposisteConstraint) */ @interface MASConstraint : NSObject // Chaining Support /** * Modifies the NSLayoutConstraint constant, * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight */ - (MASConstraint * (^)(MASEdgeInsets insets))insets; /** * Modifies the NSLayoutConstraint constant, * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight */ - (MASConstraint * (^)(CGFloat inset))inset; /** * Modifies the NSLayoutConstraint constant, * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following * NSLayoutAttributeWidth, NSLayoutAttributeHeight */ - (MASConstraint * (^)(CGSize offset))sizeOffset; /** * Modifies the NSLayoutConstraint constant, * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following * NSLayoutAttributeCenterX, NSLayoutAttributeCenterY */ - (MASConstraint * (^)(CGPoint offset))centerOffset; /** * Modifies the NSLayoutConstraint constant */ - (MASConstraint * (^)(CGFloat offset))offset; /** * Modifies the NSLayoutConstraint constant based on a value type */ - (MASConstraint * (^)(NSValue *value))valueOffset; /** * Sets the NSLayoutConstraint multiplier property */ - (MASConstraint * (^)(CGFloat multiplier))multipliedBy; /** * Sets the NSLayoutConstraint multiplier to 1.0/dividedBy */ - (MASConstraint * (^)(CGFloat divider))dividedBy; /** * Sets the NSLayoutConstraint priority to a float or MASLayoutPriority */ - (MASConstraint * (^)(MASLayoutPriority priority))priority; /** * Sets the NSLayoutConstraint priority to MASLayoutPriorityLow */ - (MASConstraint * (^)(void))priorityLow; /** * Sets the NSLayoutConstraint priority to MASLayoutPriorityMedium */ - (MASConstraint * (^)(void))priorityMedium; /** * Sets the NSLayoutConstraint priority to MASLayoutPriorityHigh */ - (MASConstraint * (^)(void))priorityHigh; /** * Sets the constraint relation to NSLayoutRelationEqual * returns a block which accepts one of the following: * MASViewAttribute, UIView, NSValue, NSArray * see readme for more details. */ - (MASConstraint * (^)(id attr))equalTo; /** * Sets the constraint relation to NSLayoutRelationGreaterThanOrEqual * returns a block which accepts one of the following: * MASViewAttribute, UIView, NSValue, NSArray * see readme for more details. */ - (MASConstraint * (^)(id attr))greaterThanOrEqualTo; /** * Sets the constraint relation to NSLayoutRelationLessThanOrEqual * returns a block which accepts one of the following: * MASViewAttribute, UIView, NSValue, NSArray * see readme for more details. */ - (MASConstraint * (^)(id attr))lessThanOrEqualTo; /** * Optional semantic property which has no effect but improves the readability of constraint */ - (MASConstraint *)with; /** * Optional semantic property which has no effect but improves the readability of constraint */ - (MASConstraint *)and; /** * Creates a new MASCompositeConstraint with the called attribute and reciever */ - (MASConstraint *)left; - (MASConstraint *)top; - (MASConstraint *)right; - (MASConstraint *)bottom; - (MASConstraint *)leading; - (MASConstraint *)trailing; - (MASConstraint *)width; - (MASConstraint *)height; - (MASConstraint *)centerX; - (MASConstraint *)centerY; - (MASConstraint *)baseline; #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) - (MASConstraint *)firstBaseline; - (MASConstraint *)lastBaseline; #endif #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) - (MASConstraint *)leftMargin; - (MASConstraint *)rightMargin; - (MASConstraint *)topMargin; - (MASConstraint *)bottomMargin; - (MASConstraint *)leadingMargin; - (MASConstraint *)trailingMargin; - (MASConstraint *)centerXWithinMargins; - (MASConstraint *)centerYWithinMargins; #endif /** * Sets the constraint debug name */ - (MASConstraint * (^)(id key))key; // NSLayoutConstraint constant Setters // for use outside of mas_updateConstraints/mas_makeConstraints blocks /** * Modifies the NSLayoutConstraint constant, * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight */ - (void)setInsets:(MASEdgeInsets)insets; /** * Modifies the NSLayoutConstraint constant, * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight */ - (void)setInset:(CGFloat)inset; /** * Modifies the NSLayoutConstraint constant, * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following * NSLayoutAttributeWidth, NSLayoutAttributeHeight */ - (void)setSizeOffset:(CGSize)sizeOffset; /** * Modifies the NSLayoutConstraint constant, * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following * NSLayoutAttributeCenterX, NSLayoutAttributeCenterY */ - (void)setCenterOffset:(CGPoint)centerOffset; /** * Modifies the NSLayoutConstraint constant */ - (void)setOffset:(CGFloat)offset; // NSLayoutConstraint Installation support #if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV) /** * Whether or not to go through the animator proxy when modifying the constraint */ @property (nonatomic, copy, readonly) MASConstraint *animator; #endif /** * Activates an NSLayoutConstraint if it's supported by an OS. * Invokes install otherwise. */ - (void)activate; /** * Deactivates previously installed/activated NSLayoutConstraint. */ - (void)deactivate; /** * Creates a NSLayoutConstraint and adds it to the appropriate view. */ - (void)install; /** * Removes previously installed NSLayoutConstraint */ - (void)uninstall; @end /** * Convenience auto-boxing macros for MASConstraint methods. * * Defining MAS_SHORTHAND_GLOBALS will turn on auto-boxing for default syntax. * A potential drawback of this is that the unprefixed macros will appear in global scope. */ #define mas_equalTo(...) equalTo(MASBoxValue((__VA_ARGS__))) #define mas_greaterThanOrEqualTo(...) greaterThanOrEqualTo(MASBoxValue((__VA_ARGS__))) #define mas_lessThanOrEqualTo(...) lessThanOrEqualTo(MASBoxValue((__VA_ARGS__))) #define mas_offset(...) valueOffset(MASBoxValue((__VA_ARGS__))) #ifdef MAS_SHORTHAND_GLOBALS #define equalTo(...) mas_equalTo(__VA_ARGS__) #define greaterThanOrEqualTo(...) mas_greaterThanOrEqualTo(__VA_ARGS__) #define lessThanOrEqualTo(...) mas_lessThanOrEqualTo(__VA_ARGS__) #define offset(...) mas_offset(__VA_ARGS__) #endif @interface MASConstraint (AutoboxingSupport) /** * Aliases to corresponding relation methods (for shorthand macros) * Also needed to aid autocompletion */ - (MASConstraint * (^)(id attr))mas_equalTo; - (MASConstraint * (^)(id attr))mas_greaterThanOrEqualTo; - (MASConstraint * (^)(id attr))mas_lessThanOrEqualTo; /** * A dummy method to aid autocompletion */ - (MASConstraint * (^)(id offset))mas_offset; @end ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/MASConstraint.m ================================================ // // MASConstraint.m // Masonry // // Created by Nick Tymchenko on 1/20/14. // #import "MASConstraint.h" #import "MASConstraint+Private.h" #define MASMethodNotImplemented() \ @throw [NSException exceptionWithName:NSInternalInconsistencyException \ reason:[NSString stringWithFormat:@"You must override %@ in a subclass.", NSStringFromSelector(_cmd)] \ userInfo:nil] @implementation MASConstraint #pragma mark - Init - (id)init { NSAssert(![self isMemberOfClass:[MASConstraint class]], @"MASConstraint is an abstract class, you should not instantiate it directly."); return [super init]; } #pragma mark - NSLayoutRelation proxies - (MASConstraint * (^)(id))equalTo { return ^id(id attribute) { return self.equalToWithRelation(attribute, NSLayoutRelationEqual); }; } - (MASConstraint * (^)(id))mas_equalTo { return ^id(id attribute) { return self.equalToWithRelation(attribute, NSLayoutRelationEqual); }; } - (MASConstraint * (^)(id))greaterThanOrEqualTo { return ^id(id attribute) { return self.equalToWithRelation(attribute, NSLayoutRelationGreaterThanOrEqual); }; } - (MASConstraint * (^)(id))mas_greaterThanOrEqualTo { return ^id(id attribute) { return self.equalToWithRelation(attribute, NSLayoutRelationGreaterThanOrEqual); }; } - (MASConstraint * (^)(id))lessThanOrEqualTo { return ^id(id attribute) { return self.equalToWithRelation(attribute, NSLayoutRelationLessThanOrEqual); }; } - (MASConstraint * (^)(id))mas_lessThanOrEqualTo { return ^id(id attribute) { return self.equalToWithRelation(attribute, NSLayoutRelationLessThanOrEqual); }; } #pragma mark - MASLayoutPriority proxies - (MASConstraint * (^)(void))priorityLow { return ^id{ self.priority(MASLayoutPriorityDefaultLow); return self; }; } - (MASConstraint * (^)(void))priorityMedium { return ^id{ self.priority(MASLayoutPriorityDefaultMedium); return self; }; } - (MASConstraint * (^)(void))priorityHigh { return ^id{ self.priority(MASLayoutPriorityDefaultHigh); return self; }; } #pragma mark - NSLayoutConstraint constant proxies - (MASConstraint * (^)(MASEdgeInsets))insets { return ^id(MASEdgeInsets insets){ self.insets = insets; return self; }; } - (MASConstraint * (^)(CGFloat))inset { return ^id(CGFloat inset){ self.inset = inset; return self; }; } - (MASConstraint * (^)(CGSize))sizeOffset { return ^id(CGSize offset) { self.sizeOffset = offset; return self; }; } - (MASConstraint * (^)(CGPoint))centerOffset { return ^id(CGPoint offset) { self.centerOffset = offset; return self; }; } - (MASConstraint * (^)(CGFloat))offset { return ^id(CGFloat offset){ self.offset = offset; return self; }; } - (MASConstraint * (^)(NSValue *value))valueOffset { return ^id(NSValue *offset) { NSAssert([offset isKindOfClass:NSValue.class], @"expected an NSValue offset, got: %@", offset); [self setLayoutConstantWithValue:offset]; return self; }; } - (MASConstraint * (^)(id offset))mas_offset { // Will never be called due to macro return nil; } #pragma mark - NSLayoutConstraint constant setter - (void)setLayoutConstantWithValue:(NSValue *)value { if ([value isKindOfClass:NSNumber.class]) { self.offset = [(NSNumber *)value doubleValue]; } else if (strcmp(value.objCType, @encode(CGPoint)) == 0) { CGPoint point; [value getValue:&point]; self.centerOffset = point; } else if (strcmp(value.objCType, @encode(CGSize)) == 0) { CGSize size; [value getValue:&size]; self.sizeOffset = size; } else if (strcmp(value.objCType, @encode(MASEdgeInsets)) == 0) { MASEdgeInsets insets; [value getValue:&insets]; self.insets = insets; } else { NSAssert(NO, @"attempting to set layout constant with unsupported value: %@", value); } } #pragma mark - Semantic properties - (MASConstraint *)with { return self; } - (MASConstraint *)and { return self; } #pragma mark - Chaining - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute __unused)layoutAttribute { MASMethodNotImplemented(); } - (MASConstraint *)left { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeft]; } - (MASConstraint *)top { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTop]; } - (MASConstraint *)right { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeRight]; } - (MASConstraint *)bottom { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBottom]; } - (MASConstraint *)leading { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeading]; } - (MASConstraint *)trailing { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTrailing]; } - (MASConstraint *)width { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeWidth]; } - (MASConstraint *)height { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeHeight]; } - (MASConstraint *)centerX { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterX]; } - (MASConstraint *)centerY { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterY]; } - (MASConstraint *)baseline { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBaseline]; } #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) - (MASConstraint *)firstBaseline { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeFirstBaseline]; } - (MASConstraint *)lastBaseline { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLastBaseline]; } #endif #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) - (MASConstraint *)leftMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeftMargin]; } - (MASConstraint *)rightMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeRightMargin]; } - (MASConstraint *)topMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTopMargin]; } - (MASConstraint *)bottomMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBottomMargin]; } - (MASConstraint *)leadingMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeadingMargin]; } - (MASConstraint *)trailingMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTrailingMargin]; } - (MASConstraint *)centerXWithinMargins { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterXWithinMargins]; } - (MASConstraint *)centerYWithinMargins { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterYWithinMargins]; } #endif #pragma mark - Abstract - (MASConstraint * (^)(CGFloat multiplier))multipliedBy { MASMethodNotImplemented(); } - (MASConstraint * (^)(CGFloat divider))dividedBy { MASMethodNotImplemented(); } - (MASConstraint * (^)(MASLayoutPriority priority))priority { MASMethodNotImplemented(); } - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation { MASMethodNotImplemented(); } - (MASConstraint * (^)(id key))key { MASMethodNotImplemented(); } - (void)setInsets:(MASEdgeInsets __unused)insets { MASMethodNotImplemented(); } - (void)setInset:(CGFloat __unused)inset { MASMethodNotImplemented(); } - (void)setSizeOffset:(CGSize __unused)sizeOffset { MASMethodNotImplemented(); } - (void)setCenterOffset:(CGPoint __unused)centerOffset { MASMethodNotImplemented(); } - (void)setOffset:(CGFloat __unused)offset { MASMethodNotImplemented(); } #if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV) - (MASConstraint *)animator { MASMethodNotImplemented(); } #endif - (void)activate { MASMethodNotImplemented(); } - (void)deactivate { MASMethodNotImplemented(); } - (void)install { MASMethodNotImplemented(); } - (void)uninstall { MASMethodNotImplemented(); } @end ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/MASConstraintMaker.h ================================================ // // MASConstraintMaker.h // Masonry // // Created by Jonas Budelmann on 20/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASConstraint.h" #import "MASUtilities.h" typedef NS_OPTIONS(NSInteger, MASAttribute) { MASAttributeLeft = 1 << NSLayoutAttributeLeft, MASAttributeRight = 1 << NSLayoutAttributeRight, MASAttributeTop = 1 << NSLayoutAttributeTop, MASAttributeBottom = 1 << NSLayoutAttributeBottom, MASAttributeLeading = 1 << NSLayoutAttributeLeading, MASAttributeTrailing = 1 << NSLayoutAttributeTrailing, MASAttributeWidth = 1 << NSLayoutAttributeWidth, MASAttributeHeight = 1 << NSLayoutAttributeHeight, MASAttributeCenterX = 1 << NSLayoutAttributeCenterX, MASAttributeCenterY = 1 << NSLayoutAttributeCenterY, MASAttributeBaseline = 1 << NSLayoutAttributeBaseline, #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) MASAttributeFirstBaseline = 1 << NSLayoutAttributeFirstBaseline, MASAttributeLastBaseline = 1 << NSLayoutAttributeLastBaseline, #endif #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) MASAttributeLeftMargin = 1 << NSLayoutAttributeLeftMargin, MASAttributeRightMargin = 1 << NSLayoutAttributeRightMargin, MASAttributeTopMargin = 1 << NSLayoutAttributeTopMargin, MASAttributeBottomMargin = 1 << NSLayoutAttributeBottomMargin, MASAttributeLeadingMargin = 1 << NSLayoutAttributeLeadingMargin, MASAttributeTrailingMargin = 1 << NSLayoutAttributeTrailingMargin, MASAttributeCenterXWithinMargins = 1 << NSLayoutAttributeCenterXWithinMargins, MASAttributeCenterYWithinMargins = 1 << NSLayoutAttributeCenterYWithinMargins, #endif }; /** * Provides factory methods for creating MASConstraints. * Constraints are collected until they are ready to be installed * */ @interface MASConstraintMaker : NSObject /** * The following properties return a new MASViewConstraint * with the first item set to the makers associated view and the appropriate MASViewAttribute */ @property (nonatomic, strong, readonly) MASConstraint *left; @property (nonatomic, strong, readonly) MASConstraint *top; @property (nonatomic, strong, readonly) MASConstraint *right; @property (nonatomic, strong, readonly) MASConstraint *bottom; @property (nonatomic, strong, readonly) MASConstraint *leading; @property (nonatomic, strong, readonly) MASConstraint *trailing; @property (nonatomic, strong, readonly) MASConstraint *width; @property (nonatomic, strong, readonly) MASConstraint *height; @property (nonatomic, strong, readonly) MASConstraint *centerX; @property (nonatomic, strong, readonly) MASConstraint *centerY; @property (nonatomic, strong, readonly) MASConstraint *baseline; #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) @property (nonatomic, strong, readonly) MASConstraint *firstBaseline; @property (nonatomic, strong, readonly) MASConstraint *lastBaseline; #endif #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) @property (nonatomic, strong, readonly) MASConstraint *leftMargin; @property (nonatomic, strong, readonly) MASConstraint *rightMargin; @property (nonatomic, strong, readonly) MASConstraint *topMargin; @property (nonatomic, strong, readonly) MASConstraint *bottomMargin; @property (nonatomic, strong, readonly) MASConstraint *leadingMargin; @property (nonatomic, strong, readonly) MASConstraint *trailingMargin; @property (nonatomic, strong, readonly) MASConstraint *centerXWithinMargins; @property (nonatomic, strong, readonly) MASConstraint *centerYWithinMargins; #endif /** * Returns a block which creates a new MASCompositeConstraint with the first item set * to the makers associated view and children corresponding to the set bits in the * MASAttribute parameter. Combine multiple attributes via binary-or. */ @property (nonatomic, strong, readonly) MASConstraint *(^attributes)(MASAttribute attrs); /** * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeEdges * which generates the appropriate MASViewConstraint children (top, left, bottom, right) * with the first item set to the makers associated view */ @property (nonatomic, strong, readonly) MASConstraint *edges; /** * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeSize * which generates the appropriate MASViewConstraint children (width, height) * with the first item set to the makers associated view */ @property (nonatomic, strong, readonly) MASConstraint *size; /** * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeCenter * which generates the appropriate MASViewConstraint children (centerX, centerY) * with the first item set to the makers associated view */ @property (nonatomic, strong, readonly) MASConstraint *center; /** * Whether or not to check for an existing constraint instead of adding constraint */ @property (nonatomic, assign) BOOL updateExisting; /** * Whether or not to remove existing constraints prior to installing */ @property (nonatomic, assign) BOOL removeExisting; /** * initialises the maker with a default view * * @param view any MASConstraint are created with this view as the first item * * @return a new MASConstraintMaker */ - (id)initWithView:(MAS_VIEW *)view; /** * Calls install method on any MASConstraints which have been created by this maker * * @return an array of all the installed MASConstraints */ - (NSArray *)install; - (MASConstraint * (^)(dispatch_block_t))group; @end ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/MASConstraintMaker.m ================================================ // // MASConstraintMaker.m // Masonry // // Created by Jonas Budelmann on 20/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASConstraintMaker.h" #import "MASViewConstraint.h" #import "MASCompositeConstraint.h" #import "MASConstraint+Private.h" #import "MASViewAttribute.h" #import "View+MASAdditions.h" @interface MASConstraintMaker () @property (nonatomic, weak) MAS_VIEW *view; @property (nonatomic, strong) NSMutableArray *constraints; @end @implementation MASConstraintMaker - (id)initWithView:(MAS_VIEW *)view { self = [super init]; if (!self) return nil; self.view = view; self.constraints = NSMutableArray.new; return self; } - (NSArray *)install { if (self.removeExisting) { NSArray *installedConstraints = [MASViewConstraint installedConstraintsForView:self.view]; for (MASConstraint *constraint in installedConstraints) { [constraint uninstall]; } } NSArray *constraints = self.constraints.copy; for (MASConstraint *constraint in constraints) { constraint.updateExisting = self.updateExisting; [constraint install]; } [self.constraints removeAllObjects]; return constraints; } #pragma mark - MASConstraintDelegate - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint { NSUInteger index = [self.constraints indexOfObject:constraint]; NSAssert(index != NSNotFound, @"Could not find constraint %@", constraint); [self.constraints replaceObjectAtIndex:index withObject:replacementConstraint]; } - (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { MASViewAttribute *viewAttribute = [[MASViewAttribute alloc] initWithView:self.view layoutAttribute:layoutAttribute]; MASViewConstraint *newConstraint = [[MASViewConstraint alloc] initWithFirstViewAttribute:viewAttribute]; if ([constraint isKindOfClass:MASViewConstraint.class]) { //replace with composite constraint NSArray *children = @[constraint, newConstraint]; MASCompositeConstraint *compositeConstraint = [[MASCompositeConstraint alloc] initWithChildren:children]; compositeConstraint.delegate = self; [self constraint:constraint shouldBeReplacedWithConstraint:compositeConstraint]; return compositeConstraint; } if (!constraint) { newConstraint.delegate = self; [self.constraints addObject:newConstraint]; } return newConstraint; } - (MASConstraint *)addConstraintWithAttributes:(MASAttribute)attrs { __unused MASAttribute anyAttribute = (MASAttributeLeft | MASAttributeRight | MASAttributeTop | MASAttributeBottom | MASAttributeLeading | MASAttributeTrailing | MASAttributeWidth | MASAttributeHeight | MASAttributeCenterX | MASAttributeCenterY | MASAttributeBaseline #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) | MASAttributeFirstBaseline | MASAttributeLastBaseline #endif #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) | MASAttributeLeftMargin | MASAttributeRightMargin | MASAttributeTopMargin | MASAttributeBottomMargin | MASAttributeLeadingMargin | MASAttributeTrailingMargin | MASAttributeCenterXWithinMargins | MASAttributeCenterYWithinMargins #endif ); NSAssert((attrs & anyAttribute) != 0, @"You didn't pass any attribute to make.attributes(...)"); NSMutableArray *attributes = [NSMutableArray array]; if (attrs & MASAttributeLeft) [attributes addObject:self.view.mas_left]; if (attrs & MASAttributeRight) [attributes addObject:self.view.mas_right]; if (attrs & MASAttributeTop) [attributes addObject:self.view.mas_top]; if (attrs & MASAttributeBottom) [attributes addObject:self.view.mas_bottom]; if (attrs & MASAttributeLeading) [attributes addObject:self.view.mas_leading]; if (attrs & MASAttributeTrailing) [attributes addObject:self.view.mas_trailing]; if (attrs & MASAttributeWidth) [attributes addObject:self.view.mas_width]; if (attrs & MASAttributeHeight) [attributes addObject:self.view.mas_height]; if (attrs & MASAttributeCenterX) [attributes addObject:self.view.mas_centerX]; if (attrs & MASAttributeCenterY) [attributes addObject:self.view.mas_centerY]; if (attrs & MASAttributeBaseline) [attributes addObject:self.view.mas_baseline]; #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) if (attrs & MASAttributeFirstBaseline) [attributes addObject:self.view.mas_firstBaseline]; if (attrs & MASAttributeLastBaseline) [attributes addObject:self.view.mas_lastBaseline]; #endif #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) if (attrs & MASAttributeLeftMargin) [attributes addObject:self.view.mas_leftMargin]; if (attrs & MASAttributeRightMargin) [attributes addObject:self.view.mas_rightMargin]; if (attrs & MASAttributeTopMargin) [attributes addObject:self.view.mas_topMargin]; if (attrs & MASAttributeBottomMargin) [attributes addObject:self.view.mas_bottomMargin]; if (attrs & MASAttributeLeadingMargin) [attributes addObject:self.view.mas_leadingMargin]; if (attrs & MASAttributeTrailingMargin) [attributes addObject:self.view.mas_trailingMargin]; if (attrs & MASAttributeCenterXWithinMargins) [attributes addObject:self.view.mas_centerXWithinMargins]; if (attrs & MASAttributeCenterYWithinMargins) [attributes addObject:self.view.mas_centerYWithinMargins]; #endif NSMutableArray *children = [NSMutableArray arrayWithCapacity:attributes.count]; for (MASViewAttribute *a in attributes) { [children addObject:[[MASViewConstraint alloc] initWithFirstViewAttribute:a]]; } MASCompositeConstraint *constraint = [[MASCompositeConstraint alloc] initWithChildren:children]; constraint.delegate = self; [self.constraints addObject:constraint]; return constraint; } #pragma mark - standard Attributes - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { return [self constraint:nil addConstraintWithLayoutAttribute:layoutAttribute]; } - (MASConstraint *)left { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeft]; } - (MASConstraint *)top { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTop]; } - (MASConstraint *)right { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeRight]; } - (MASConstraint *)bottom { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBottom]; } - (MASConstraint *)leading { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeading]; } - (MASConstraint *)trailing { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTrailing]; } - (MASConstraint *)width { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeWidth]; } - (MASConstraint *)height { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeHeight]; } - (MASConstraint *)centerX { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterX]; } - (MASConstraint *)centerY { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterY]; } - (MASConstraint *)baseline { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBaseline]; } - (MASConstraint *(^)(MASAttribute))attributes { return ^(MASAttribute attrs){ return [self addConstraintWithAttributes:attrs]; }; } #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) - (MASConstraint *)firstBaseline { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeFirstBaseline]; } - (MASConstraint *)lastBaseline { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLastBaseline]; } #endif #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) - (MASConstraint *)leftMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeftMargin]; } - (MASConstraint *)rightMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeRightMargin]; } - (MASConstraint *)topMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTopMargin]; } - (MASConstraint *)bottomMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBottomMargin]; } - (MASConstraint *)leadingMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeadingMargin]; } - (MASConstraint *)trailingMargin { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTrailingMargin]; } - (MASConstraint *)centerXWithinMargins { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterXWithinMargins]; } - (MASConstraint *)centerYWithinMargins { return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterYWithinMargins]; } #endif #pragma mark - composite Attributes - (MASConstraint *)edges { return [self addConstraintWithAttributes:MASAttributeTop | MASAttributeLeft | MASAttributeRight | MASAttributeBottom]; } - (MASConstraint *)size { return [self addConstraintWithAttributes:MASAttributeWidth | MASAttributeHeight]; } - (MASConstraint *)center { return [self addConstraintWithAttributes:MASAttributeCenterX | MASAttributeCenterY]; } #pragma mark - grouping - (MASConstraint *(^)(dispatch_block_t group))group { return ^id(dispatch_block_t group) { NSInteger previousCount = self.constraints.count; group(); NSArray *children = [self.constraints subarrayWithRange:NSMakeRange(previousCount, self.constraints.count - previousCount)]; MASCompositeConstraint *constraint = [[MASCompositeConstraint alloc] initWithChildren:children]; constraint.delegate = self; return constraint; }; } @end ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/MASLayoutConstraint.h ================================================ // // MASLayoutConstraint.h // Masonry // // Created by Jonas Budelmann on 3/08/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "MASUtilities.h" /** * When you are debugging or printing the constraints attached to a view this subclass * makes it easier to identify which constraints have been created via Masonry */ @interface MASLayoutConstraint : NSLayoutConstraint /** * a key to associate with this constraint */ @property (nonatomic, strong) id mas_key; @end ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/MASLayoutConstraint.m ================================================ // // MASLayoutConstraint.m // Masonry // // Created by Jonas Budelmann on 3/08/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "MASLayoutConstraint.h" @implementation MASLayoutConstraint @end ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/MASUtilities.h ================================================ // // MASUtilities.h // Masonry // // Created by Jonas Budelmann on 19/08/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import #if TARGET_OS_IPHONE || TARGET_OS_TV #import #define MAS_VIEW UIView #define MAS_VIEW_CONTROLLER UIViewController #define MASEdgeInsets UIEdgeInsets typedef UILayoutPriority MASLayoutPriority; static const MASLayoutPriority MASLayoutPriorityRequired = UILayoutPriorityRequired; static const MASLayoutPriority MASLayoutPriorityDefaultHigh = UILayoutPriorityDefaultHigh; static const MASLayoutPriority MASLayoutPriorityDefaultMedium = 500; static const MASLayoutPriority MASLayoutPriorityDefaultLow = UILayoutPriorityDefaultLow; static const MASLayoutPriority MASLayoutPriorityFittingSizeLevel = UILayoutPriorityFittingSizeLevel; #elif TARGET_OS_MAC #import #define MAS_VIEW NSView #define MASEdgeInsets NSEdgeInsets typedef NSLayoutPriority MASLayoutPriority; static const MASLayoutPriority MASLayoutPriorityRequired = NSLayoutPriorityRequired; static const MASLayoutPriority MASLayoutPriorityDefaultHigh = NSLayoutPriorityDefaultHigh; static const MASLayoutPriority MASLayoutPriorityDragThatCanResizeWindow = NSLayoutPriorityDragThatCanResizeWindow; static const MASLayoutPriority MASLayoutPriorityDefaultMedium = 501; static const MASLayoutPriority MASLayoutPriorityWindowSizeStayPut = NSLayoutPriorityWindowSizeStayPut; static const MASLayoutPriority MASLayoutPriorityDragThatCannotResizeWindow = NSLayoutPriorityDragThatCannotResizeWindow; static const MASLayoutPriority MASLayoutPriorityDefaultLow = NSLayoutPriorityDefaultLow; static const MASLayoutPriority MASLayoutPriorityFittingSizeCompression = NSLayoutPriorityFittingSizeCompression; #endif /** * Allows you to attach keys to objects matching the variable names passed. * * view1.mas_key = @"view1", view2.mas_key = @"view2"; * * is equivalent to: * * MASAttachKeys(view1, view2); */ #define MASAttachKeys(...) \ { \ NSDictionary *keyPairs = NSDictionaryOfVariableBindings(__VA_ARGS__); \ for (id key in keyPairs.allKeys) { \ id obj = keyPairs[key]; \ NSAssert([obj respondsToSelector:@selector(setMas_key:)], \ @"Cannot attach mas_key to %@", obj); \ [obj setMas_key:key]; \ } \ } /** * Used to create object hashes * Based on http://www.mikeash.com/pyblog/friday-qa-2010-06-18-implementing-equality-and-hashing.html */ #define MAS_NSUINT_BIT (CHAR_BIT * sizeof(NSUInteger)) #define MAS_NSUINTROTATE(val, howmuch) ((((NSUInteger)val) << howmuch) | (((NSUInteger)val) >> (MAS_NSUINT_BIT - howmuch))) /** * Given a scalar or struct value, wraps it in NSValue * Based on EXPObjectify: https://github.com/specta/expecta */ static inline id _MASBoxValue(const char *type, ...) { va_list v; va_start(v, type); id obj = nil; if (strcmp(type, @encode(id)) == 0) { id actual = va_arg(v, id); obj = actual; } else if (strcmp(type, @encode(CGPoint)) == 0) { CGPoint actual = (CGPoint)va_arg(v, CGPoint); obj = [NSValue value:&actual withObjCType:type]; } else if (strcmp(type, @encode(CGSize)) == 0) { CGSize actual = (CGSize)va_arg(v, CGSize); obj = [NSValue value:&actual withObjCType:type]; } else if (strcmp(type, @encode(MASEdgeInsets)) == 0) { MASEdgeInsets actual = (MASEdgeInsets)va_arg(v, MASEdgeInsets); obj = [NSValue value:&actual withObjCType:type]; } else if (strcmp(type, @encode(double)) == 0) { double actual = (double)va_arg(v, double); obj = [NSNumber numberWithDouble:actual]; } else if (strcmp(type, @encode(float)) == 0) { float actual = (float)va_arg(v, double); obj = [NSNumber numberWithFloat:actual]; } else if (strcmp(type, @encode(int)) == 0) { int actual = (int)va_arg(v, int); obj = [NSNumber numberWithInt:actual]; } else if (strcmp(type, @encode(long)) == 0) { long actual = (long)va_arg(v, long); obj = [NSNumber numberWithLong:actual]; } else if (strcmp(type, @encode(long long)) == 0) { long long actual = (long long)va_arg(v, long long); obj = [NSNumber numberWithLongLong:actual]; } else if (strcmp(type, @encode(short)) == 0) { short actual = (short)va_arg(v, int); obj = [NSNumber numberWithShort:actual]; } else if (strcmp(type, @encode(char)) == 0) { char actual = (char)va_arg(v, int); obj = [NSNumber numberWithChar:actual]; } else if (strcmp(type, @encode(bool)) == 0) { bool actual = (bool)va_arg(v, int); obj = [NSNumber numberWithBool:actual]; } else if (strcmp(type, @encode(unsigned char)) == 0) { unsigned char actual = (unsigned char)va_arg(v, unsigned int); obj = [NSNumber numberWithUnsignedChar:actual]; } else if (strcmp(type, @encode(unsigned int)) == 0) { unsigned int actual = (unsigned int)va_arg(v, unsigned int); obj = [NSNumber numberWithUnsignedInt:actual]; } else if (strcmp(type, @encode(unsigned long)) == 0) { unsigned long actual = (unsigned long)va_arg(v, unsigned long); obj = [NSNumber numberWithUnsignedLong:actual]; } else if (strcmp(type, @encode(unsigned long long)) == 0) { unsigned long long actual = (unsigned long long)va_arg(v, unsigned long long); obj = [NSNumber numberWithUnsignedLongLong:actual]; } else if (strcmp(type, @encode(unsigned short)) == 0) { unsigned short actual = (unsigned short)va_arg(v, unsigned int); obj = [NSNumber numberWithUnsignedShort:actual]; } va_end(v); return obj; } #define MASBoxValue(value) _MASBoxValue(@encode(__typeof__((value))), (value)) ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/MASViewAttribute.h ================================================ // // MASViewAttribute.h // Masonry // // Created by Jonas Budelmann on 21/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASUtilities.h" /** * An immutable tuple which stores the view and the related NSLayoutAttribute. * Describes part of either the left or right hand side of a constraint equation */ @interface MASViewAttribute : NSObject /** * The view which the reciever relates to. Can be nil if item is not a view. */ @property (nonatomic, weak, readonly) MAS_VIEW *view; /** * The item which the reciever relates to. */ @property (nonatomic, weak, readonly) id item; /** * The attribute which the reciever relates to */ @property (nonatomic, assign, readonly) NSLayoutAttribute layoutAttribute; /** * Convenience initializer. */ - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute; /** * The designated initializer. */ - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute; /** * Determine whether the layoutAttribute is a size attribute * * @return YES if layoutAttribute is equal to NSLayoutAttributeWidth or NSLayoutAttributeHeight */ - (BOOL)isSizeAttribute; @end ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/MASViewAttribute.m ================================================ // // MASViewAttribute.m // Masonry // // Created by Jonas Budelmann on 21/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASViewAttribute.h" @implementation MASViewAttribute - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute { self = [self initWithView:view item:view layoutAttribute:layoutAttribute]; return self; } - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute { self = [super init]; if (!self) return nil; _view = view; _item = item; _layoutAttribute = layoutAttribute; return self; } - (BOOL)isSizeAttribute { return self.layoutAttribute == NSLayoutAttributeWidth || self.layoutAttribute == NSLayoutAttributeHeight; } - (BOOL)isEqual:(MASViewAttribute *)viewAttribute { if ([viewAttribute isKindOfClass:self.class]) { return self.view == viewAttribute.view && self.layoutAttribute == viewAttribute.layoutAttribute; } return [super isEqual:viewAttribute]; } - (NSUInteger)hash { return MAS_NSUINTROTATE([self.view hash], MAS_NSUINT_BIT / 2) ^ self.layoutAttribute; } @end ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/MASViewConstraint.h ================================================ // // MASViewConstraint.h // Masonry // // Created by Jonas Budelmann on 20/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASViewAttribute.h" #import "MASConstraint.h" #import "MASLayoutConstraint.h" #import "MASUtilities.h" /** * A single constraint. * Contains the attributes neccessary for creating a NSLayoutConstraint and adding it to the appropriate view */ @interface MASViewConstraint : MASConstraint /** * First item/view and first attribute of the NSLayoutConstraint */ @property (nonatomic, strong, readonly) MASViewAttribute *firstViewAttribute; /** * Second item/view and second attribute of the NSLayoutConstraint */ @property (nonatomic, strong, readonly) MASViewAttribute *secondViewAttribute; /** * initialises the MASViewConstraint with the first part of the equation * * @param firstViewAttribute view.mas_left, view.mas_width etc. * * @return a new view constraint */ - (id)initWithFirstViewAttribute:(MASViewAttribute *)firstViewAttribute; /** * Returns all MASViewConstraints installed with this view as a first item. * * @param view A view to retrieve constraints for. * * @return An array of MASViewConstraints. */ + (NSArray *)installedConstraintsForView:(MAS_VIEW *)view; @end ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/MASViewConstraint.m ================================================ // // MASViewConstraint.m // Masonry // // Created by Jonas Budelmann on 20/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASViewConstraint.h" #import "MASConstraint+Private.h" #import "MASCompositeConstraint.h" #import "MASLayoutConstraint.h" #import "View+MASAdditions.h" #import @interface MAS_VIEW (MASConstraints) @property (nonatomic, readonly) NSMutableSet *mas_installedConstraints; @end @implementation MAS_VIEW (MASConstraints) static char kInstalledConstraintsKey; - (NSMutableSet *)mas_installedConstraints { NSMutableSet *constraints = objc_getAssociatedObject(self, &kInstalledConstraintsKey); if (!constraints) { constraints = [NSMutableSet set]; objc_setAssociatedObject(self, &kInstalledConstraintsKey, constraints, OBJC_ASSOCIATION_RETAIN_NONATOMIC); } return constraints; } @end @interface MASViewConstraint () @property (nonatomic, strong, readwrite) MASViewAttribute *secondViewAttribute; @property (nonatomic, weak) MAS_VIEW *installedView; @property (nonatomic, weak) MASLayoutConstraint *layoutConstraint; @property (nonatomic, assign) NSLayoutRelation layoutRelation; @property (nonatomic, assign) MASLayoutPriority layoutPriority; @property (nonatomic, assign) CGFloat layoutMultiplier; @property (nonatomic, assign) CGFloat layoutConstant; @property (nonatomic, assign) BOOL hasLayoutRelation; @property (nonatomic, strong) id mas_key; @property (nonatomic, assign) BOOL useAnimator; @end @implementation MASViewConstraint - (id)initWithFirstViewAttribute:(MASViewAttribute *)firstViewAttribute { self = [super init]; if (!self) return nil; _firstViewAttribute = firstViewAttribute; self.layoutPriority = MASLayoutPriorityRequired; self.layoutMultiplier = 1; return self; } #pragma mark - NSCoping - (id)copyWithZone:(NSZone __unused *)zone { MASViewConstraint *constraint = [[MASViewConstraint alloc] initWithFirstViewAttribute:self.firstViewAttribute]; constraint.layoutConstant = self.layoutConstant; constraint.layoutRelation = self.layoutRelation; constraint.layoutPriority = self.layoutPriority; constraint.layoutMultiplier = self.layoutMultiplier; constraint.delegate = self.delegate; return constraint; } #pragma mark - Public + (NSArray *)installedConstraintsForView:(MAS_VIEW *)view { return [view.mas_installedConstraints allObjects]; } #pragma mark - Private - (void)setLayoutConstant:(CGFloat)layoutConstant { _layoutConstant = layoutConstant; #if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV) if (self.useAnimator) { [self.layoutConstraint.animator setConstant:layoutConstant]; } else { self.layoutConstraint.constant = layoutConstant; } #else self.layoutConstraint.constant = layoutConstant; #endif } - (void)setLayoutRelation:(NSLayoutRelation)layoutRelation { _layoutRelation = layoutRelation; self.hasLayoutRelation = YES; } - (BOOL)supportsActiveProperty { return [self.layoutConstraint respondsToSelector:@selector(isActive)]; } - (BOOL)isActive { BOOL active = YES; if ([self supportsActiveProperty]) { active = [self.layoutConstraint isActive]; } return active; } - (BOOL)hasBeenInstalled { return (self.layoutConstraint != nil) && [self isActive]; } - (void)setSecondViewAttribute:(id)secondViewAttribute { if ([secondViewAttribute isKindOfClass:NSValue.class]) { [self setLayoutConstantWithValue:secondViewAttribute]; } else if ([secondViewAttribute isKindOfClass:MAS_VIEW.class]) { _secondViewAttribute = [[MASViewAttribute alloc] initWithView:secondViewAttribute layoutAttribute:self.firstViewAttribute.layoutAttribute]; } else if ([secondViewAttribute isKindOfClass:MASViewAttribute.class]) { _secondViewAttribute = secondViewAttribute; } else { NSAssert(NO, @"attempting to add unsupported attribute: %@", secondViewAttribute); } } #pragma mark - NSLayoutConstraint multiplier proxies - (MASConstraint * (^)(CGFloat))multipliedBy { return ^id(CGFloat multiplier) { NSAssert(!self.hasBeenInstalled, @"Cannot modify constraint multiplier after it has been installed"); self.layoutMultiplier = multiplier; return self; }; } - (MASConstraint * (^)(CGFloat))dividedBy { return ^id(CGFloat divider) { NSAssert(!self.hasBeenInstalled, @"Cannot modify constraint multiplier after it has been installed"); self.layoutMultiplier = 1.0/divider; return self; }; } #pragma mark - MASLayoutPriority proxy - (MASConstraint * (^)(MASLayoutPriority))priority { return ^id(MASLayoutPriority priority) { NSAssert(!self.hasBeenInstalled, @"Cannot modify constraint priority after it has been installed"); self.layoutPriority = priority; return self; }; } #pragma mark - NSLayoutRelation proxy - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation { return ^id(id attribute, NSLayoutRelation relation) { if ([attribute isKindOfClass:NSArray.class]) { NSAssert(!self.hasLayoutRelation, @"Redefinition of constraint relation"); NSMutableArray *children = NSMutableArray.new; for (id attr in attribute) { MASViewConstraint *viewConstraint = [self copy]; viewConstraint.layoutRelation = relation; viewConstraint.secondViewAttribute = attr; [children addObject:viewConstraint]; } MASCompositeConstraint *compositeConstraint = [[MASCompositeConstraint alloc] initWithChildren:children]; compositeConstraint.delegate = self.delegate; [self.delegate constraint:self shouldBeReplacedWithConstraint:compositeConstraint]; return compositeConstraint; } else { NSAssert(!self.hasLayoutRelation || self.layoutRelation == relation && [attribute isKindOfClass:NSValue.class], @"Redefinition of constraint relation"); self.layoutRelation = relation; self.secondViewAttribute = attribute; return self; } }; } #pragma mark - Semantic properties - (MASConstraint *)with { return self; } - (MASConstraint *)and { return self; } #pragma mark - attribute chaining - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { NSAssert(!self.hasLayoutRelation, @"Attributes should be chained before defining the constraint relation"); return [self.delegate constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; } #pragma mark - Animator proxy #if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV) - (MASConstraint *)animator { self.useAnimator = YES; return self; } #endif #pragma mark - debug helpers - (MASConstraint * (^)(id))key { return ^id(id key) { self.mas_key = key; return self; }; } #pragma mark - NSLayoutConstraint constant setters - (void)setInsets:(MASEdgeInsets)insets { NSLayoutAttribute layoutAttribute = self.firstViewAttribute.layoutAttribute; switch (layoutAttribute) { case NSLayoutAttributeLeft: case NSLayoutAttributeLeading: self.layoutConstant = insets.left; break; case NSLayoutAttributeTop: self.layoutConstant = insets.top; break; case NSLayoutAttributeBottom: self.layoutConstant = -insets.bottom; break; case NSLayoutAttributeRight: case NSLayoutAttributeTrailing: self.layoutConstant = -insets.right; break; default: break; } } - (void)setInset:(CGFloat)inset { [self setInsets:(MASEdgeInsets){.top = inset, .left = inset, .bottom = inset, .right = inset}]; } - (void)setOffset:(CGFloat)offset { self.layoutConstant = offset; } - (void)setSizeOffset:(CGSize)sizeOffset { NSLayoutAttribute layoutAttribute = self.firstViewAttribute.layoutAttribute; switch (layoutAttribute) { case NSLayoutAttributeWidth: self.layoutConstant = sizeOffset.width; break; case NSLayoutAttributeHeight: self.layoutConstant = sizeOffset.height; break; default: break; } } - (void)setCenterOffset:(CGPoint)centerOffset { NSLayoutAttribute layoutAttribute = self.firstViewAttribute.layoutAttribute; switch (layoutAttribute) { case NSLayoutAttributeCenterX: self.layoutConstant = centerOffset.x; break; case NSLayoutAttributeCenterY: self.layoutConstant = centerOffset.y; break; default: break; } } #pragma mark - MASConstraint - (void)activate { [self install]; } - (void)deactivate { [self uninstall]; } - (void)install { if (self.hasBeenInstalled) { return; } if ([self supportsActiveProperty] && self.layoutConstraint) { self.layoutConstraint.active = YES; [self.firstViewAttribute.view.mas_installedConstraints addObject:self]; return; } MAS_VIEW *firstLayoutItem = self.firstViewAttribute.item; NSLayoutAttribute firstLayoutAttribute = self.firstViewAttribute.layoutAttribute; MAS_VIEW *secondLayoutItem = self.secondViewAttribute.item; NSLayoutAttribute secondLayoutAttribute = self.secondViewAttribute.layoutAttribute; // alignment attributes must have a secondViewAttribute // therefore we assume that is refering to superview // eg make.left.equalTo(@10) if (!self.firstViewAttribute.isSizeAttribute && !self.secondViewAttribute) { secondLayoutItem = self.firstViewAttribute.view.superview; secondLayoutAttribute = firstLayoutAttribute; } MASLayoutConstraint *layoutConstraint = [MASLayoutConstraint constraintWithItem:firstLayoutItem attribute:firstLayoutAttribute relatedBy:self.layoutRelation toItem:secondLayoutItem attribute:secondLayoutAttribute multiplier:self.layoutMultiplier constant:self.layoutConstant]; layoutConstraint.priority = self.layoutPriority; layoutConstraint.mas_key = self.mas_key; if (self.secondViewAttribute.view) { MAS_VIEW *closestCommonSuperview = [self.firstViewAttribute.view mas_closestCommonSuperview:self.secondViewAttribute.view]; NSAssert(closestCommonSuperview, @"couldn't find a common superview for %@ and %@", self.firstViewAttribute.view, self.secondViewAttribute.view); self.installedView = closestCommonSuperview; } else if (self.firstViewAttribute.isSizeAttribute) { self.installedView = self.firstViewAttribute.view; } else { self.installedView = self.firstViewAttribute.view.superview; } MASLayoutConstraint *existingConstraint = nil; if (self.updateExisting) { existingConstraint = [self layoutConstraintSimilarTo:layoutConstraint]; } if (existingConstraint) { // just update the constant existingConstraint.constant = layoutConstraint.constant; self.layoutConstraint = existingConstraint; } else { [self.installedView addConstraint:layoutConstraint]; self.layoutConstraint = layoutConstraint; [firstLayoutItem.mas_installedConstraints addObject:self]; } } - (MASLayoutConstraint *)layoutConstraintSimilarTo:(MASLayoutConstraint *)layoutConstraint { // check if any constraints are the same apart from the only mutable property constant // go through constraints in reverse as we do not want to match auto-resizing or interface builder constraints // and they are likely to be added first. for (NSLayoutConstraint *existingConstraint in self.installedView.constraints.reverseObjectEnumerator) { if (![existingConstraint isKindOfClass:MASLayoutConstraint.class]) continue; if (existingConstraint.firstItem != layoutConstraint.firstItem) continue; if (existingConstraint.secondItem != layoutConstraint.secondItem) continue; if (existingConstraint.firstAttribute != layoutConstraint.firstAttribute) continue; if (existingConstraint.secondAttribute != layoutConstraint.secondAttribute) continue; if (existingConstraint.relation != layoutConstraint.relation) continue; if (existingConstraint.multiplier != layoutConstraint.multiplier) continue; if (existingConstraint.priority != layoutConstraint.priority) continue; return (id)existingConstraint; } return nil; } - (void)uninstall { if ([self supportsActiveProperty]) { self.layoutConstraint.active = NO; [self.firstViewAttribute.view.mas_installedConstraints removeObject:self]; return; } [self.installedView removeConstraint:self.layoutConstraint]; self.layoutConstraint = nil; self.installedView = nil; [self.firstViewAttribute.view.mas_installedConstraints removeObject:self]; } @end ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/Masonry.h ================================================ // // Masonry.h // Masonry // // Created by Jonas Budelmann on 20/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import //! Project version number for Masonry. FOUNDATION_EXPORT double MasonryVersionNumber; //! Project version string for Masonry. FOUNDATION_EXPORT const unsigned char MasonryVersionString[]; #import "MASUtilities.h" #import "View+MASAdditions.h" #import "View+MASShorthandAdditions.h" #import "ViewController+MASAdditions.h" #import "NSArray+MASAdditions.h" #import "NSArray+MASShorthandAdditions.h" #import "MASConstraint.h" #import "MASCompositeConstraint.h" #import "MASViewAttribute.h" #import "MASViewConstraint.h" #import "MASConstraintMaker.h" #import "MASLayoutConstraint.h" #import "NSLayoutConstraint+MASDebugAdditions.h" ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/NSArray+MASAdditions.h ================================================ // // NSArray+MASAdditions.h // // // Created by Daniel Hammond on 11/26/13. // // #import "MASUtilities.h" #import "MASConstraintMaker.h" #import "MASViewAttribute.h" typedef NS_ENUM(NSUInteger, MASAxisType) { MASAxisTypeHorizontal, MASAxisTypeVertical }; @interface NSArray (MASAdditions) /** * Creates a MASConstraintMaker with each view in the callee. * Any constraints defined are added to the view or the appropriate superview once the block has finished executing on each view * * @param block scope within which you can build up the constraints which you wish to apply to each view. * * @return Array of created MASConstraints */ - (NSArray *)mas_makeConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; /** * Creates a MASConstraintMaker with each view in the callee. * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view. * If an existing constraint exists then it will be updated instead. * * @param block scope within which you can build up the constraints which you wish to apply to each view. * * @return Array of created/updated MASConstraints */ - (NSArray *)mas_updateConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; /** * Creates a MASConstraintMaker with each view in the callee. * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view. * All constraints previously installed for the views will be removed. * * @param block scope within which you can build up the constraints which you wish to apply to each view. * * @return Array of created/updated MASConstraints */ - (NSArray *)mas_remakeConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; /** * distribute with fixed spacing * * @param axisType which axis to distribute items along * @param fixedSpacing the spacing between each item * @param leadSpacing the spacing before the first item and the container * @param tailSpacing the spacing after the last item and the container */ - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedSpacing:(CGFloat)fixedSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing; /** * distribute with fixed item size * * @param axisType which axis to distribute items along * @param fixedItemLength the fixed length of each item * @param leadSpacing the spacing before the first item and the container * @param tailSpacing the spacing after the last item and the container */ - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedItemLength:(CGFloat)fixedItemLength leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing; @end ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/NSArray+MASAdditions.m ================================================ // // NSArray+MASAdditions.m // // // Created by Daniel Hammond on 11/26/13. // // #import "NSArray+MASAdditions.h" #import "View+MASAdditions.h" @implementation NSArray (MASAdditions) - (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *make))block { NSMutableArray *constraints = [NSMutableArray array]; for (MAS_VIEW *view in self) { NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views"); [constraints addObjectsFromArray:[view mas_makeConstraints:block]]; } return constraints; } - (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *make))block { NSMutableArray *constraints = [NSMutableArray array]; for (MAS_VIEW *view in self) { NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views"); [constraints addObjectsFromArray:[view mas_updateConstraints:block]]; } return constraints; } - (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block { NSMutableArray *constraints = [NSMutableArray array]; for (MAS_VIEW *view in self) { NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views"); [constraints addObjectsFromArray:[view mas_remakeConstraints:block]]; } return constraints; } - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedSpacing:(CGFloat)fixedSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing { if (self.count < 2) { NSAssert(self.count>1,@"views to distribute need to bigger than one"); return; } MAS_VIEW *tempSuperView = [self mas_commonSuperviewOfViews]; if (axisType == MASAxisTypeHorizontal) { MAS_VIEW *prev; for (int i = 0; i < self.count; i++) { MAS_VIEW *v = self[i]; [v mas_makeConstraints:^(MASConstraintMaker *make) { if (prev) { make.width.equalTo(prev); make.left.equalTo(prev.mas_right).offset(fixedSpacing); if (i == self.count - 1) {//last one make.right.equalTo(tempSuperView).offset(-tailSpacing); } } else {//first one make.left.equalTo(tempSuperView).offset(leadSpacing); } }]; prev = v; } } else { MAS_VIEW *prev; for (int i = 0; i < self.count; i++) { MAS_VIEW *v = self[i]; [v mas_makeConstraints:^(MASConstraintMaker *make) { if (prev) { make.height.equalTo(prev); make.top.equalTo(prev.mas_bottom).offset(fixedSpacing); if (i == self.count - 1) {//last one make.bottom.equalTo(tempSuperView).offset(-tailSpacing); } } else {//first one make.top.equalTo(tempSuperView).offset(leadSpacing); } }]; prev = v; } } } - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedItemLength:(CGFloat)fixedItemLength leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing { if (self.count < 2) { NSAssert(self.count>1,@"views to distribute need to bigger than one"); return; } MAS_VIEW *tempSuperView = [self mas_commonSuperviewOfViews]; if (axisType == MASAxisTypeHorizontal) { MAS_VIEW *prev; for (int i = 0; i < self.count; i++) { MAS_VIEW *v = self[i]; [v mas_makeConstraints:^(MASConstraintMaker *make) { make.width.equalTo(@(fixedItemLength)); if (prev) { if (i == self.count - 1) {//last one make.right.equalTo(tempSuperView).offset(-tailSpacing); } else { CGFloat offset = (1-(i/((CGFloat)self.count-1)))*(fixedItemLength+leadSpacing)-i*tailSpacing/(((CGFloat)self.count-1)); make.right.equalTo(tempSuperView).multipliedBy(i/((CGFloat)self.count-1)).with.offset(offset); } } else {//first one make.left.equalTo(tempSuperView).offset(leadSpacing); } }]; prev = v; } } else { MAS_VIEW *prev; for (int i = 0; i < self.count; i++) { MAS_VIEW *v = self[i]; [v mas_makeConstraints:^(MASConstraintMaker *make) { make.height.equalTo(@(fixedItemLength)); if (prev) { if (i == self.count - 1) {//last one make.bottom.equalTo(tempSuperView).offset(-tailSpacing); } else { CGFloat offset = (1-(i/((CGFloat)self.count-1)))*(fixedItemLength+leadSpacing)-i*tailSpacing/(((CGFloat)self.count-1)); make.bottom.equalTo(tempSuperView).multipliedBy(i/((CGFloat)self.count-1)).with.offset(offset); } } else {//first one make.top.equalTo(tempSuperView).offset(leadSpacing); } }]; prev = v; } } } - (MAS_VIEW *)mas_commonSuperviewOfViews { MAS_VIEW *commonSuperview = nil; MAS_VIEW *previousView = nil; for (id object in self) { if ([object isKindOfClass:[MAS_VIEW class]]) { MAS_VIEW *view = (MAS_VIEW *)object; if (previousView) { commonSuperview = [view mas_closestCommonSuperview:commonSuperview]; } else { commonSuperview = view; } previousView = view; } } NSAssert(commonSuperview, @"Can't constrain views that do not share a common superview. Make sure that all the views in this array have been added into the same view hierarchy."); return commonSuperview; } @end ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/NSArray+MASShorthandAdditions.h ================================================ // // NSArray+MASShorthandAdditions.h // Masonry // // Created by Jonas Budelmann on 22/07/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "NSArray+MASAdditions.h" #ifdef MAS_SHORTHAND /** * Shorthand array additions without the 'mas_' prefixes, * only enabled if MAS_SHORTHAND is defined */ @interface NSArray (MASShorthandAdditions) - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; @end @implementation NSArray (MASShorthandAdditions) - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block { return [self mas_makeConstraints:block]; } - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block { return [self mas_updateConstraints:block]; } - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block { return [self mas_remakeConstraints:block]; } @end #endif ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h ================================================ // // NSLayoutConstraint+MASDebugAdditions.h // Masonry // // Created by Jonas Budelmann on 3/08/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "MASUtilities.h" /** * makes debug and log output of NSLayoutConstraints more readable */ @interface NSLayoutConstraint (MASDebugAdditions) @end ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.m ================================================ // // NSLayoutConstraint+MASDebugAdditions.m // Masonry // // Created by Jonas Budelmann on 3/08/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "NSLayoutConstraint+MASDebugAdditions.h" #import "MASConstraint.h" #import "MASLayoutConstraint.h" @implementation NSLayoutConstraint (MASDebugAdditions) #pragma mark - description maps + (NSDictionary *)layoutRelationDescriptionsByValue { static dispatch_once_t once; static NSDictionary *descriptionMap; dispatch_once(&once, ^{ descriptionMap = @{ @(NSLayoutRelationEqual) : @"==", @(NSLayoutRelationGreaterThanOrEqual) : @">=", @(NSLayoutRelationLessThanOrEqual) : @"<=", }; }); return descriptionMap; } + (NSDictionary *)layoutAttributeDescriptionsByValue { static dispatch_once_t once; static NSDictionary *descriptionMap; dispatch_once(&once, ^{ descriptionMap = @{ @(NSLayoutAttributeTop) : @"top", @(NSLayoutAttributeLeft) : @"left", @(NSLayoutAttributeBottom) : @"bottom", @(NSLayoutAttributeRight) : @"right", @(NSLayoutAttributeLeading) : @"leading", @(NSLayoutAttributeTrailing) : @"trailing", @(NSLayoutAttributeWidth) : @"width", @(NSLayoutAttributeHeight) : @"height", @(NSLayoutAttributeCenterX) : @"centerX", @(NSLayoutAttributeCenterY) : @"centerY", @(NSLayoutAttributeBaseline) : @"baseline", #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) @(NSLayoutAttributeFirstBaseline) : @"firstBaseline", @(NSLayoutAttributeLastBaseline) : @"lastBaseline", #endif #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) @(NSLayoutAttributeLeftMargin) : @"leftMargin", @(NSLayoutAttributeRightMargin) : @"rightMargin", @(NSLayoutAttributeTopMargin) : @"topMargin", @(NSLayoutAttributeBottomMargin) : @"bottomMargin", @(NSLayoutAttributeLeadingMargin) : @"leadingMargin", @(NSLayoutAttributeTrailingMargin) : @"trailingMargin", @(NSLayoutAttributeCenterXWithinMargins) : @"centerXWithinMargins", @(NSLayoutAttributeCenterYWithinMargins) : @"centerYWithinMargins", #endif }; }); return descriptionMap; } + (NSDictionary *)layoutPriorityDescriptionsByValue { static dispatch_once_t once; static NSDictionary *descriptionMap; dispatch_once(&once, ^{ #if TARGET_OS_IPHONE || TARGET_OS_TV descriptionMap = @{ @(MASLayoutPriorityDefaultHigh) : @"high", @(MASLayoutPriorityDefaultLow) : @"low", @(MASLayoutPriorityDefaultMedium) : @"medium", @(MASLayoutPriorityRequired) : @"required", @(MASLayoutPriorityFittingSizeLevel) : @"fitting size", }; #elif TARGET_OS_MAC descriptionMap = @{ @(MASLayoutPriorityDefaultHigh) : @"high", @(MASLayoutPriorityDragThatCanResizeWindow) : @"drag can resize window", @(MASLayoutPriorityDefaultMedium) : @"medium", @(MASLayoutPriorityWindowSizeStayPut) : @"window size stay put", @(MASLayoutPriorityDragThatCannotResizeWindow) : @"drag cannot resize window", @(MASLayoutPriorityDefaultLow) : @"low", @(MASLayoutPriorityFittingSizeCompression) : @"fitting size", @(MASLayoutPriorityRequired) : @"required", }; #endif }); return descriptionMap; } #pragma mark - description override + (NSString *)descriptionForObject:(id)obj { if ([obj respondsToSelector:@selector(mas_key)] && [obj mas_key]) { return [NSString stringWithFormat:@"%@:%@", [obj class], [obj mas_key]]; } return [NSString stringWithFormat:@"%@:%p", [obj class], obj]; } - (NSString *)description { NSMutableString *description = [[NSMutableString alloc] initWithString:@"<"]; [description appendString:[self.class descriptionForObject:self]]; [description appendFormat:@" %@", [self.class descriptionForObject:self.firstItem]]; if (self.firstAttribute != NSLayoutAttributeNotAnAttribute) { [description appendFormat:@".%@", self.class.layoutAttributeDescriptionsByValue[@(self.firstAttribute)]]; } [description appendFormat:@" %@", self.class.layoutRelationDescriptionsByValue[@(self.relation)]]; if (self.secondItem) { [description appendFormat:@" %@", [self.class descriptionForObject:self.secondItem]]; } if (self.secondAttribute != NSLayoutAttributeNotAnAttribute) { [description appendFormat:@".%@", self.class.layoutAttributeDescriptionsByValue[@(self.secondAttribute)]]; } if (self.multiplier != 1) { [description appendFormat:@" * %g", self.multiplier]; } if (self.secondAttribute == NSLayoutAttributeNotAnAttribute) { [description appendFormat:@" %g", self.constant]; } else { if (self.constant) { [description appendFormat:@" %@ %g", (self.constant < 0 ? @"-" : @"+"), ABS(self.constant)]; } } if (self.priority != MASLayoutPriorityRequired) { [description appendFormat:@" ^%@", self.class.layoutPriorityDescriptionsByValue[@(self.priority)] ?: [NSNumber numberWithDouble:self.priority]]; } [description appendString:@">"]; return description; } @end ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/View+MASAdditions.h ================================================ // // UIView+MASAdditions.h // Masonry // // Created by Jonas Budelmann on 20/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "MASUtilities.h" #import "MASConstraintMaker.h" #import "MASViewAttribute.h" /** * Provides constraint maker block * and convience methods for creating MASViewAttribute which are view + NSLayoutAttribute pairs */ @interface MAS_VIEW (MASAdditions) /** * following properties return a new MASViewAttribute with current view and appropriate NSLayoutAttribute */ @property (nonatomic, strong, readonly) MASViewAttribute *mas_left; @property (nonatomic, strong, readonly) MASViewAttribute *mas_top; @property (nonatomic, strong, readonly) MASViewAttribute *mas_right; @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottom; @property (nonatomic, strong, readonly) MASViewAttribute *mas_leading; @property (nonatomic, strong, readonly) MASViewAttribute *mas_trailing; @property (nonatomic, strong, readonly) MASViewAttribute *mas_width; @property (nonatomic, strong, readonly) MASViewAttribute *mas_height; @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerX; @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerY; @property (nonatomic, strong, readonly) MASViewAttribute *mas_baseline; @property (nonatomic, strong, readonly) MASViewAttribute *(^mas_attribute)(NSLayoutAttribute attr); #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) @property (nonatomic, strong, readonly) MASViewAttribute *mas_firstBaseline; @property (nonatomic, strong, readonly) MASViewAttribute *mas_lastBaseline; #endif #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) @property (nonatomic, strong, readonly) MASViewAttribute *mas_leftMargin; @property (nonatomic, strong, readonly) MASViewAttribute *mas_rightMargin; @property (nonatomic, strong, readonly) MASViewAttribute *mas_topMargin; @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomMargin; @property (nonatomic, strong, readonly) MASViewAttribute *mas_leadingMargin; @property (nonatomic, strong, readonly) MASViewAttribute *mas_trailingMargin; @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerXWithinMargins; @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerYWithinMargins; #endif #if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuide API_AVAILABLE(ios(11.0),tvos(11.0)); @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideTop API_AVAILABLE(ios(11.0),tvos(11.0)); @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideBottom API_AVAILABLE(ios(11.0),tvos(11.0)); @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideLeft API_AVAILABLE(ios(11.0),tvos(11.0)); @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideRight API_AVAILABLE(ios(11.0),tvos(11.0)); #endif /** * a key to associate with this view */ @property (nonatomic, strong) id mas_key; /** * Finds the closest common superview between this view and another view * * @param view other view * * @return returns nil if common superview could not be found */ - (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view; /** * Creates a MASConstraintMaker with the callee view. * Any constraints defined are added to the view or the appropriate superview once the block has finished executing * * @param block scope within which you can build up the constraints which you wish to apply to the view. * * @return Array of created MASConstraints */ - (NSArray *)mas_makeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block; /** * Creates a MASConstraintMaker with the callee view. * Any constraints defined are added to the view or the appropriate superview once the block has finished executing. * If an existing constraint exists then it will be updated instead. * * @param block scope within which you can build up the constraints which you wish to apply to the view. * * @return Array of created/updated MASConstraints */ - (NSArray *)mas_updateConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block; /** * Creates a MASConstraintMaker with the callee view. * Any constraints defined are added to the view or the appropriate superview once the block has finished executing. * All constraints previously installed for the view will be removed. * * @param block scope within which you can build up the constraints which you wish to apply to the view. * * @return Array of created/updated MASConstraints */ - (NSArray *)mas_remakeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block; @end ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/View+MASAdditions.m ================================================ // // UIView+MASAdditions.m // Masonry // // Created by Jonas Budelmann on 20/07/13. // Copyright (c) 2013 cloudling. All rights reserved. // #import "View+MASAdditions.h" #import @implementation MAS_VIEW (MASAdditions) - (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *))block { self.translatesAutoresizingMaskIntoConstraints = NO; MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self]; block(constraintMaker); return [constraintMaker install]; } - (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *))block { self.translatesAutoresizingMaskIntoConstraints = NO; MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self]; constraintMaker.updateExisting = YES; block(constraintMaker); return [constraintMaker install]; } - (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block { self.translatesAutoresizingMaskIntoConstraints = NO; MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self]; constraintMaker.removeExisting = YES; block(constraintMaker); return [constraintMaker install]; } #pragma mark - NSLayoutAttribute properties - (MASViewAttribute *)mas_left { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeft]; } - (MASViewAttribute *)mas_top { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTop]; } - (MASViewAttribute *)mas_right { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeRight]; } - (MASViewAttribute *)mas_bottom { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBottom]; } - (MASViewAttribute *)mas_leading { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeading]; } - (MASViewAttribute *)mas_trailing { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTrailing]; } - (MASViewAttribute *)mas_width { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeWidth]; } - (MASViewAttribute *)mas_height { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeHeight]; } - (MASViewAttribute *)mas_centerX { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterX]; } - (MASViewAttribute *)mas_centerY { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterY]; } - (MASViewAttribute *)mas_baseline { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBaseline]; } - (MASViewAttribute *(^)(NSLayoutAttribute))mas_attribute { return ^(NSLayoutAttribute attr) { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:attr]; }; } #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) - (MASViewAttribute *)mas_firstBaseline { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeFirstBaseline]; } - (MASViewAttribute *)mas_lastBaseline { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLastBaseline]; } #endif #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) - (MASViewAttribute *)mas_leftMargin { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeftMargin]; } - (MASViewAttribute *)mas_rightMargin { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeRightMargin]; } - (MASViewAttribute *)mas_topMargin { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTopMargin]; } - (MASViewAttribute *)mas_bottomMargin { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBottomMargin]; } - (MASViewAttribute *)mas_leadingMargin { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeadingMargin]; } - (MASViewAttribute *)mas_trailingMargin { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTrailingMargin]; } - (MASViewAttribute *)mas_centerXWithinMargins { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterXWithinMargins]; } - (MASViewAttribute *)mas_centerYWithinMargins { return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterYWithinMargins]; } #endif #if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) - (MASViewAttribute *)mas_safeAreaLayoutGuide { return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; } - (MASViewAttribute *)mas_safeAreaLayoutGuideTop { return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeTop]; } - (MASViewAttribute *)mas_safeAreaLayoutGuideBottom { return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; } - (MASViewAttribute *)mas_safeAreaLayoutGuideLeft { return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeLeft]; } - (MASViewAttribute *)mas_safeAreaLayoutGuideRight { return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeRight]; } #endif #pragma mark - associated properties - (id)mas_key { return objc_getAssociatedObject(self, @selector(mas_key)); } - (void)setMas_key:(id)key { objc_setAssociatedObject(self, @selector(mas_key), key, OBJC_ASSOCIATION_RETAIN_NONATOMIC); } #pragma mark - heirachy - (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view { MAS_VIEW *closestCommonSuperview = nil; MAS_VIEW *secondViewSuperview = view; while (!closestCommonSuperview && secondViewSuperview) { MAS_VIEW *firstViewSuperview = self; while (!closestCommonSuperview && firstViewSuperview) { if (secondViewSuperview == firstViewSuperview) { closestCommonSuperview = secondViewSuperview; } firstViewSuperview = firstViewSuperview.superview; } secondViewSuperview = secondViewSuperview.superview; } return closestCommonSuperview; } @end ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/View+MASShorthandAdditions.h ================================================ // // UIView+MASShorthandAdditions.h // Masonry // // Created by Jonas Budelmann on 22/07/13. // Copyright (c) 2013 Jonas Budelmann. All rights reserved. // #import "View+MASAdditions.h" #ifdef MAS_SHORTHAND /** * Shorthand view additions without the 'mas_' prefixes, * only enabled if MAS_SHORTHAND is defined */ @interface MAS_VIEW (MASShorthandAdditions) @property (nonatomic, strong, readonly) MASViewAttribute *left; @property (nonatomic, strong, readonly) MASViewAttribute *top; @property (nonatomic, strong, readonly) MASViewAttribute *right; @property (nonatomic, strong, readonly) MASViewAttribute *bottom; @property (nonatomic, strong, readonly) MASViewAttribute *leading; @property (nonatomic, strong, readonly) MASViewAttribute *trailing; @property (nonatomic, strong, readonly) MASViewAttribute *width; @property (nonatomic, strong, readonly) MASViewAttribute *height; @property (nonatomic, strong, readonly) MASViewAttribute *centerX; @property (nonatomic, strong, readonly) MASViewAttribute *centerY; @property (nonatomic, strong, readonly) MASViewAttribute *baseline; @property (nonatomic, strong, readonly) MASViewAttribute *(^attribute)(NSLayoutAttribute attr); #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) @property (nonatomic, strong, readonly) MASViewAttribute *firstBaseline; @property (nonatomic, strong, readonly) MASViewAttribute *lastBaseline; #endif #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) @property (nonatomic, strong, readonly) MASViewAttribute *leftMargin; @property (nonatomic, strong, readonly) MASViewAttribute *rightMargin; @property (nonatomic, strong, readonly) MASViewAttribute *topMargin; @property (nonatomic, strong, readonly) MASViewAttribute *bottomMargin; @property (nonatomic, strong, readonly) MASViewAttribute *leadingMargin; @property (nonatomic, strong, readonly) MASViewAttribute *trailingMargin; @property (nonatomic, strong, readonly) MASViewAttribute *centerXWithinMargins; @property (nonatomic, strong, readonly) MASViewAttribute *centerYWithinMargins; #endif #if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideTop API_AVAILABLE(ios(11.0),tvos(11.0)); @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideBottom API_AVAILABLE(ios(11.0),tvos(11.0)); @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideLeft API_AVAILABLE(ios(11.0),tvos(11.0)); @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideRight API_AVAILABLE(ios(11.0),tvos(11.0)); #endif - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; @end #define MAS_ATTR_FORWARD(attr) \ - (MASViewAttribute *)attr { \ return [self mas_##attr]; \ } @implementation MAS_VIEW (MASShorthandAdditions) MAS_ATTR_FORWARD(top); MAS_ATTR_FORWARD(left); MAS_ATTR_FORWARD(bottom); MAS_ATTR_FORWARD(right); MAS_ATTR_FORWARD(leading); MAS_ATTR_FORWARD(trailing); MAS_ATTR_FORWARD(width); MAS_ATTR_FORWARD(height); MAS_ATTR_FORWARD(centerX); MAS_ATTR_FORWARD(centerY); MAS_ATTR_FORWARD(baseline); #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) MAS_ATTR_FORWARD(firstBaseline); MAS_ATTR_FORWARD(lastBaseline); #endif #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) MAS_ATTR_FORWARD(leftMargin); MAS_ATTR_FORWARD(rightMargin); MAS_ATTR_FORWARD(topMargin); MAS_ATTR_FORWARD(bottomMargin); MAS_ATTR_FORWARD(leadingMargin); MAS_ATTR_FORWARD(trailingMargin); MAS_ATTR_FORWARD(centerXWithinMargins); MAS_ATTR_FORWARD(centerYWithinMargins); #endif #if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) MAS_ATTR_FORWARD(safeAreaLayoutGuideTop); MAS_ATTR_FORWARD(safeAreaLayoutGuideBottom); MAS_ATTR_FORWARD(safeAreaLayoutGuideLeft); MAS_ATTR_FORWARD(safeAreaLayoutGuideRight); #endif - (MASViewAttribute *(^)(NSLayoutAttribute))attribute { return [self mas_attribute]; } - (NSArray *)makeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block { return [self mas_makeConstraints:block]; } - (NSArray *)updateConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block { return [self mas_updateConstraints:block]; } - (NSArray *)remakeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block { return [self mas_remakeConstraints:block]; } @end #endif ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/ViewController+MASAdditions.h ================================================ // // UIViewController+MASAdditions.h // Masonry // // Created by Craig Siemens on 2015-06-23. // // #import "MASUtilities.h" #import "MASConstraintMaker.h" #import "MASViewAttribute.h" #ifdef MAS_VIEW_CONTROLLER @interface MAS_VIEW_CONTROLLER (MASAdditions) /** * following properties return a new MASViewAttribute with appropriate UILayoutGuide and NSLayoutAttribute */ @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuide; @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuide; @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideTop; @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideBottom; @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideTop; @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideBottom; @end #endif ================================================ FILE: CMPageTitleView/Pods/Masonry/Masonry/ViewController+MASAdditions.m ================================================ // // UIViewController+MASAdditions.m // Masonry // // Created by Craig Siemens on 2015-06-23. // // #import "ViewController+MASAdditions.h" #ifdef MAS_VIEW_CONTROLLER @implementation MAS_VIEW_CONTROLLER (MASAdditions) - (MASViewAttribute *)mas_topLayoutGuide { return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; } - (MASViewAttribute *)mas_topLayoutGuideTop { return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeTop]; } - (MASViewAttribute *)mas_topLayoutGuideBottom { return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; } - (MASViewAttribute *)mas_bottomLayoutGuide { return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop]; } - (MASViewAttribute *)mas_bottomLayoutGuideTop { return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop]; } - (MASViewAttribute *)mas_bottomLayoutGuideBottom { return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; } @end #endif ================================================ FILE: CMPageTitleView/Pods/Masonry/README.md ================================================ # Masonry [![Build Status](https://travis-ci.org/SnapKit/Masonry.svg?branch=master)](https://travis-ci.org/SnapKit/Masonry) [![Coverage Status](https://img.shields.io/coveralls/SnapKit/Masonry.svg?style=flat-square)](https://coveralls.io/r/SnapKit/Masonry) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) ![Pod Version](https://img.shields.io/cocoapods/v/Masonry.svg?style=flat) **Masonry is still actively maintained, we are committed to fixing bugs and merging good quality PRs from the wider community. However if you're using Swift in your project, we recommend using [SnapKit](https://github.com/SnapKit/SnapKit) as it provides better type safety with a simpler API.** Masonry is a light-weight layout framework which wraps AutoLayout with a nicer syntax. Masonry has its own layout DSL which provides a chainable way of describing your NSLayoutConstraints which results in layout code that is more concise and readable. Masonry supports iOS and Mac OS X. For examples take a look at the **Masonry iOS Examples** project in the Masonry workspace. You will need to run `pod install` after downloading. ## What's wrong with NSLayoutConstraints? Under the hood Auto Layout is a powerful and flexible way of organising and laying out your views. However creating constraints from code is verbose and not very descriptive. Imagine a simple example in which you want to have a view fill its superview but inset by 10 pixels on every side ```obj-c UIView *superview = self.view; UIView *view1 = [[UIView alloc] init]; view1.translatesAutoresizingMaskIntoConstraints = NO; view1.backgroundColor = [UIColor greenColor]; [superview addSubview:view1]; UIEdgeInsets padding = UIEdgeInsetsMake(10, 10, 10, 10); [superview addConstraints:@[ //view1 constraints [NSLayoutConstraint constraintWithItem:view1 attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:superview attribute:NSLayoutAttributeTop multiplier:1.0 constant:padding.top], [NSLayoutConstraint constraintWithItem:view1 attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:superview attribute:NSLayoutAttributeLeft multiplier:1.0 constant:padding.left], [NSLayoutConstraint constraintWithItem:view1 attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:superview attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-padding.bottom], [NSLayoutConstraint constraintWithItem:view1 attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:superview attribute:NSLayoutAttributeRight multiplier:1 constant:-padding.right], ]]; ``` Even with such a simple example the code needed is quite verbose and quickly becomes unreadable when you have more than 2 or 3 views. Another option is to use Visual Format Language (VFL), which is a bit less long winded. However the ASCII type syntax has its own pitfalls and its also a bit harder to animate as `NSLayoutConstraint constraintsWithVisualFormat:` returns an array. ## Prepare to meet your Maker! Heres the same constraints created using MASConstraintMaker ```obj-c UIEdgeInsets padding = UIEdgeInsetsMake(10, 10, 10, 10); [view1 mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(superview.mas_top).with.offset(padding.top); //with is an optional semantic filler make.left.equalTo(superview.mas_left).with.offset(padding.left); make.bottom.equalTo(superview.mas_bottom).with.offset(-padding.bottom); make.right.equalTo(superview.mas_right).with.offset(-padding.right); }]; ``` Or even shorter ```obj-c [view1 mas_makeConstraints:^(MASConstraintMaker *make) { make.edges.equalTo(superview).with.insets(padding); }]; ``` Also note in the first example we had to add the constraints to the superview `[superview addConstraints:...`. Masonry however will automagically add constraints to the appropriate view. Masonry will also call `view1.translatesAutoresizingMaskIntoConstraints = NO;` for you. ## Not all things are created equal > `.equalTo` equivalent to **NSLayoutRelationEqual** > `.lessThanOrEqualTo` equivalent to **NSLayoutRelationLessThanOrEqual** > `.greaterThanOrEqualTo` equivalent to **NSLayoutRelationGreaterThanOrEqual** These three equality constraints accept one argument which can be any of the following: #### 1. MASViewAttribute ```obj-c make.centerX.lessThanOrEqualTo(view2.mas_left); ``` MASViewAttribute | NSLayoutAttribute ------------------------- | -------------------------- view.mas_left | NSLayoutAttributeLeft view.mas_right | NSLayoutAttributeRight view.mas_top | NSLayoutAttributeTop view.mas_bottom | NSLayoutAttributeBottom view.mas_leading | NSLayoutAttributeLeading view.mas_trailing | NSLayoutAttributeTrailing view.mas_width | NSLayoutAttributeWidth view.mas_height | NSLayoutAttributeHeight view.mas_centerX | NSLayoutAttributeCenterX view.mas_centerY | NSLayoutAttributeCenterY view.mas_baseline | NSLayoutAttributeBaseline #### 2. UIView/NSView if you want view.left to be greater than or equal to label.left : ```obj-c //these two constraints are exactly the same make.left.greaterThanOrEqualTo(label); make.left.greaterThanOrEqualTo(label.mas_left); ``` #### 3. NSNumber Auto Layout allows width and height to be set to constant values. if you want to set view to have a minimum and maximum width you could pass a number to the equality blocks: ```obj-c //width >= 200 && width <= 400 make.width.greaterThanOrEqualTo(@200); make.width.lessThanOrEqualTo(@400) ``` However Auto Layout does not allow alignment attributes such as left, right, centerY etc to be set to constant values. So if you pass a NSNumber for these attributes Masonry will turn these into constraints relative to the view’s superview ie: ```obj-c //creates view.left = view.superview.left + 10 make.left.lessThanOrEqualTo(@10) ``` Instead of using NSNumber, you can use primitives and structs to build your constraints, like so: ```obj-c make.top.mas_equalTo(42); make.height.mas_equalTo(20); make.size.mas_equalTo(CGSizeMake(50, 100)); make.edges.mas_equalTo(UIEdgeInsetsMake(10, 0, 10, 0)); make.left.mas_equalTo(view).mas_offset(UIEdgeInsetsMake(10, 0, 10, 0)); ``` By default, macros which support [autoboxing](https://en.wikipedia.org/wiki/Autoboxing#Autoboxing) are prefixed with `mas_`. Unprefixed versions are available by defining `MAS_SHORTHAND_GLOBALS` before importing Masonry. #### 4. NSArray An array of a mixture of any of the previous types ```obj-c make.height.equalTo(@[view1.mas_height, view2.mas_height]); make.height.equalTo(@[view1, view2]); make.left.equalTo(@[view1, @100, view3.right]); ```` ## Learn to prioritize > `.priority` allows you to specify an exact priority > `.priorityHigh` equivalent to **UILayoutPriorityDefaultHigh** > `.priorityMedium` is half way between high and low > `.priorityLow` equivalent to **UILayoutPriorityDefaultLow** Priorities are can be tacked on to the end of a constraint chain like so: ```obj-c make.left.greaterThanOrEqualTo(label.mas_left).with.priorityLow(); make.top.equalTo(label.mas_top).with.priority(600); ``` ## Composition, composition, composition Masonry also gives you a few convenience methods which create multiple constraints at the same time. These are called MASCompositeConstraints #### edges ```obj-c // make top, left, bottom, right equal view2 make.edges.equalTo(view2); // make top = superview.top + 5, left = superview.left + 10, // bottom = superview.bottom - 15, right = superview.right - 20 make.edges.equalTo(superview).insets(UIEdgeInsetsMake(5, 10, 15, 20)) ``` #### size ```obj-c // make width and height greater than or equal to titleLabel make.size.greaterThanOrEqualTo(titleLabel) // make width = superview.width + 100, height = superview.height - 50 make.size.equalTo(superview).sizeOffset(CGSizeMake(100, -50)) ``` #### center ```obj-c // make centerX and centerY = button1 make.center.equalTo(button1) // make centerX = superview.centerX - 5, centerY = superview.centerY + 10 make.center.equalTo(superview).centerOffset(CGPointMake(-5, 10)) ``` You can chain view attributes for increased readability: ```obj-c // All edges but the top should equal those of the superview make.left.right.and.bottom.equalTo(superview); make.top.equalTo(otherView); ``` ## Hold on for dear life Sometimes you need modify existing constraints in order to animate or remove/replace constraints. In Masonry there are a few different approaches to updating constraints. #### 1. References You can hold on to a reference of a particular constraint by assigning the result of a constraint make expression to a local variable or a class property. You could also reference multiple constraints by storing them away in an array. ```obj-c // in public/private interface @property (nonatomic, strong) MASConstraint *topConstraint; ... // when making constraints [view1 mas_makeConstraints:^(MASConstraintMaker *make) { self.topConstraint = make.top.equalTo(superview.mas_top).with.offset(padding.top); make.left.equalTo(superview.mas_left).with.offset(padding.left); }]; ... // then later you can call [self.topConstraint uninstall]; ``` #### 2. mas_updateConstraints Alternatively if you are only updating the constant value of the constraint you can use the convience method `mas_updateConstraints` instead of `mas_makeConstraints` ```obj-c // this is Apple's recommended place for adding/updating constraints // this method can get called multiple times in response to setNeedsUpdateConstraints // which can be called by UIKit internally or in your code if you need to trigger an update to your constraints - (void)updateConstraints { [self.growingButton mas_updateConstraints:^(MASConstraintMaker *make) { make.center.equalTo(self); make.width.equalTo(@(self.buttonSize.width)).priorityLow(); make.height.equalTo(@(self.buttonSize.height)).priorityLow(); make.width.lessThanOrEqualTo(self); make.height.lessThanOrEqualTo(self); }]; //according to apple super should be called at end of method [super updateConstraints]; } ``` ### 3. mas_remakeConstraints `mas_updateConstraints` is useful for updating a set of constraints, but doing anything beyond updating constant values can get exhausting. That's where `mas_remakeConstraints` comes in. `mas_remakeConstraints` is similar to `mas_updateConstraints`, but instead of updating constant values, it will remove all of its constraints before installing them again. This lets you provide different constraints without having to keep around references to ones which you want to remove. ```obj-c - (void)changeButtonPosition { [self.button mas_remakeConstraints:^(MASConstraintMaker *make) { make.size.equalTo(self.buttonSize); if (topLeft) { make.top.and.left.offset(10); } else { make.bottom.and.right.offset(-10); } }]; } ``` You can find more detailed examples of all three approaches in the **Masonry iOS Examples** project. ## When the ^&*!@ hits the fan! Laying out your views doesn't always goto plan. So when things literally go pear shaped, you don't want to be looking at console output like this: ```obj-c Unable to simultaneously satisfy constraints.....blah blah blah.... ( "=5000)]>", "", "", "" ) Will attempt to recover by breaking constraint =5000)]> ``` Masonry adds a category to NSLayoutConstraint which overrides the default implementation of `- (NSString *)description`. Now you can give meaningful names to views and constraints, and also easily pick out the constraints created by Masonry. which means your console output can now look like this: ```obj-c Unable to simultaneously satisfy constraints......blah blah blah.... ( "", "= 5000>", "", "" ) Will attempt to recover by breaking constraint = 5000> ``` For an example of how to set this up take a look at the **Masonry iOS Examples** project in the Masonry workspace. ## Where should I create my constraints? ```objc @implementation DIYCustomView - (id)init { self = [super init]; if (!self) return nil; // --- Create your views here --- self.button = [[UIButton alloc] init]; return self; } // tell UIKit that you are using AutoLayout + (BOOL)requiresConstraintBasedLayout { return YES; } // this is Apple's recommended place for adding/updating constraints - (void)updateConstraints { // --- remake/update constraints here [self.button remakeConstraints:^(MASConstraintMaker *make) { make.width.equalTo(@(self.buttonSize.width)); make.height.equalTo(@(self.buttonSize.height)); }]; //according to apple super should be called at end of method [super updateConstraints]; } - (void)didTapButton:(UIButton *)button { // --- Do your changes ie change variables that affect your layout etc --- self.buttonSize = CGSize(200, 200); // tell constraints they need updating [self setNeedsUpdateConstraints]; } @end ``` ## Installation Use the [orsome](http://www.youtube.com/watch?v=YaIZF8uUTtk) [CocoaPods](http://github.com/CocoaPods/CocoaPods). In your Podfile >`pod 'Masonry'` If you want to use masonry without all those pesky 'mas_' prefixes. Add #define MAS_SHORTHAND to your prefix.pch before importing Masonry >`#define MAS_SHORTHAND` Get busy Masoning >`#import "Masonry.h"` ## Code Snippets Copy the included code snippets to ``~/Library/Developer/Xcode/UserData/CodeSnippets`` to write your masonry blocks at lightning speed! `mas_make` -> ` [<#view#> mas_makeConstraints:^(MASConstraintMaker *make) { <#code#> }];` `mas_update` -> ` [<#view#> mas_updateConstraints:^(MASConstraintMaker *make) { <#code#> }];` `mas_remake` -> ` [<#view#> mas_remakeConstraints:^(MASConstraintMaker *make) { <#code#> }];` ## Features * Not limited to subset of Auto Layout. Anything NSLayoutConstraint can do, Masonry can do too! * Great debug support, give your views and constraints meaningful names. * Constraints read like sentences. * No crazy macro magic. Masonry won't pollute the global namespace with macros. * Not string or dictionary based and hence you get compile time checking. ## TODO * Eye candy * Mac example project * More tests and examples ================================================ FILE: CMPageTitleView/Pods/Pods.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 51; objects = { /* Begin PBXBuildFile section */ 050A189DF0B4F405E9D3389F24EDF835 /* MJRefreshAutoFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E5853BD58B4521FBFF2A8A3D159F898 /* MJRefreshAutoFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; 05A040F35BF1C88F869404E1A940B493 /* NSArray+MASShorthandAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA2EDE47B964AC11F486837D63E2860 /* NSArray+MASShorthandAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 05EA1447EEA0EB669F8DEE73964A7C60 /* NSArray+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6731151681D56842659A55111E28F2BB /* NSArray+MASAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 06AEA7117FE98F2409D2432AAEC326A8 /* MJRefreshGifHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 8D2551BE986A32088BDE209F47485256 /* MJRefreshGifHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0967598607D521318F69D7D39D517B20 /* ViewController+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6136CCE8A30E0E3797060C0AA431BD80 /* ViewController+MASAdditions.m */; }; 098630ECDB64ED7B89F5F687C82B4AC3 /* NSArray+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 48C0BB9A3CECFD13B418C71AE6F62A16 /* NSArray+MASAdditions.m */; }; 0AECE221BADEA19083FC0CACE5973D8A /* MJRefreshFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 969C926E4CC79AB6FE4C1D0C414D732A /* MJRefreshFooter.m */; }; 0AF1AD35706D90B1A91F291B899EF8C0 /* NSLayoutConstraint+MASDebugAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 95D96574DF8B434321EBBC30A67E08C2 /* NSLayoutConstraint+MASDebugAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0F47C7DE634D4FE07B595912093139FE /* MJRefresh.bundle in Resources */ = {isa = PBXBuildFile; fileRef = D8B038DCF63D69CF9A8FE40AB097C2EA /* MJRefresh.bundle */; }; 13611CB0839D7F8C3EFCB9F9ED5495BD /* NSBundle+MJRefresh.h in Headers */ = {isa = PBXBuildFile; fileRef = C390E62F311D43C9B026E8422636AA64 /* NSBundle+MJRefresh.h */; settings = {ATTRIBUTES = (Public, ); }; }; 1972E85F0FCD0F3EAF28ED7CD036286E /* Masonry-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 30E9201613B1E0097657C20E8B0B28F3 /* Masonry-dummy.m */; }; 1C2EF8A09FA2E0C380229C9D93AB7E9F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 436BAA54A31999B53B3CC7115C55FE50 /* Foundation.framework */; }; 22513825A54DC9B8C23BF0CC7F45B00F /* MJRefreshConst.m in Sources */ = {isa = PBXBuildFile; fileRef = B7CF07A659DA3FD1417E55C3D940CAB2 /* MJRefreshConst.m */; }; 22B4E8E332D6508E244D2A0BFBEA6ABB /* Pods-CMPageTitleViewUITests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 50326B09F3EE3C1566A9F7F13549C043 /* Pods-CMPageTitleViewUITests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 280D36330BAC5715615FF4A8B42D60D6 /* MASUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 4807F6C9C23935122DBF8F9CF2B0DAE5 /* MASUtilities.h */; settings = {ATTRIBUTES = (Public, ); }; }; 297A3627CF2F032CBFDC61D1A3786E63 /* MASViewAttribute.m in Sources */ = {isa = PBXBuildFile; fileRef = 2444DD08B0775A8D476F3D23751A25AA /* MASViewAttribute.m */; }; 32DA0F5869BC32AEB94CA0A5DD9C8389 /* Pods-CMPageTitleViewTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0972DACFACDAD2180ADF1DFD6295DC59 /* Pods-CMPageTitleViewTests-dummy.m */; }; 33BFFC3BE2A20264B8F11AF0F4A889E6 /* Pods-CMPageTitleView-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 176633DDD680434231633C3F2146515D /* Pods-CMPageTitleView-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 346080C0D1CA23399ADD739D722D7CEF /* Masonry.h in Headers */ = {isa = PBXBuildFile; fileRef = 367E319CA582DABE128B26B726DE77D7 /* Masonry.h */; settings = {ATTRIBUTES = (Public, ); }; }; 39172F66777E6BC6EBFFC5948E3CC765 /* MJRefreshNormalHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = E0C5269E7EBEF6D14DC61F631E2C3D65 /* MJRefreshNormalHeader.m */; }; 3DA5F1D8E51CDD102A871C2F37770C7B /* MASViewAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CB8E52A5D4A105CDC9CA4C29A026CD8 /* MASViewAttribute.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4055A0ACF4681DEA04E2F0AECD0B97B2 /* UIScrollView+MJRefresh.m in Sources */ = {isa = PBXBuildFile; fileRef = D03159CF32D95C81F0F83D2A897ECFB5 /* UIScrollView+MJRefresh.m */; }; 45626116C19AA54A2359E85DAEB5AD42 /* UIScrollView+MJExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 20DFE963091020A5048A0C0A66E56646 /* UIScrollView+MJExtension.m */; }; 4583409C21FCF11CB11FE51B0B235A00 /* MJRefreshFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F789481302EC7C6996182B0AE6E0A1D /* MJRefreshFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; 47C5E12941194A00ED65EECCD1E4B9C3 /* MJRefreshComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = 3FA0D4A95BD573E2B5710C8C402E7AFF /* MJRefreshComponent.m */; }; 4B0981F9AC628CF5100C50FF4A163A4A /* View+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 0192A3EBF7EDC052F89FDAFDE47CE40D /* View+MASAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4D112B5D14F7B1A1D92F9ACBA122609E /* Pods-CMPageTitleViewTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 71882775BC6804A4893B191B56C56797 /* Pods-CMPageTitleViewTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4F5A97CA16447E2BDF919A40C1652E9F /* MJRefreshHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 8D13B90C852AC70B777ABB43F13A6CE2 /* MJRefreshHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; 528237787EC24E25AD6BB486B1BEBE5D /* MJRefreshBackStateFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 5B5FB5952B431CD293A90418EA9F8F1D /* MJRefreshBackStateFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; 595527C54E24251571AA3B9E61D616BE /* MJRefreshBackFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 849E3A6E3C5F02101F8D2D1E06853C1A /* MJRefreshBackFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5A384A2C99EB807D449323F9814098A9 /* MJRefresh-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1CC90E78B946FC4937FE16FB420CE15E /* MJRefresh-dummy.m */; }; 61EF33C64C26EDF6A86430C30CCC8125 /* MJRefreshAutoFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = A2CC277F1A836E56D5C94DE1420A095C /* MJRefreshAutoFooter.m */; }; 64FAE071FA6CADC6F4543DCD82705D12 /* UIView+MJExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = B4CC43BC9D3B607239F8F525790740D0 /* UIView+MJExtension.m */; }; 675F8319809B90A18BB685E1EA09F886 /* MJRefreshAutoNormalFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 79F8F647B0719B7ABC2232A76D22EA3B /* MJRefreshAutoNormalFooter.m */; }; 696BEC58A027BCCDFB378637C75C78A5 /* MJRefreshAutoGifFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C1135AA186408C7594B27F642666F6D /* MJRefreshAutoGifFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6A6AD3A5BBDBFD0B4AF936BD518EC0B1 /* Masonry-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 8F085AFB51B2FB51DB03B43386850C3D /* Masonry-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6C1461ED2AF53643934B4B97E9BB8A7D /* UIScrollView+MJRefresh.h in Headers */ = {isa = PBXBuildFile; fileRef = F7856316859155F5DB3FD2ED3A749330 /* UIScrollView+MJRefresh.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6F11BF93701AB356B1CE164B6A438498 /* Pods-CMPageTitleView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B6BAE7FE0F4764770884ED3CD66C4DB8 /* Pods-CMPageTitleView-dummy.m */; }; 710200F11DC7A1879D4DD570EAC49AEC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 436BAA54A31999B53B3CC7115C55FE50 /* Foundation.framework */; }; 78B2727EE5D693F58D019DB098005101 /* MASConstraintMaker.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CF8A21920538F2D981BEE096FE91CB1 /* MASConstraintMaker.m */; }; 7BFF65958F014760B6AC4742824892EB /* MASCompositeConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 64658E1A4A43B1F4154A43B0EC9F31B7 /* MASCompositeConstraint.m */; }; 852887173A1F802E93E8BF3FEDD3B8BD /* MJRefreshAutoStateFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 501DCE274A5695A57A682C23C2F90BEF /* MJRefreshAutoStateFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8539B851E01A58467BE49CA3FA77223C /* MASLayoutConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 47C5BE93CDEC5D526DB731D7F3B4629F /* MASLayoutConstraint.m */; }; 85DBD599545B98F7AB17B94C86A4DC37 /* MJRefreshGifHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = AC98542493E2F3BEF723F75ED52F1098 /* MJRefreshGifHeader.m */; }; 8638BD5B0012059ABB8B3C588633667C /* MJRefresh.h in Headers */ = {isa = PBXBuildFile; fileRef = 43A47D683DB85324CC83C41AD6991789 /* MJRefresh.h */; settings = {ATTRIBUTES = (Public, ); }; }; 86F2E53F22F26D2D030CA8ED679B5266 /* MJRefreshBackFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = B88F6678969F36526E5116942AC79EAE /* MJRefreshBackFooter.m */; }; 87EACD9485ADA3B6BCAE4FD103431F13 /* Pods-CMPageTitleViewUITests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A99DEECC53D33A8B3CA15FB4EA06B5D5 /* Pods-CMPageTitleViewUITests-dummy.m */; }; 89407BE103B6AA73E90C8E0EF0C1AA08 /* MJRefreshAutoGifFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AE6762EB1AFE9E2215B958C9D060564 /* MJRefreshAutoGifFooter.m */; }; 8B92011C9373001132C8148BFC8F50B3 /* ViewController+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = EFD4D46BB8AF4E6120EDCFA70D1D7AC8 /* ViewController+MASAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8D4D1F6E4709EBB13974E95DC1059DDC /* MASLayoutConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 72519F567AC5720B31EC153F396FE786 /* MASLayoutConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8D65CE579E516BDD5FB36CAA21D693F6 /* MASCompositeConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 8F54B3CDA399D842E079F5A057E26954 /* MASCompositeConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8F736DFA1256E8BE2DCC41F66F2A2561 /* MJRefreshHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 50C1BF6B3E352AE839D67E55AF763D2D /* MJRefreshHeader.m */; }; 941955A19C40899D275604E6E9C21A6D /* MASConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 29764F80B1DBE7A99A6FEE44224E9CBE /* MASConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; 94940A2C852223F20EE7ED83A9BB5179 /* MJRefreshConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = DDE75536DE38472CA99A61B75EFDA722 /* MJRefreshConfig.h */; settings = {ATTRIBUTES = (Public, ); }; }; 95BD9ECE799ABE9F7F41DB1D4F44DE31 /* MJRefreshComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 54D72382CC9984AAA0404B9874F40B7E /* MJRefreshComponent.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9D546E1168C04B0B2EAE005D9275D18B /* MASConstraint+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 123CB291FE31EE69DB264F2765B55FE0 /* MASConstraint+Private.h */; settings = {ATTRIBUTES = (Public, ); }; }; A25E7116FB360F05B59277B542E0E8C8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 436BAA54A31999B53B3CC7115C55FE50 /* Foundation.framework */; }; A35FBEEC7D088AEC05297E8292A32C77 /* View+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B9E1F826B971AAAC39AA5D4AF1795E3 /* View+MASAdditions.m */; }; A7B257D75993F5C90FAEEB16780CC215 /* NSBundle+MJRefresh.m in Sources */ = {isa = PBXBuildFile; fileRef = 00A5CBB96CE92EF465978155F0780B6B /* NSBundle+MJRefresh.m */; }; A8F266741C653EAED3DD49D75DB9D5A8 /* MJRefreshConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = AAAE80C9A92EA002B7A031BB6C06CA09 /* MJRefreshConfig.m */; }; AA5F359B86973F47D34F4A0FD745E4EC /* MJRefreshStateHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = A1C08364CD96310D0E21D8C445C7E002 /* MJRefreshStateHeader.m */; }; B545FC64504EB25999F30CFC1E27E702 /* MJRefreshAutoNormalFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 7031580317D786D465A8E4E4520B5121 /* MJRefreshAutoNormalFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; B7D645EC004610E8A581E532D28771EC /* MASViewConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = A6594EAE8702A90CA3F1773A79999249 /* MASViewConstraint.m */; }; BD9A09840189D37657887D1467CAA330 /* MJRefreshStateHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = CAB1CA5FBE2A8D0A01576FAD78353FCC /* MJRefreshStateHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; C0861ADB4C5FA30F4F9E051F7638A264 /* NSLayoutConstraint+MASDebugAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 85AE18DA48CBC4045DB00DAC46E03C40 /* NSLayoutConstraint+MASDebugAdditions.m */; }; C0B2C760334561E4910FADD8520C85C3 /* UIView+MJExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = C81E9A59402FF5FB04A646C0FDED90E6 /* UIView+MJExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; CBDC089A3E26FC6825F64E078195BF01 /* UIScrollView+MJExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 2CB629949AB5725BA51A46653699430D /* UIScrollView+MJExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; CE7004AFA3B30D672A4DD9B4D3E6915B /* MJRefreshConst.h in Headers */ = {isa = PBXBuildFile; fileRef = C03F9FD01409860B7FE1A2549DFBDA2C /* MJRefreshConst.h */; settings = {ATTRIBUTES = (Public, ); }; }; CE93C54413259B4AC3683B6EB874D466 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 312B988EF117AE4DE76A268D970131FE /* UIKit.framework */; }; D476A1AD427ED4B951ACCB95459033CC /* MJRefreshBackNormalFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D4724F3FDA820D4A25E2D2135EFA864 /* MJRefreshBackNormalFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; D8328429281E82F67DB47AF6C9D95191 /* MJRefreshBackGifFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A79552D96931BB4F04EAED94D6CBC5F /* MJRefreshBackGifFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; DC61A8F0AF15C821C2C04A9ECC7FD124 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 436BAA54A31999B53B3CC7115C55FE50 /* Foundation.framework */; }; DCCC7E7E734A732901932B2E9D662EE7 /* MJRefreshAutoStateFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 5781A96D20855D941A2DAB20A503FD30 /* MJRefreshAutoStateFooter.m */; }; E51F496BDC6ACADE04FDA059C6CB2342 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 436BAA54A31999B53B3CC7115C55FE50 /* Foundation.framework */; }; E7CA20228B3583F41927813EE904CAD3 /* View+MASShorthandAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 98C3C844CD7E8B1D27B1845FC714B75F /* View+MASShorthandAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; E8DD5D1D406150E1C80AD015271B6848 /* MASConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = D9F2BB5B51D51567FA343469F514E3B1 /* MASConstraint.m */; }; EAE8B0895956885A752B173683A0D889 /* MASViewConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 557B65A3BD859CC1459F96AC95ABB698 /* MASViewConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; EB209DF5DE13F4D802DA1BE20A9CEBD2 /* MJRefreshBackStateFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 7C8E7791CC5B7284B21B50CC4CCB9F19 /* MJRefreshBackStateFooter.m */; }; ED3E2C1051BAC5B50BE441D95D8801C0 /* MJRefreshBackGifFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = D92A55C70EA32227409FB64D29935523 /* MJRefreshBackGifFooter.m */; }; EECE40C6F296379F86ABB36AF79BB8EC /* MJRefreshNormalHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E774A9D01FFE81E338DDCF9A4AF9E0C /* MJRefreshNormalHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; F57BA25385E6996D6EC18EDD97E596FE /* MJRefresh-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 09F269E405FB095B771D809E0EA605F6 /* MJRefresh-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; FAFBFA90F7BC3E7CF50F8A5CF0A8B264 /* MASConstraintMaker.h in Headers */ = {isa = PBXBuildFile; fileRef = A80986864327A746C5DA7408677DC9F2 /* MASConstraintMaker.h */; settings = {ATTRIBUTES = (Public, ); }; }; FE350422B39C5EA00E5AA552F6D218FB /* MJRefreshBackNormalFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E7368C1E44B54B70FB73FE458D483EB /* MJRefreshBackNormalFooter.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 00CC431496DCE5D516C5D85AB1615DB5 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; remoteGlobalIDString = 55AF53E6C77A10ED4985E04D74A8878E; remoteInfo = Masonry; }; 772EA49C326C07E28CEB52F6C83473E0 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; remoteGlobalIDString = D054554EF4ABC31BC47EAB81D0DA69EC; remoteInfo = "Pods-CMPageTitleView"; }; 797F658A9D1BAA318764E26137DBD872 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; remoteGlobalIDString = D054554EF4ABC31BC47EAB81D0DA69EC; remoteInfo = "Pods-CMPageTitleView"; }; D8FD8133485EC52F85A9076762DA0A37 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; remoteGlobalIDString = 6868056D761E163D10FDAF8CF1C4D9B8; remoteInfo = MJRefresh; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 00A5CBB96CE92EF465978155F0780B6B /* NSBundle+MJRefresh.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSBundle+MJRefresh.m"; path = "MJRefresh/NSBundle+MJRefresh.m"; sourceTree = ""; }; 0192A3EBF7EDC052F89FDAFDE47CE40D /* View+MASAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "View+MASAdditions.h"; path = "Masonry/View+MASAdditions.h"; sourceTree = ""; }; 0972DACFACDAD2180ADF1DFD6295DC59 /* Pods-CMPageTitleViewTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-CMPageTitleViewTests-dummy.m"; sourceTree = ""; }; 09F269E405FB095B771D809E0EA605F6 /* MJRefresh-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MJRefresh-umbrella.h"; sourceTree = ""; }; 0E774A9D01FFE81E338DDCF9A4AF9E0C /* MJRefreshNormalHeader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshNormalHeader.h; path = MJRefresh/Custom/Header/MJRefreshNormalHeader.h; sourceTree = ""; }; 123CB291FE31EE69DB264F2765B55FE0 /* MASConstraint+Private.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "MASConstraint+Private.h"; path = "Masonry/MASConstraint+Private.h"; sourceTree = ""; }; 176633DDD680434231633C3F2146515D /* Pods-CMPageTitleView-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-CMPageTitleView-umbrella.h"; sourceTree = ""; }; 1CC90E78B946FC4937FE16FB420CE15E /* MJRefresh-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "MJRefresh-dummy.m"; sourceTree = ""; }; 1F650C08D5FF699E2BE5CC74C3583C34 /* Pods-CMPageTitleViewTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-CMPageTitleViewTests-acknowledgements.markdown"; sourceTree = ""; }; 1FFED36A657123030ABB700256D73F15 /* Masonry.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Masonry.framework; path = Masonry.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 20DFE963091020A5048A0C0A66E56646 /* UIScrollView+MJExtension.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIScrollView+MJExtension.m"; path = "MJRefresh/UIScrollView+MJExtension.m"; sourceTree = ""; }; 2444DD08B0775A8D476F3D23751A25AA /* MASViewAttribute.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASViewAttribute.m; path = Masonry/MASViewAttribute.m; sourceTree = ""; }; 2859FEF0448954C5A588DE2E2C1B1585 /* Pods-CMPageTitleViewUITests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-CMPageTitleViewUITests.modulemap"; sourceTree = ""; }; 29764F80B1DBE7A99A6FEE44224E9CBE /* MASConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASConstraint.h; path = Masonry/MASConstraint.h; sourceTree = ""; }; 2CB629949AB5725BA51A46653699430D /* UIScrollView+MJExtension.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIScrollView+MJExtension.h"; path = "MJRefresh/UIScrollView+MJExtension.h"; sourceTree = ""; }; 30E9201613B1E0097657C20E8B0B28F3 /* Masonry-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Masonry-dummy.m"; sourceTree = ""; }; 312B988EF117AE4DE76A268D970131FE /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; 367E319CA582DABE128B26B726DE77D7 /* Masonry.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Masonry.h; path = Masonry/Masonry.h; sourceTree = ""; }; 3CF8A21920538F2D981BEE096FE91CB1 /* MASConstraintMaker.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASConstraintMaker.m; path = Masonry/MASConstraintMaker.m; sourceTree = ""; }; 3D4724F3FDA820D4A25E2D2135EFA864 /* MJRefreshBackNormalFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshBackNormalFooter.h; path = MJRefresh/Custom/Footer/Back/MJRefreshBackNormalFooter.h; sourceTree = ""; }; 3F789481302EC7C6996182B0AE6E0A1D /* MJRefreshFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshFooter.h; path = MJRefresh/Base/MJRefreshFooter.h; sourceTree = ""; }; 3FA0D4A95BD573E2B5710C8C402E7AFF /* MJRefreshComponent.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshComponent.m; path = MJRefresh/Base/MJRefreshComponent.m; sourceTree = ""; }; 436BAA54A31999B53B3CC7115C55FE50 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 43A47D683DB85324CC83C41AD6991789 /* MJRefresh.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefresh.h; path = MJRefresh/MJRefresh.h; sourceTree = ""; }; 471D9233D2FF27D996887B928F59995C /* Pods-CMPageTitleView-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-CMPageTitleView-acknowledgements.markdown"; sourceTree = ""; }; 47C5BE93CDEC5D526DB731D7F3B4629F /* MASLayoutConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASLayoutConstraint.m; path = Masonry/MASLayoutConstraint.m; sourceTree = ""; }; 4807F6C9C23935122DBF8F9CF2B0DAE5 /* MASUtilities.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASUtilities.h; path = Masonry/MASUtilities.h; sourceTree = ""; }; 489BCC574AA74C00D76279E2BD70D85C /* Masonry.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Masonry.debug.xcconfig; sourceTree = ""; }; 48C0BB9A3CECFD13B418C71AE6F62A16 /* NSArray+MASAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSArray+MASAdditions.m"; path = "Masonry/NSArray+MASAdditions.m"; sourceTree = ""; }; 4C326369DBF924526C742096A1ED47A5 /* Pods-CMPageTitleViewTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-CMPageTitleViewTests-acknowledgements.plist"; sourceTree = ""; }; 501DCE274A5695A57A682C23C2F90BEF /* MJRefreshAutoStateFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshAutoStateFooter.h; path = MJRefresh/Custom/Footer/Auto/MJRefreshAutoStateFooter.h; sourceTree = ""; }; 50326B09F3EE3C1566A9F7F13549C043 /* Pods-CMPageTitleViewUITests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-CMPageTitleViewUITests-umbrella.h"; sourceTree = ""; }; 50C1BF6B3E352AE839D67E55AF763D2D /* MJRefreshHeader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshHeader.m; path = MJRefresh/Base/MJRefreshHeader.m; sourceTree = ""; }; 510AECDEC5986B705AD95C6F37B337F3 /* MJRefresh-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "MJRefresh-Info.plist"; sourceTree = ""; }; 51443F7B3648391A06DA54AA99F61FD3 /* Pods-CMPageTitleView-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-CMPageTitleView-acknowledgements.plist"; sourceTree = ""; }; 54D72382CC9984AAA0404B9874F40B7E /* MJRefreshComponent.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshComponent.h; path = MJRefresh/Base/MJRefreshComponent.h; sourceTree = ""; }; 557B65A3BD859CC1459F96AC95ABB698 /* MASViewConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASViewConstraint.h; path = Masonry/MASViewConstraint.h; sourceTree = ""; }; 5781A96D20855D941A2DAB20A503FD30 /* MJRefreshAutoStateFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshAutoStateFooter.m; path = MJRefresh/Custom/Footer/Auto/MJRefreshAutoStateFooter.m; sourceTree = ""; }; 5A79552D96931BB4F04EAED94D6CBC5F /* MJRefreshBackGifFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshBackGifFooter.h; path = MJRefresh/Custom/Footer/Back/MJRefreshBackGifFooter.h; sourceTree = ""; }; 5B5FB5952B431CD293A90418EA9F8F1D /* MJRefreshBackStateFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshBackStateFooter.h; path = MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.h; sourceTree = ""; }; 5B9E1F826B971AAAC39AA5D4AF1795E3 /* View+MASAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "View+MASAdditions.m"; path = "Masonry/View+MASAdditions.m"; sourceTree = ""; }; 5BDFEDE4D1AB3B9563ABAD5609E30CA7 /* Masonry-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Masonry-Info.plist"; sourceTree = ""; }; 5C1135AA186408C7594B27F642666F6D /* MJRefreshAutoGifFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshAutoGifFooter.h; path = MJRefresh/Custom/Footer/Auto/MJRefreshAutoGifFooter.h; sourceTree = ""; }; 5CC3842B2D7BFCB6E9AB48E716C30226 /* MJRefresh.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = MJRefresh.modulemap; sourceTree = ""; }; 5F7D9620C1A9CB531019E2C75DDE5B37 /* Pods-CMPageTitleView.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-CMPageTitleView.debug.xcconfig"; sourceTree = ""; }; 6136CCE8A30E0E3797060C0AA431BD80 /* ViewController+MASAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "ViewController+MASAdditions.m"; path = "Masonry/ViewController+MASAdditions.m"; sourceTree = ""; }; 63DEF17D0F1010F9754F2CEA4F0C4AC8 /* Masonry-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Masonry-prefix.pch"; sourceTree = ""; }; 64658E1A4A43B1F4154A43B0EC9F31B7 /* MASCompositeConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASCompositeConstraint.m; path = Masonry/MASCompositeConstraint.m; sourceTree = ""; }; 6731151681D56842659A55111E28F2BB /* NSArray+MASAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSArray+MASAdditions.h"; path = "Masonry/NSArray+MASAdditions.h"; sourceTree = ""; }; 6B676ABCE1DC826963455A4B8DE2C46B /* Pods_CMPageTitleViewTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_CMPageTitleViewTests.framework; path = "Pods-CMPageTitleViewTests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 7031580317D786D465A8E4E4520B5121 /* MJRefreshAutoNormalFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshAutoNormalFooter.h; path = MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.h; sourceTree = ""; }; 71882775BC6804A4893B191B56C56797 /* Pods-CMPageTitleViewTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-CMPageTitleViewTests-umbrella.h"; sourceTree = ""; }; 71988BF20F5AEE732DE4B753977F3402 /* MJRefresh.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = MJRefresh.release.xcconfig; sourceTree = ""; }; 72519F567AC5720B31EC153F396FE786 /* MASLayoutConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASLayoutConstraint.h; path = Masonry/MASLayoutConstraint.h; sourceTree = ""; }; 78E6662F74EF881BD2BF382C7D25691F /* Pods_CMPageTitleViewUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_CMPageTitleViewUITests.framework; path = "Pods-CMPageTitleViewUITests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 79F8F647B0719B7ABC2232A76D22EA3B /* MJRefreshAutoNormalFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshAutoNormalFooter.m; path = MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.m; sourceTree = ""; }; 7AE6762EB1AFE9E2215B958C9D060564 /* MJRefreshAutoGifFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshAutoGifFooter.m; path = MJRefresh/Custom/Footer/Auto/MJRefreshAutoGifFooter.m; sourceTree = ""; }; 7C8E7791CC5B7284B21B50CC4CCB9F19 /* MJRefreshBackStateFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshBackStateFooter.m; path = MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.m; sourceTree = ""; }; 7E5853BD58B4521FBFF2A8A3D159F898 /* MJRefreshAutoFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshAutoFooter.h; path = MJRefresh/Base/MJRefreshAutoFooter.h; sourceTree = ""; }; 7E7368C1E44B54B70FB73FE458D483EB /* MJRefreshBackNormalFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshBackNormalFooter.m; path = MJRefresh/Custom/Footer/Back/MJRefreshBackNormalFooter.m; sourceTree = ""; }; 849E3A6E3C5F02101F8D2D1E06853C1A /* MJRefreshBackFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshBackFooter.h; path = MJRefresh/Base/MJRefreshBackFooter.h; sourceTree = ""; }; 85AE18DA48CBC4045DB00DAC46E03C40 /* NSLayoutConstraint+MASDebugAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSLayoutConstraint+MASDebugAdditions.m"; path = "Masonry/NSLayoutConstraint+MASDebugAdditions.m"; sourceTree = ""; }; 8CB8E52A5D4A105CDC9CA4C29A026CD8 /* MASViewAttribute.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASViewAttribute.h; path = Masonry/MASViewAttribute.h; sourceTree = ""; }; 8D13B90C852AC70B777ABB43F13A6CE2 /* MJRefreshHeader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshHeader.h; path = MJRefresh/Base/MJRefreshHeader.h; sourceTree = ""; }; 8D2551BE986A32088BDE209F47485256 /* MJRefreshGifHeader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshGifHeader.h; path = MJRefresh/Custom/Header/MJRefreshGifHeader.h; sourceTree = ""; }; 8E10AA9886E85AFEFE1C0F792FA21A65 /* Pods-CMPageTitleViewUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-CMPageTitleViewUITests.release.xcconfig"; sourceTree = ""; }; 8F085AFB51B2FB51DB03B43386850C3D /* Masonry-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Masonry-umbrella.h"; sourceTree = ""; }; 8F54B3CDA399D842E079F5A057E26954 /* MASCompositeConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASCompositeConstraint.h; path = Masonry/MASCompositeConstraint.h; sourceTree = ""; }; 9164D924CE46E614308E0A6E16735A8B /* Pods-CMPageTitleViewTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-CMPageTitleViewTests.modulemap"; sourceTree = ""; }; 95D96574DF8B434321EBBC30A67E08C2 /* NSLayoutConstraint+MASDebugAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSLayoutConstraint+MASDebugAdditions.h"; path = "Masonry/NSLayoutConstraint+MASDebugAdditions.h"; sourceTree = ""; }; 9658B88594AA09FB4F50D2391C6669CB /* Pods-CMPageTitleViewUITests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-CMPageTitleViewUITests-acknowledgements.plist"; sourceTree = ""; }; 969C926E4CC79AB6FE4C1D0C414D732A /* MJRefreshFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshFooter.m; path = MJRefresh/Base/MJRefreshFooter.m; sourceTree = ""; }; 98C3C844CD7E8B1D27B1845FC714B75F /* View+MASShorthandAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "View+MASShorthandAdditions.h"; path = "Masonry/View+MASShorthandAdditions.h"; sourceTree = ""; }; 9B7AA057D2EFE3A8DAC8E632D639F651 /* MJRefresh.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = MJRefresh.debug.xcconfig; sourceTree = ""; }; 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; A1C08364CD96310D0E21D8C445C7E002 /* MJRefreshStateHeader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshStateHeader.m; path = MJRefresh/Custom/Header/MJRefreshStateHeader.m; sourceTree = ""; }; A280D2C83F6A6B7F38EE84535FADB7D3 /* Masonry.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Masonry.release.xcconfig; sourceTree = ""; }; A2CC277F1A836E56D5C94DE1420A095C /* MJRefreshAutoFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshAutoFooter.m; path = MJRefresh/Base/MJRefreshAutoFooter.m; sourceTree = ""; }; A6594EAE8702A90CA3F1773A79999249 /* MASViewConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASViewConstraint.m; path = Masonry/MASViewConstraint.m; sourceTree = ""; }; A80986864327A746C5DA7408677DC9F2 /* MASConstraintMaker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASConstraintMaker.h; path = Masonry/MASConstraintMaker.h; sourceTree = ""; }; A99DEECC53D33A8B3CA15FB4EA06B5D5 /* Pods-CMPageTitleViewUITests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-CMPageTitleViewUITests-dummy.m"; sourceTree = ""; }; AAAE80C9A92EA002B7A031BB6C06CA09 /* MJRefreshConfig.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshConfig.m; path = MJRefresh/MJRefreshConfig.m; sourceTree = ""; }; AC98542493E2F3BEF723F75ED52F1098 /* MJRefreshGifHeader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshGifHeader.m; path = MJRefresh/Custom/Header/MJRefreshGifHeader.m; sourceTree = ""; }; B4CC43BC9D3B607239F8F525790740D0 /* UIView+MJExtension.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIView+MJExtension.m"; path = "MJRefresh/UIView+MJExtension.m"; sourceTree = ""; }; B6BAE7FE0F4764770884ED3CD66C4DB8 /* Pods-CMPageTitleView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-CMPageTitleView-dummy.m"; sourceTree = ""; }; B7CF07A659DA3FD1417E55C3D940CAB2 /* MJRefreshConst.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshConst.m; path = MJRefresh/MJRefreshConst.m; sourceTree = ""; }; B88F6678969F36526E5116942AC79EAE /* MJRefreshBackFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshBackFooter.m; path = MJRefresh/Base/MJRefreshBackFooter.m; sourceTree = ""; }; BCA2EDE47B964AC11F486837D63E2860 /* NSArray+MASShorthandAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSArray+MASShorthandAdditions.h"; path = "Masonry/NSArray+MASShorthandAdditions.h"; sourceTree = ""; }; C03F9FD01409860B7FE1A2549DFBDA2C /* MJRefreshConst.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshConst.h; path = MJRefresh/MJRefreshConst.h; sourceTree = ""; }; C390E62F311D43C9B026E8422636AA64 /* NSBundle+MJRefresh.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSBundle+MJRefresh.h"; path = "MJRefresh/NSBundle+MJRefresh.h"; sourceTree = ""; }; C81E9A59402FF5FB04A646C0FDED90E6 /* UIView+MJExtension.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIView+MJExtension.h"; path = "MJRefresh/UIView+MJExtension.h"; sourceTree = ""; }; CAB1CA5FBE2A8D0A01576FAD78353FCC /* MJRefreshStateHeader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshStateHeader.h; path = MJRefresh/Custom/Header/MJRefreshStateHeader.h; sourceTree = ""; }; CD0ADAD897F85351367C0E05C8A9A30D /* Pods-CMPageTitleViewTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-CMPageTitleViewTests.debug.xcconfig"; sourceTree = ""; }; D03159CF32D95C81F0F83D2A897ECFB5 /* UIScrollView+MJRefresh.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIScrollView+MJRefresh.m"; path = "MJRefresh/UIScrollView+MJRefresh.m"; sourceTree = ""; }; D5B2AEEE5DFCC92F154F9DE86A567BC4 /* Pods-CMPageTitleViewUITests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-CMPageTitleViewUITests-acknowledgements.markdown"; sourceTree = ""; }; D65260643FA15C9CD4FB1012F3AA539A /* Pods-CMPageTitleViewTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-CMPageTitleViewTests.release.xcconfig"; sourceTree = ""; }; D7ED1A374CB7F96D6BB073121230A82A /* Pods_CMPageTitleView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_CMPageTitleView.framework; path = "Pods-CMPageTitleView.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; D8B038DCF63D69CF9A8FE40AB097C2EA /* MJRefresh.bundle */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "wrapper.plug-in"; name = MJRefresh.bundle; path = MJRefresh/MJRefresh.bundle; sourceTree = ""; }; D92A55C70EA32227409FB64D29935523 /* MJRefreshBackGifFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshBackGifFooter.m; path = MJRefresh/Custom/Footer/Back/MJRefreshBackGifFooter.m; sourceTree = ""; }; D9D8E678A9C64D2F40F1F5E02B185A58 /* Pods-CMPageTitleView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-CMPageTitleView.modulemap"; sourceTree = ""; }; D9F2BB5B51D51567FA343469F514E3B1 /* MASConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASConstraint.m; path = Masonry/MASConstraint.m; sourceTree = ""; }; DBFD38B27ADDE65F15FD90C8C88A03E8 /* Pods-CMPageTitleViewTests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-CMPageTitleViewTests-Info.plist"; sourceTree = ""; }; DDE75536DE38472CA99A61B75EFDA722 /* MJRefreshConfig.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshConfig.h; path = MJRefresh/MJRefreshConfig.h; sourceTree = ""; }; DE119CB1C665E82082DC244870B832A9 /* Pods-CMPageTitleView-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-CMPageTitleView-Info.plist"; sourceTree = ""; }; E0C5269E7EBEF6D14DC61F631E2C3D65 /* MJRefreshNormalHeader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshNormalHeader.m; path = MJRefresh/Custom/Header/MJRefreshNormalHeader.m; sourceTree = ""; }; E49D6D248DD1CEE584E6776B9164A1B2 /* MJRefresh.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = MJRefresh.framework; path = MJRefresh.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E8F17F2D5EC829865D0BB5C80F7EB60E /* Pods-CMPageTitleViewUITests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-CMPageTitleViewUITests-Info.plist"; sourceTree = ""; }; E908C42BB6680E6325D3E364F04D6B7F /* Pods-CMPageTitleView-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-CMPageTitleView-frameworks.sh"; sourceTree = ""; }; EC3B6C0E58B3CAF4A4F44A18259ACBBE /* Pods-CMPageTitleView.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-CMPageTitleView.release.xcconfig"; sourceTree = ""; }; EC666CB8A846EE6596187C3B23DF6FD2 /* MJRefresh-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MJRefresh-prefix.pch"; sourceTree = ""; }; EEC0F96F587621AAF7475CC4B8AE7A7B /* Pods-CMPageTitleViewUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-CMPageTitleViewUITests.debug.xcconfig"; sourceTree = ""; }; EFD4D46BB8AF4E6120EDCFA70D1D7AC8 /* ViewController+MASAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "ViewController+MASAdditions.h"; path = "Masonry/ViewController+MASAdditions.h"; sourceTree = ""; }; F4602B13663605471CA290ED901C23BB /* Masonry.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Masonry.modulemap; sourceTree = ""; }; F7856316859155F5DB3FD2ED3A749330 /* UIScrollView+MJRefresh.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIScrollView+MJRefresh.h"; path = "MJRefresh/UIScrollView+MJRefresh.h"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 1449BF7AB787E9C16643719D6E740764 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 710200F11DC7A1879D4DD570EAC49AEC /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; 2512AA370D93193ED6F25C0C66B7EADB /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( A25E7116FB360F05B59277B542E0E8C8 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; 5E047F76604659BF1B2099B2C412AC93 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( E51F496BDC6ACADE04FDA059C6CB2342 /* Foundation.framework in Frameworks */, CE93C54413259B4AC3683B6EB874D466 /* UIKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; 66DC1CD211FB1DEDF0287E0FF91483D9 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 1C2EF8A09FA2E0C380229C9D93AB7E9F /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; FFB4A7ADB4C3CF1B4C43CD9005136168 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( DC61A8F0AF15C821C2C04A9ECC7FD124 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 079EA4305D66B70537F4A7A27F62EE30 /* Targets Support Files */ = { isa = PBXGroup; children = ( EA0F13C7CB841A55783925C7E93A3584 /* Pods-CMPageTitleView */, 6E3F0C1BE3D03F0822E4B055B109EFFC /* Pods-CMPageTitleViewTests */, 9442A1625053BCC41ED1BD0F77DED335 /* Pods-CMPageTitleViewUITests */, ); name = "Targets Support Files"; sourceTree = ""; }; 140775CCFDCF42F77BE3AA1ADD4033B1 /* Resources */ = { isa = PBXGroup; children = ( D8B038DCF63D69CF9A8FE40AB097C2EA /* MJRefresh.bundle */, ); name = Resources; sourceTree = ""; }; 1628BF05B4CAFDCC3549A101F5A10A17 /* Frameworks */ = { isa = PBXGroup; children = ( E2983683FD097A93297E2F5D4E382B36 /* iOS */, ); name = Frameworks; sourceTree = ""; }; 4322BF3647E9BEA96DBBB62D543A8EC6 /* Products */ = { isa = PBXGroup; children = ( 1FFED36A657123030ABB700256D73F15 /* Masonry.framework */, E49D6D248DD1CEE584E6776B9164A1B2 /* MJRefresh.framework */, D7ED1A374CB7F96D6BB073121230A82A /* Pods_CMPageTitleView.framework */, 6B676ABCE1DC826963455A4B8DE2C46B /* Pods_CMPageTitleViewTests.framework */, 78E6662F74EF881BD2BF382C7D25691F /* Pods_CMPageTitleViewUITests.framework */, ); name = Products; sourceTree = ""; }; 5C2235B2321BEF59C3E29332AC626875 /* Masonry */ = { isa = PBXGroup; children = ( 8F54B3CDA399D842E079F5A057E26954 /* MASCompositeConstraint.h */, 64658E1A4A43B1F4154A43B0EC9F31B7 /* MASCompositeConstraint.m */, 29764F80B1DBE7A99A6FEE44224E9CBE /* MASConstraint.h */, D9F2BB5B51D51567FA343469F514E3B1 /* MASConstraint.m */, 123CB291FE31EE69DB264F2765B55FE0 /* MASConstraint+Private.h */, A80986864327A746C5DA7408677DC9F2 /* MASConstraintMaker.h */, 3CF8A21920538F2D981BEE096FE91CB1 /* MASConstraintMaker.m */, 72519F567AC5720B31EC153F396FE786 /* MASLayoutConstraint.h */, 47C5BE93CDEC5D526DB731D7F3B4629F /* MASLayoutConstraint.m */, 367E319CA582DABE128B26B726DE77D7 /* Masonry.h */, 4807F6C9C23935122DBF8F9CF2B0DAE5 /* MASUtilities.h */, 8CB8E52A5D4A105CDC9CA4C29A026CD8 /* MASViewAttribute.h */, 2444DD08B0775A8D476F3D23751A25AA /* MASViewAttribute.m */, 557B65A3BD859CC1459F96AC95ABB698 /* MASViewConstraint.h */, A6594EAE8702A90CA3F1773A79999249 /* MASViewConstraint.m */, 6731151681D56842659A55111E28F2BB /* NSArray+MASAdditions.h */, 48C0BB9A3CECFD13B418C71AE6F62A16 /* NSArray+MASAdditions.m */, BCA2EDE47B964AC11F486837D63E2860 /* NSArray+MASShorthandAdditions.h */, 95D96574DF8B434321EBBC30A67E08C2 /* NSLayoutConstraint+MASDebugAdditions.h */, 85AE18DA48CBC4045DB00DAC46E03C40 /* NSLayoutConstraint+MASDebugAdditions.m */, 0192A3EBF7EDC052F89FDAFDE47CE40D /* View+MASAdditions.h */, 5B9E1F826B971AAAC39AA5D4AF1795E3 /* View+MASAdditions.m */, 98C3C844CD7E8B1D27B1845FC714B75F /* View+MASShorthandAdditions.h */, EFD4D46BB8AF4E6120EDCFA70D1D7AC8 /* ViewController+MASAdditions.h */, 6136CCE8A30E0E3797060C0AA431BD80 /* ViewController+MASAdditions.m */, 8DB2FB0F94EA6A7A591B1D1BA684F3A5 /* Support Files */, ); name = Masonry; path = Masonry; sourceTree = ""; }; 60C32F552F1456C6B3BB1F3E9BCDC857 /* MJRefresh */ = { isa = PBXGroup; children = ( 43A47D683DB85324CC83C41AD6991789 /* MJRefresh.h */, 7E5853BD58B4521FBFF2A8A3D159F898 /* MJRefreshAutoFooter.h */, A2CC277F1A836E56D5C94DE1420A095C /* MJRefreshAutoFooter.m */, 5C1135AA186408C7594B27F642666F6D /* MJRefreshAutoGifFooter.h */, 7AE6762EB1AFE9E2215B958C9D060564 /* MJRefreshAutoGifFooter.m */, 7031580317D786D465A8E4E4520B5121 /* MJRefreshAutoNormalFooter.h */, 79F8F647B0719B7ABC2232A76D22EA3B /* MJRefreshAutoNormalFooter.m */, 501DCE274A5695A57A682C23C2F90BEF /* MJRefreshAutoStateFooter.h */, 5781A96D20855D941A2DAB20A503FD30 /* MJRefreshAutoStateFooter.m */, 849E3A6E3C5F02101F8D2D1E06853C1A /* MJRefreshBackFooter.h */, B88F6678969F36526E5116942AC79EAE /* MJRefreshBackFooter.m */, 5A79552D96931BB4F04EAED94D6CBC5F /* MJRefreshBackGifFooter.h */, D92A55C70EA32227409FB64D29935523 /* MJRefreshBackGifFooter.m */, 3D4724F3FDA820D4A25E2D2135EFA864 /* MJRefreshBackNormalFooter.h */, 7E7368C1E44B54B70FB73FE458D483EB /* MJRefreshBackNormalFooter.m */, 5B5FB5952B431CD293A90418EA9F8F1D /* MJRefreshBackStateFooter.h */, 7C8E7791CC5B7284B21B50CC4CCB9F19 /* MJRefreshBackStateFooter.m */, 54D72382CC9984AAA0404B9874F40B7E /* MJRefreshComponent.h */, 3FA0D4A95BD573E2B5710C8C402E7AFF /* MJRefreshComponent.m */, DDE75536DE38472CA99A61B75EFDA722 /* MJRefreshConfig.h */, AAAE80C9A92EA002B7A031BB6C06CA09 /* MJRefreshConfig.m */, C03F9FD01409860B7FE1A2549DFBDA2C /* MJRefreshConst.h */, B7CF07A659DA3FD1417E55C3D940CAB2 /* MJRefreshConst.m */, 3F789481302EC7C6996182B0AE6E0A1D /* MJRefreshFooter.h */, 969C926E4CC79AB6FE4C1D0C414D732A /* MJRefreshFooter.m */, 8D2551BE986A32088BDE209F47485256 /* MJRefreshGifHeader.h */, AC98542493E2F3BEF723F75ED52F1098 /* MJRefreshGifHeader.m */, 8D13B90C852AC70B777ABB43F13A6CE2 /* MJRefreshHeader.h */, 50C1BF6B3E352AE839D67E55AF763D2D /* MJRefreshHeader.m */, 0E774A9D01FFE81E338DDCF9A4AF9E0C /* MJRefreshNormalHeader.h */, E0C5269E7EBEF6D14DC61F631E2C3D65 /* MJRefreshNormalHeader.m */, CAB1CA5FBE2A8D0A01576FAD78353FCC /* MJRefreshStateHeader.h */, A1C08364CD96310D0E21D8C445C7E002 /* MJRefreshStateHeader.m */, C390E62F311D43C9B026E8422636AA64 /* NSBundle+MJRefresh.h */, 00A5CBB96CE92EF465978155F0780B6B /* NSBundle+MJRefresh.m */, 2CB629949AB5725BA51A46653699430D /* UIScrollView+MJExtension.h */, 20DFE963091020A5048A0C0A66E56646 /* UIScrollView+MJExtension.m */, F7856316859155F5DB3FD2ED3A749330 /* UIScrollView+MJRefresh.h */, D03159CF32D95C81F0F83D2A897ECFB5 /* UIScrollView+MJRefresh.m */, C81E9A59402FF5FB04A646C0FDED90E6 /* UIView+MJExtension.h */, B4CC43BC9D3B607239F8F525790740D0 /* UIView+MJExtension.m */, 140775CCFDCF42F77BE3AA1ADD4033B1 /* Resources */, DAE307306F1BF2AA040DA62A1B48BDAB /* Support Files */, ); name = MJRefresh; path = MJRefresh; sourceTree = ""; }; 6E3F0C1BE3D03F0822E4B055B109EFFC /* Pods-CMPageTitleViewTests */ = { isa = PBXGroup; children = ( 9164D924CE46E614308E0A6E16735A8B /* Pods-CMPageTitleViewTests.modulemap */, 1F650C08D5FF699E2BE5CC74C3583C34 /* Pods-CMPageTitleViewTests-acknowledgements.markdown */, 4C326369DBF924526C742096A1ED47A5 /* Pods-CMPageTitleViewTests-acknowledgements.plist */, 0972DACFACDAD2180ADF1DFD6295DC59 /* Pods-CMPageTitleViewTests-dummy.m */, DBFD38B27ADDE65F15FD90C8C88A03E8 /* Pods-CMPageTitleViewTests-Info.plist */, 71882775BC6804A4893B191B56C56797 /* Pods-CMPageTitleViewTests-umbrella.h */, CD0ADAD897F85351367C0E05C8A9A30D /* Pods-CMPageTitleViewTests.debug.xcconfig */, D65260643FA15C9CD4FB1012F3AA539A /* Pods-CMPageTitleViewTests.release.xcconfig */, ); name = "Pods-CMPageTitleViewTests"; path = "Target Support Files/Pods-CMPageTitleViewTests"; sourceTree = ""; }; 8DB2FB0F94EA6A7A591B1D1BA684F3A5 /* Support Files */ = { isa = PBXGroup; children = ( F4602B13663605471CA290ED901C23BB /* Masonry.modulemap */, 30E9201613B1E0097657C20E8B0B28F3 /* Masonry-dummy.m */, 5BDFEDE4D1AB3B9563ABAD5609E30CA7 /* Masonry-Info.plist */, 63DEF17D0F1010F9754F2CEA4F0C4AC8 /* Masonry-prefix.pch */, 8F085AFB51B2FB51DB03B43386850C3D /* Masonry-umbrella.h */, 489BCC574AA74C00D76279E2BD70D85C /* Masonry.debug.xcconfig */, A280D2C83F6A6B7F38EE84535FADB7D3 /* Masonry.release.xcconfig */, ); name = "Support Files"; path = "../Target Support Files/Masonry"; sourceTree = ""; }; 9442A1625053BCC41ED1BD0F77DED335 /* Pods-CMPageTitleViewUITests */ = { isa = PBXGroup; children = ( 2859FEF0448954C5A588DE2E2C1B1585 /* Pods-CMPageTitleViewUITests.modulemap */, D5B2AEEE5DFCC92F154F9DE86A567BC4 /* Pods-CMPageTitleViewUITests-acknowledgements.markdown */, 9658B88594AA09FB4F50D2391C6669CB /* Pods-CMPageTitleViewUITests-acknowledgements.plist */, A99DEECC53D33A8B3CA15FB4EA06B5D5 /* Pods-CMPageTitleViewUITests-dummy.m */, E8F17F2D5EC829865D0BB5C80F7EB60E /* Pods-CMPageTitleViewUITests-Info.plist */, 50326B09F3EE3C1566A9F7F13549C043 /* Pods-CMPageTitleViewUITests-umbrella.h */, EEC0F96F587621AAF7475CC4B8AE7A7B /* Pods-CMPageTitleViewUITests.debug.xcconfig */, 8E10AA9886E85AFEFE1C0F792FA21A65 /* Pods-CMPageTitleViewUITests.release.xcconfig */, ); name = "Pods-CMPageTitleViewUITests"; path = "Target Support Files/Pods-CMPageTitleViewUITests"; sourceTree = ""; }; BC838A6CF81FA607D40D3F5D661F72F1 /* Pods */ = { isa = PBXGroup; children = ( 5C2235B2321BEF59C3E29332AC626875 /* Masonry */, 60C32F552F1456C6B3BB1F3E9BCDC857 /* MJRefresh */, ); name = Pods; sourceTree = ""; }; CF1408CF629C7361332E53B88F7BD30C = { isa = PBXGroup; children = ( 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, 1628BF05B4CAFDCC3549A101F5A10A17 /* Frameworks */, BC838A6CF81FA607D40D3F5D661F72F1 /* Pods */, 4322BF3647E9BEA96DBBB62D543A8EC6 /* Products */, 079EA4305D66B70537F4A7A27F62EE30 /* Targets Support Files */, ); sourceTree = ""; }; DAE307306F1BF2AA040DA62A1B48BDAB /* Support Files */ = { isa = PBXGroup; children = ( 5CC3842B2D7BFCB6E9AB48E716C30226 /* MJRefresh.modulemap */, 1CC90E78B946FC4937FE16FB420CE15E /* MJRefresh-dummy.m */, 510AECDEC5986B705AD95C6F37B337F3 /* MJRefresh-Info.plist */, EC666CB8A846EE6596187C3B23DF6FD2 /* MJRefresh-prefix.pch */, 09F269E405FB095B771D809E0EA605F6 /* MJRefresh-umbrella.h */, 9B7AA057D2EFE3A8DAC8E632D639F651 /* MJRefresh.debug.xcconfig */, 71988BF20F5AEE732DE4B753977F3402 /* MJRefresh.release.xcconfig */, ); name = "Support Files"; path = "../Target Support Files/MJRefresh"; sourceTree = ""; }; E2983683FD097A93297E2F5D4E382B36 /* iOS */ = { isa = PBXGroup; children = ( 436BAA54A31999B53B3CC7115C55FE50 /* Foundation.framework */, 312B988EF117AE4DE76A268D970131FE /* UIKit.framework */, ); name = iOS; sourceTree = ""; }; EA0F13C7CB841A55783925C7E93A3584 /* Pods-CMPageTitleView */ = { isa = PBXGroup; children = ( D9D8E678A9C64D2F40F1F5E02B185A58 /* Pods-CMPageTitleView.modulemap */, 471D9233D2FF27D996887B928F59995C /* Pods-CMPageTitleView-acknowledgements.markdown */, 51443F7B3648391A06DA54AA99F61FD3 /* Pods-CMPageTitleView-acknowledgements.plist */, B6BAE7FE0F4764770884ED3CD66C4DB8 /* Pods-CMPageTitleView-dummy.m */, E908C42BB6680E6325D3E364F04D6B7F /* Pods-CMPageTitleView-frameworks.sh */, DE119CB1C665E82082DC244870B832A9 /* Pods-CMPageTitleView-Info.plist */, 176633DDD680434231633C3F2146515D /* Pods-CMPageTitleView-umbrella.h */, 5F7D9620C1A9CB531019E2C75DDE5B37 /* Pods-CMPageTitleView.debug.xcconfig */, EC3B6C0E58B3CAF4A4F44A18259ACBBE /* Pods-CMPageTitleView.release.xcconfig */, ); name = "Pods-CMPageTitleView"; path = "Target Support Files/Pods-CMPageTitleView"; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ 4AC220F1C9986F0F3E521E4A60E99984 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( 4D112B5D14F7B1A1D92F9ACBA122609E /* Pods-CMPageTitleViewTests-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; 5DAF7CE3A054E28E5CC4448144041F82 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( 33BFFC3BE2A20264B8F11AF0F4A889E6 /* Pods-CMPageTitleView-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; 7B04ACBA4522760CA66A5D4AFA498F81 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( 8D65CE579E516BDD5FB36CAA21D693F6 /* MASCompositeConstraint.h in Headers */, 9D546E1168C04B0B2EAE005D9275D18B /* MASConstraint+Private.h in Headers */, 941955A19C40899D275604E6E9C21A6D /* MASConstraint.h in Headers */, FAFBFA90F7BC3E7CF50F8A5CF0A8B264 /* MASConstraintMaker.h in Headers */, 8D4D1F6E4709EBB13974E95DC1059DDC /* MASLayoutConstraint.h in Headers */, 6A6AD3A5BBDBFD0B4AF936BD518EC0B1 /* Masonry-umbrella.h in Headers */, 346080C0D1CA23399ADD739D722D7CEF /* Masonry.h in Headers */, 280D36330BAC5715615FF4A8B42D60D6 /* MASUtilities.h in Headers */, 3DA5F1D8E51CDD102A871C2F37770C7B /* MASViewAttribute.h in Headers */, EAE8B0895956885A752B173683A0D889 /* MASViewConstraint.h in Headers */, 05EA1447EEA0EB669F8DEE73964A7C60 /* NSArray+MASAdditions.h in Headers */, 05A040F35BF1C88F869404E1A940B493 /* NSArray+MASShorthandAdditions.h in Headers */, 0AF1AD35706D90B1A91F291B899EF8C0 /* NSLayoutConstraint+MASDebugAdditions.h in Headers */, 4B0981F9AC628CF5100C50FF4A163A4A /* View+MASAdditions.h in Headers */, E7CA20228B3583F41927813EE904CAD3 /* View+MASShorthandAdditions.h in Headers */, 8B92011C9373001132C8148BFC8F50B3 /* ViewController+MASAdditions.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; 8F533FC8756A48A117F18EB029244213 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( 22B4E8E332D6508E244D2A0BFBEA6ABB /* Pods-CMPageTitleViewUITests-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; A85AAFC3C3F2D21FF0949F9C28F16F53 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( F57BA25385E6996D6EC18EDD97E596FE /* MJRefresh-umbrella.h in Headers */, 8638BD5B0012059ABB8B3C588633667C /* MJRefresh.h in Headers */, 050A189DF0B4F405E9D3389F24EDF835 /* MJRefreshAutoFooter.h in Headers */, 696BEC58A027BCCDFB378637C75C78A5 /* MJRefreshAutoGifFooter.h in Headers */, B545FC64504EB25999F30CFC1E27E702 /* MJRefreshAutoNormalFooter.h in Headers */, 852887173A1F802E93E8BF3FEDD3B8BD /* MJRefreshAutoStateFooter.h in Headers */, 595527C54E24251571AA3B9E61D616BE /* MJRefreshBackFooter.h in Headers */, D8328429281E82F67DB47AF6C9D95191 /* MJRefreshBackGifFooter.h in Headers */, D476A1AD427ED4B951ACCB95459033CC /* MJRefreshBackNormalFooter.h in Headers */, 528237787EC24E25AD6BB486B1BEBE5D /* MJRefreshBackStateFooter.h in Headers */, 95BD9ECE799ABE9F7F41DB1D4F44DE31 /* MJRefreshComponent.h in Headers */, 94940A2C852223F20EE7ED83A9BB5179 /* MJRefreshConfig.h in Headers */, CE7004AFA3B30D672A4DD9B4D3E6915B /* MJRefreshConst.h in Headers */, 4583409C21FCF11CB11FE51B0B235A00 /* MJRefreshFooter.h in Headers */, 06AEA7117FE98F2409D2432AAEC326A8 /* MJRefreshGifHeader.h in Headers */, 4F5A97CA16447E2BDF919A40C1652E9F /* MJRefreshHeader.h in Headers */, EECE40C6F296379F86ABB36AF79BB8EC /* MJRefreshNormalHeader.h in Headers */, BD9A09840189D37657887D1467CAA330 /* MJRefreshStateHeader.h in Headers */, 13611CB0839D7F8C3EFCB9F9ED5495BD /* NSBundle+MJRefresh.h in Headers */, CBDC089A3E26FC6825F64E078195BF01 /* UIScrollView+MJExtension.h in Headers */, 6C1461ED2AF53643934B4B97E9BB8A7D /* UIScrollView+MJRefresh.h in Headers */, C0B2C760334561E4910FADD8520C85C3 /* UIView+MJExtension.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ 55AF53E6C77A10ED4985E04D74A8878E /* Masonry */ = { isa = PBXNativeTarget; buildConfigurationList = 87FD40BD683E3BD044AA4D1B5CA58652 /* Build configuration list for PBXNativeTarget "Masonry" */; buildPhases = ( 7B04ACBA4522760CA66A5D4AFA498F81 /* Headers */, 038B428AD06C5A47FAF2BEFE16C6DC16 /* Sources */, 5E047F76604659BF1B2099B2C412AC93 /* Frameworks */, 895ED1B8779C1D82DF681CBFF67AC570 /* Resources */, ); buildRules = ( ); dependencies = ( ); name = Masonry; productName = Masonry; productReference = 1FFED36A657123030ABB700256D73F15 /* Masonry.framework */; productType = "com.apple.product-type.framework"; }; 5F805A508C0031321D24D510E67C5315 /* Pods-CMPageTitleViewUITests */ = { isa = PBXNativeTarget; buildConfigurationList = 4E91C1DD5663EF94475FFDBAE1D8D7F0 /* Build configuration list for PBXNativeTarget "Pods-CMPageTitleViewUITests" */; buildPhases = ( 8F533FC8756A48A117F18EB029244213 /* Headers */, B8A1482E8935C5AE9FE8E7F52458E2D3 /* Sources */, FFB4A7ADB4C3CF1B4C43CD9005136168 /* Frameworks */, 11CE77257DF72A14D4A92D8423A2090E /* Resources */, ); buildRules = ( ); dependencies = ( 75DC9AFBBDE67F8CD8F3A02C6D6B4D41 /* PBXTargetDependency */, ); name = "Pods-CMPageTitleViewUITests"; productName = "Pods-CMPageTitleViewUITests"; productReference = 78E6662F74EF881BD2BF382C7D25691F /* Pods_CMPageTitleViewUITests.framework */; productType = "com.apple.product-type.framework"; }; 6868056D761E163D10FDAF8CF1C4D9B8 /* MJRefresh */ = { isa = PBXNativeTarget; buildConfigurationList = D193193A5B2CEF5D2D4537C9CFF8D5AB /* Build configuration list for PBXNativeTarget "MJRefresh" */; buildPhases = ( A85AAFC3C3F2D21FF0949F9C28F16F53 /* Headers */, 2A86E49E117FE931BA78E876CF3B92C1 /* Sources */, 1449BF7AB787E9C16643719D6E740764 /* Frameworks */, B766E016B71C008CD9AF7646AD9C6F70 /* Resources */, ); buildRules = ( ); dependencies = ( ); name = MJRefresh; productName = MJRefresh; productReference = E49D6D248DD1CEE584E6776B9164A1B2 /* MJRefresh.framework */; productType = "com.apple.product-type.framework"; }; D054554EF4ABC31BC47EAB81D0DA69EC /* Pods-CMPageTitleView */ = { isa = PBXNativeTarget; buildConfigurationList = 57CA7408C31DB74587B138708C5A8C12 /* Build configuration list for PBXNativeTarget "Pods-CMPageTitleView" */; buildPhases = ( 5DAF7CE3A054E28E5CC4448144041F82 /* Headers */, 3349515D8D56ACE07A80D67DEA9CC57B /* Sources */, 66DC1CD211FB1DEDF0287E0FF91483D9 /* Frameworks */, 47FDA6E8C6CFE22F74F0D44C1518E084 /* Resources */, ); buildRules = ( ); dependencies = ( 2623EC5EDC52FB46808AF7D703A1EE3F /* PBXTargetDependency */, 0FAD3B678799B49D2564F6110B078527 /* PBXTargetDependency */, ); name = "Pods-CMPageTitleView"; productName = "Pods-CMPageTitleView"; productReference = D7ED1A374CB7F96D6BB073121230A82A /* Pods_CMPageTitleView.framework */; productType = "com.apple.product-type.framework"; }; DF382DB295A4E16F03938352617E805C /* Pods-CMPageTitleViewTests */ = { isa = PBXNativeTarget; buildConfigurationList = 6B65A3B0B458FFF68409215B229A759F /* Build configuration list for PBXNativeTarget "Pods-CMPageTitleViewTests" */; buildPhases = ( 4AC220F1C9986F0F3E521E4A60E99984 /* Headers */, CA0CC804862C11BA8B6F54E1490E616A /* Sources */, 2512AA370D93193ED6F25C0C66B7EADB /* Frameworks */, E31170F6CA67F84FFDE9396ADDAF030C /* Resources */, ); buildRules = ( ); dependencies = ( 6F3B21E247D02E91B7CB42A7038DDEDB /* PBXTargetDependency */, ); name = "Pods-CMPageTitleViewTests"; productName = "Pods-CMPageTitleViewTests"; productReference = 6B676ABCE1DC826963455A4B8DE2C46B /* Pods_CMPageTitleViewTests.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ BFDFE7DC352907FC980B868725387E98 /* Project object */ = { isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1100; LastUpgradeCheck = 1100; }; buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 10.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, Base, ); mainGroup = CF1408CF629C7361332E53B88F7BD30C; productRefGroup = 4322BF3647E9BEA96DBBB62D543A8EC6 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 55AF53E6C77A10ED4985E04D74A8878E /* Masonry */, 6868056D761E163D10FDAF8CF1C4D9B8 /* MJRefresh */, D054554EF4ABC31BC47EAB81D0DA69EC /* Pods-CMPageTitleView */, DF382DB295A4E16F03938352617E805C /* Pods-CMPageTitleViewTests */, 5F805A508C0031321D24D510E67C5315 /* Pods-CMPageTitleViewUITests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ 11CE77257DF72A14D4A92D8423A2090E /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 47FDA6E8C6CFE22F74F0D44C1518E084 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 895ED1B8779C1D82DF681CBFF67AC570 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; B766E016B71C008CD9AF7646AD9C6F70 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 0F47C7DE634D4FE07B595912093139FE /* MJRefresh.bundle in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; E31170F6CA67F84FFDE9396ADDAF030C /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 038B428AD06C5A47FAF2BEFE16C6DC16 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 7BFF65958F014760B6AC4742824892EB /* MASCompositeConstraint.m in Sources */, E8DD5D1D406150E1C80AD015271B6848 /* MASConstraint.m in Sources */, 78B2727EE5D693F58D019DB098005101 /* MASConstraintMaker.m in Sources */, 8539B851E01A58467BE49CA3FA77223C /* MASLayoutConstraint.m in Sources */, 1972E85F0FCD0F3EAF28ED7CD036286E /* Masonry-dummy.m in Sources */, 297A3627CF2F032CBFDC61D1A3786E63 /* MASViewAttribute.m in Sources */, B7D645EC004610E8A581E532D28771EC /* MASViewConstraint.m in Sources */, 098630ECDB64ED7B89F5F687C82B4AC3 /* NSArray+MASAdditions.m in Sources */, C0861ADB4C5FA30F4F9E051F7638A264 /* NSLayoutConstraint+MASDebugAdditions.m in Sources */, A35FBEEC7D088AEC05297E8292A32C77 /* View+MASAdditions.m in Sources */, 0967598607D521318F69D7D39D517B20 /* ViewController+MASAdditions.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 2A86E49E117FE931BA78E876CF3B92C1 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 5A384A2C99EB807D449323F9814098A9 /* MJRefresh-dummy.m in Sources */, 61EF33C64C26EDF6A86430C30CCC8125 /* MJRefreshAutoFooter.m in Sources */, 89407BE103B6AA73E90C8E0EF0C1AA08 /* MJRefreshAutoGifFooter.m in Sources */, 675F8319809B90A18BB685E1EA09F886 /* MJRefreshAutoNormalFooter.m in Sources */, DCCC7E7E734A732901932B2E9D662EE7 /* MJRefreshAutoStateFooter.m in Sources */, 86F2E53F22F26D2D030CA8ED679B5266 /* MJRefreshBackFooter.m in Sources */, ED3E2C1051BAC5B50BE441D95D8801C0 /* MJRefreshBackGifFooter.m in Sources */, FE350422B39C5EA00E5AA552F6D218FB /* MJRefreshBackNormalFooter.m in Sources */, EB209DF5DE13F4D802DA1BE20A9CEBD2 /* MJRefreshBackStateFooter.m in Sources */, 47C5E12941194A00ED65EECCD1E4B9C3 /* MJRefreshComponent.m in Sources */, A8F266741C653EAED3DD49D75DB9D5A8 /* MJRefreshConfig.m in Sources */, 22513825A54DC9B8C23BF0CC7F45B00F /* MJRefreshConst.m in Sources */, 0AECE221BADEA19083FC0CACE5973D8A /* MJRefreshFooter.m in Sources */, 85DBD599545B98F7AB17B94C86A4DC37 /* MJRefreshGifHeader.m in Sources */, 8F736DFA1256E8BE2DCC41F66F2A2561 /* MJRefreshHeader.m in Sources */, 39172F66777E6BC6EBFFC5948E3CC765 /* MJRefreshNormalHeader.m in Sources */, AA5F359B86973F47D34F4A0FD745E4EC /* MJRefreshStateHeader.m in Sources */, A7B257D75993F5C90FAEEB16780CC215 /* NSBundle+MJRefresh.m in Sources */, 45626116C19AA54A2359E85DAEB5AD42 /* UIScrollView+MJExtension.m in Sources */, 4055A0ACF4681DEA04E2F0AECD0B97B2 /* UIScrollView+MJRefresh.m in Sources */, 64FAE071FA6CADC6F4543DCD82705D12 /* UIView+MJExtension.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 3349515D8D56ACE07A80D67DEA9CC57B /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 6F11BF93701AB356B1CE164B6A438498 /* Pods-CMPageTitleView-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; B8A1482E8935C5AE9FE8E7F52458E2D3 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 87EACD9485ADA3B6BCAE4FD103431F13 /* Pods-CMPageTitleViewUITests-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; CA0CC804862C11BA8B6F54E1490E616A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 32DA0F5869BC32AEB94CA0A5DD9C8389 /* Pods-CMPageTitleViewTests-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ 0FAD3B678799B49D2564F6110B078527 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Masonry; target = 55AF53E6C77A10ED4985E04D74A8878E /* Masonry */; targetProxy = 00CC431496DCE5D516C5D85AB1615DB5 /* PBXContainerItemProxy */; }; 2623EC5EDC52FB46808AF7D703A1EE3F /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = MJRefresh; target = 6868056D761E163D10FDAF8CF1C4D9B8 /* MJRefresh */; targetProxy = D8FD8133485EC52F85A9076762DA0A37 /* PBXContainerItemProxy */; }; 6F3B21E247D02E91B7CB42A7038DDEDB /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "Pods-CMPageTitleView"; target = D054554EF4ABC31BC47EAB81D0DA69EC /* Pods-CMPageTitleView */; targetProxy = 797F658A9D1BAA318764E26137DBD872 /* PBXContainerItemProxy */; }; 75DC9AFBBDE67F8CD8F3A02C6D6B4D41 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "Pods-CMPageTitleView"; target = D054554EF4ABC31BC47EAB81D0DA69EC /* Pods-CMPageTitleView */; targetProxy = 772EA49C326C07E28CEB52F6C83473E0 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ 5A6C9C96991EDC970C760905804708C4 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = D65260643FA15C9CD4FB1012F3AA539A /* Pods-CMPageTitleViewTests.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "Target Support Files/Pods-CMPageTitleViewTests/Pods-CMPageTitleViewTests-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-CMPageTitleViewTests/Pods-CMPageTitleViewTests.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; 5F8D8AB6739414C69D01AE6A047060CF /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 5F7D9620C1A9CB531019E2C75DDE5B37 /* Pods-CMPageTitleView.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; 8F17DC3A99F99FBAD606CE6963886315 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_RELEASE=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; SYMROOT = "${SRCROOT}/../build"; }; name = Release; }; 916E0404255105F480DC4950B7625F7A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_DEBUG=1", "DEBUG=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; SYMROOT = "${SRCROOT}/../build"; }; name = Debug; }; 933C252AC1697174177192BE69B419F9 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 489BCC574AA74C00D76279E2BD70D85C /* Masonry.debug.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_PREFIX_HEADER = "Target Support Files/Masonry/Masonry-prefix.pch"; INFOPLIST_FILE = "Target Support Files/Masonry/Masonry-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); MODULEMAP_FILE = "Target Support Files/Masonry/Masonry.modulemap"; PRODUCT_MODULE_NAME = Masonry; PRODUCT_NAME = Masonry; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; CEF8ADC5C2118FD5FE07365B5CB9FF94 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 71988BF20F5AEE732DE4B753977F3402 /* MJRefresh.release.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_PREFIX_HEADER = "Target Support Files/MJRefresh/MJRefresh-prefix.pch"; INFOPLIST_FILE = "Target Support Files/MJRefresh/MJRefresh-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); MODULEMAP_FILE = "Target Support Files/MJRefresh/MJRefresh.modulemap"; PRODUCT_MODULE_NAME = MJRefresh; PRODUCT_NAME = MJRefresh; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; D1F20CA5AF74551DBEC539096B44760B /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = A280D2C83F6A6B7F38EE84535FADB7D3 /* Masonry.release.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_PREFIX_HEADER = "Target Support Files/Masonry/Masonry-prefix.pch"; INFOPLIST_FILE = "Target Support Files/Masonry/Masonry-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); MODULEMAP_FILE = "Target Support Files/Masonry/Masonry.modulemap"; PRODUCT_MODULE_NAME = Masonry; PRODUCT_NAME = Masonry; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; E8E3026A01C1609C6459FEFA0A6B4D88 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = EEC0F96F587621AAF7475CC4B8AE7A7B /* Pods-CMPageTitleViewUITests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "Target Support Files/Pods-CMPageTitleViewUITests/Pods-CMPageTitleViewUITests-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-CMPageTitleViewUITests/Pods-CMPageTitleViewUITests.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; E9469A074093877C53DC551E3AC75F0F /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = EC3B6C0E58B3CAF4A4F44A18259ACBBE /* Pods-CMPageTitleView.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; ED61F2166035CABF20DBCF634FD96CCB /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = CD0ADAD897F85351367C0E05C8A9A30D /* Pods-CMPageTitleViewTests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "Target Support Files/Pods-CMPageTitleViewTests/Pods-CMPageTitleViewTests-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-CMPageTitleViewTests/Pods-CMPageTitleViewTests.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; F10AA1F72BEB3164417166661ED439E8 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 8E10AA9886E85AFEFE1C0F792FA21A65 /* Pods-CMPageTitleViewUITests.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "Target Support Files/Pods-CMPageTitleViewUITests/Pods-CMPageTitleViewUITests-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-CMPageTitleViewUITests/Pods-CMPageTitleViewUITests.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; FD95AC7BA12C7D02140A6F6CFB535BFE /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 9B7AA057D2EFE3A8DAC8E632D639F651 /* MJRefresh.debug.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_PREFIX_HEADER = "Target Support Files/MJRefresh/MJRefresh-prefix.pch"; INFOPLIST_FILE = "Target Support Files/MJRefresh/MJRefresh-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); MODULEMAP_FILE = "Target Support Files/MJRefresh/MJRefresh.modulemap"; PRODUCT_MODULE_NAME = MJRefresh; PRODUCT_NAME = MJRefresh; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( 916E0404255105F480DC4950B7625F7A /* Debug */, 8F17DC3A99F99FBAD606CE6963886315 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 4E91C1DD5663EF94475FFDBAE1D8D7F0 /* Build configuration list for PBXNativeTarget "Pods-CMPageTitleViewUITests" */ = { isa = XCConfigurationList; buildConfigurations = ( E8E3026A01C1609C6459FEFA0A6B4D88 /* Debug */, F10AA1F72BEB3164417166661ED439E8 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 57CA7408C31DB74587B138708C5A8C12 /* Build configuration list for PBXNativeTarget "Pods-CMPageTitleView" */ = { isa = XCConfigurationList; buildConfigurations = ( 5F8D8AB6739414C69D01AE6A047060CF /* Debug */, E9469A074093877C53DC551E3AC75F0F /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 6B65A3B0B458FFF68409215B229A759F /* Build configuration list for PBXNativeTarget "Pods-CMPageTitleViewTests" */ = { isa = XCConfigurationList; buildConfigurations = ( ED61F2166035CABF20DBCF634FD96CCB /* Debug */, 5A6C9C96991EDC970C760905804708C4 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 87FD40BD683E3BD044AA4D1B5CA58652 /* Build configuration list for PBXNativeTarget "Masonry" */ = { isa = XCConfigurationList; buildConfigurations = ( 933C252AC1697174177192BE69B419F9 /* Debug */, D1F20CA5AF74551DBEC539096B44760B /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; D193193A5B2CEF5D2D4537C9CFF8D5AB /* Build configuration list for PBXNativeTarget "MJRefresh" */ = { isa = XCConfigurationList; buildConfigurations = ( FD95AC7BA12C7D02140A6F6CFB535BFE /* Debug */, CEF8ADC5C2118FD5FE07365B5CB9FF94 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; } ================================================ FILE: CMPageTitleView/Pods/Target Support Files/MJRefresh/MJRefresh-Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier ${PRODUCT_BUNDLE_IDENTIFIER} CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType FMWK CFBundleShortVersionString 3.4.3 CFBundleSignature ???? CFBundleVersion ${CURRENT_PROJECT_VERSION} NSPrincipalClass ================================================ FILE: CMPageTitleView/Pods/Target Support Files/MJRefresh/MJRefresh-dummy.m ================================================ #import @interface PodsDummy_MJRefresh : NSObject @end @implementation PodsDummy_MJRefresh @end ================================================ FILE: CMPageTitleView/Pods/Target Support Files/MJRefresh/MJRefresh-prefix.pch ================================================ #ifdef __OBJC__ #import #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) #define FOUNDATION_EXPORT extern "C" #else #define FOUNDATION_EXPORT extern #endif #endif #endif ================================================ FILE: CMPageTitleView/Pods/Target Support Files/MJRefresh/MJRefresh-umbrella.h ================================================ #ifdef __OBJC__ #import #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) #define FOUNDATION_EXPORT extern "C" #else #define FOUNDATION_EXPORT extern #endif #endif #endif #import "MJRefreshAutoFooter.h" #import "MJRefreshBackFooter.h" #import "MJRefreshComponent.h" #import "MJRefreshFooter.h" #import "MJRefreshHeader.h" #import "MJRefreshAutoGifFooter.h" #import "MJRefreshAutoNormalFooter.h" #import "MJRefreshAutoStateFooter.h" #import "MJRefreshBackGifFooter.h" #import "MJRefreshBackNormalFooter.h" #import "MJRefreshBackStateFooter.h" #import "MJRefreshGifHeader.h" #import "MJRefreshNormalHeader.h" #import "MJRefreshStateHeader.h" #import "MJRefresh.h" #import "MJRefreshConfig.h" #import "MJRefreshConst.h" #import "NSBundle+MJRefresh.h" #import "UIScrollView+MJExtension.h" #import "UIScrollView+MJRefresh.h" #import "UIView+MJExtension.h" FOUNDATION_EXPORT double MJRefreshVersionNumber; FOUNDATION_EXPORT const unsigned char MJRefreshVersionString[]; ================================================ FILE: CMPageTitleView/Pods/Target Support Files/MJRefresh/MJRefresh.debug.xcconfig ================================================ CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT} PODS_TARGET_SRCROOT = ${PODS_ROOT}/MJRefresh PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES ================================================ FILE: CMPageTitleView/Pods/Target Support Files/MJRefresh/MJRefresh.modulemap ================================================ framework module MJRefresh { umbrella header "MJRefresh-umbrella.h" export * module * { export * } } ================================================ FILE: CMPageTitleView/Pods/Target Support Files/MJRefresh/MJRefresh.release.xcconfig ================================================ CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT} PODS_TARGET_SRCROOT = ${PODS_ROOT}/MJRefresh PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Masonry/Masonry-Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier ${PRODUCT_BUNDLE_IDENTIFIER} CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType FMWK CFBundleShortVersionString 1.1.0 CFBundleSignature ???? CFBundleVersion ${CURRENT_PROJECT_VERSION} NSPrincipalClass ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Masonry/Masonry-dummy.m ================================================ #import @interface PodsDummy_Masonry : NSObject @end @implementation PodsDummy_Masonry @end ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Masonry/Masonry-prefix.pch ================================================ #ifdef __OBJC__ #import #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) #define FOUNDATION_EXPORT extern "C" #else #define FOUNDATION_EXPORT extern #endif #endif #endif ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Masonry/Masonry-umbrella.h ================================================ #ifdef __OBJC__ #import #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) #define FOUNDATION_EXPORT extern "C" #else #define FOUNDATION_EXPORT extern #endif #endif #endif #import "MASCompositeConstraint.h" #import "MASConstraint+Private.h" #import "MASConstraint.h" #import "MASConstraintMaker.h" #import "MASLayoutConstraint.h" #import "Masonry.h" #import "MASUtilities.h" #import "MASViewAttribute.h" #import "MASViewConstraint.h" #import "NSArray+MASAdditions.h" #import "NSArray+MASShorthandAdditions.h" #import "NSLayoutConstraint+MASDebugAdditions.h" #import "View+MASAdditions.h" #import "View+MASShorthandAdditions.h" #import "ViewController+MASAdditions.h" FOUNDATION_EXPORT double MasonryVersionNumber; FOUNDATION_EXPORT const unsigned char MasonryVersionString[]; ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Masonry/Masonry.debug.xcconfig ================================================ CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Masonry GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "UIKit" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT} PODS_TARGET_SRCROOT = ${PODS_ROOT}/Masonry PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Masonry/Masonry.modulemap ================================================ framework module Masonry { umbrella header "Masonry-umbrella.h" export * module * { export * } } ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Masonry/Masonry.release.xcconfig ================================================ CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Masonry GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "UIKit" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT} PODS_TARGET_SRCROOT = ${PODS_ROOT}/Masonry PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Masonry/Masonry.xcconfig ================================================ CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Masonry GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "UIKit" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT} PODS_TARGET_SRCROOT = ${PODS_ROOT}/Masonry PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView-Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier ${PRODUCT_BUNDLE_IDENTIFIER} CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType FMWK CFBundleShortVersionString 1.0.0 CFBundleSignature ???? CFBundleVersion ${CURRENT_PROJECT_VERSION} NSPrincipalClass ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView-acknowledgements.markdown ================================================ # Acknowledgements This application makes use of the following third party libraries: ## MJRefresh Copyright (c) 2013-2015 MJRefresh (https://github.com/CoderMJLee/MJRefresh) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## Masonry Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Generated by CocoaPods - https://cocoapods.org ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView-acknowledgements.plist ================================================ PreferenceSpecifiers FooterText This application makes use of the following third party libraries: Title Acknowledgements Type PSGroupSpecifier FooterText Copyright (c) 2013-2015 MJRefresh (https://github.com/CoderMJLee/MJRefresh) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. License MIT Title MJRefresh Type PSGroupSpecifier FooterText Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. License MIT Title Masonry Type PSGroupSpecifier FooterText Generated by CocoaPods - https://cocoapods.org Title Type PSGroupSpecifier StringsTable Acknowledgements Title Acknowledgements ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView-dummy.m ================================================ #import @interface PodsDummy_Pods_CMPageTitleView : NSObject @end @implementation PodsDummy_Pods_CMPageTitleView @end ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView-frameworks-Debug-input-files.xcfilelist ================================================ ${PODS_ROOT}/Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView-frameworks.sh ${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework ${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView-frameworks-Debug-output-files.xcfilelist ================================================ ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView-frameworks-Release-input-files.xcfilelist ================================================ ${PODS_ROOT}/Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView-frameworks.sh ${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework ${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView-frameworks-Release-output-files.xcfilelist ================================================ ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView-frameworks.sh ================================================ #!/bin/sh set -e set -u set -o pipefail function on_error { echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" } trap 'on_error $LINENO' ERR if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy # frameworks to, so exit 0 (signalling the script phase was successful). exit 0 fi echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" # Used as a return value for each invocation of `strip_invalid_archs` function. STRIP_BINARY_RETVAL=0 # This protects against multiple targets copying the same framework dependency at the same time. The solution # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") # Copies and strips a vendored framework install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then local source="${BUILT_PRODUCTS_DIR}/$1" elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" elif [ -r "$1" ]; then local source="$1" fi local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" if [ -L "${source}" ]; then echo "Symlinked..." source="$(readlink "${source}")" fi # Use filter instead of exclude so missing patterns don't throw errors. echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" local basename basename="$(basename -s .framework "$1")" binary="${destination}/${basename}.framework/${basename}" if ! [ -r "$binary" ]; then binary="${destination}/${basename}" elif [ -L "${binary}" ]; then echo "Destination binary is symlinked..." dirname="$(dirname "${binary}")" binary="${dirname}/$(readlink "${binary}")" fi # Strip invalid architectures so "fat" simulator / device frameworks work on device if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then strip_invalid_archs "$binary" fi # Resign the code if required by the build settings to avoid unstable apps code_sign_if_enabled "${destination}/$(basename "$1")" # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then local swift_runtime_libs swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) for lib in $swift_runtime_libs; do echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" code_sign_if_enabled "${destination}/${lib}" done fi } # Copies and strips a vendored dSYM install_dsym() { local source="$1" warn_missing_arch=${2:-true} if [ -r "$source" ]; then # Copy the dSYM into the targets temp dir. 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}\"" 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}" local basename basename="$(basename -s .dSYM "$source")" binary_name="$(ls "$source/Contents/Resources/DWARF")" binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}" # Strip invalid architectures so "fat" simulator / device frameworks work on device if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then strip_invalid_archs "$binary" "$warn_missing_arch" fi if [[ $STRIP_BINARY_RETVAL == 1 ]]; then # Move the stripped file into its final destination. echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}" else # 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. touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM" fi fi } # Copies the bcsymbolmap files of a vendored framework install_bcsymbolmap() { local bcsymbolmap_path="$1" local destination="${BUILT_PRODUCTS_DIR}" echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" } # Signs a framework with the provided identity code_sign_if_enabled() { if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then # Use the current code_sign_identity echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then code_sign_cmd="$code_sign_cmd &" fi echo "$code_sign_cmd" eval "$code_sign_cmd" fi } # Strip invalid architectures strip_invalid_archs() { binary="$1" warn_missing_arch=${2:-true} # Get architectures for current target binary binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" # Intersect them with the architectures we are building for intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" # If there are no archs supported by this binary then warn the user if [[ -z "$intersected_archs" ]]; then if [[ "$warn_missing_arch" == "true" ]]; then echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." fi STRIP_BINARY_RETVAL=0 return fi stripped="" for arch in $binary_archs; do if ! [[ "${ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place lipo -remove "$arch" -output "$binary" "$binary" stripped="$stripped $arch" fi done if [[ "$stripped" ]]; then echo "Stripped $binary of architectures:$stripped" fi STRIP_BINARY_RETVAL=1 } install_artifact() { artifact="$1" base="$(basename "$artifact")" case $base in *.framework) install_framework "$artifact" ;; *.dSYM) # Suppress arch warnings since XCFrameworks will include many dSYM files install_dsym "$artifact" "false" ;; *.bcsymbolmap) install_bcsymbolmap "$artifact" ;; *) echo "error: Unrecognized artifact "$artifact"" ;; esac } copy_artifacts() { file_list="$1" while read artifact; do install_artifact "$artifact" done <$file_list } ARTIFACT_LIST_FILE="${BUILT_PRODUCTS_DIR}/cocoapods-artifacts-${CONFIGURATION}.txt" if [ -r "${ARTIFACT_LIST_FILE}" ]; then copy_artifacts "${ARTIFACT_LIST_FILE}" fi if [[ "$CONFIGURATION" == "Debug" ]]; then install_framework "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework" install_framework "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then install_framework "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework" install_framework "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework" fi if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then wait fi ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView-umbrella.h ================================================ #ifdef __OBJC__ #import #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) #define FOUNDATION_EXPORT extern "C" #else #define FOUNDATION_EXPORT extern #endif #endif #endif FOUNDATION_EXPORT double Pods_CMPageTitleViewVersionNumber; FOUNDATION_EXPORT const unsigned char Pods_CMPageTitleViewVersionString[]; ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView.debug.xcconfig ================================================ FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh/MJRefresh.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "MJRefresh" -framework "Masonry" -framework "UIKit" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView.modulemap ================================================ framework module Pods_CMPageTitleView { umbrella header "Pods-CMPageTitleView-umbrella.h" export * module * { export * } } ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleView/Pods-CMPageTitleView.release.xcconfig ================================================ FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh/MJRefresh.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "MJRefresh" -framework "Masonry" -framework "UIKit" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleViewTests/Pods-CMPageTitleViewTests-Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier ${PRODUCT_BUNDLE_IDENTIFIER} CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType FMWK CFBundleShortVersionString 1.0.0 CFBundleSignature ???? CFBundleVersion ${CURRENT_PROJECT_VERSION} NSPrincipalClass ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleViewTests/Pods-CMPageTitleViewTests-acknowledgements.markdown ================================================ # Acknowledgements This application makes use of the following third party libraries: Generated by CocoaPods - https://cocoapods.org ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleViewTests/Pods-CMPageTitleViewTests-acknowledgements.plist ================================================ PreferenceSpecifiers FooterText This application makes use of the following third party libraries: Title Acknowledgements Type PSGroupSpecifier FooterText Generated by CocoaPods - https://cocoapods.org Title Type PSGroupSpecifier StringsTable Acknowledgements Title Acknowledgements ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleViewTests/Pods-CMPageTitleViewTests-dummy.m ================================================ #import @interface PodsDummy_Pods_CMPageTitleViewTests : NSObject @end @implementation PodsDummy_Pods_CMPageTitleViewTests @end ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleViewTests/Pods-CMPageTitleViewTests-frameworks.sh ================================================ #!/bin/sh set -e set -u set -o pipefail function on_error { echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" } trap 'on_error $LINENO' ERR if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy # frameworks to, so exit 0 (signalling the script phase was successful). exit 0 fi echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" # Used as a return value for each invocation of `strip_invalid_archs` function. STRIP_BINARY_RETVAL=0 # This protects against multiple targets copying the same framework dependency at the same time. The solution # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") # Copies and strips a vendored framework install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then local source="${BUILT_PRODUCTS_DIR}/$1" elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" elif [ -r "$1" ]; then local source="$1" fi local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" if [ -L "${source}" ]; then echo "Symlinked..." source="$(readlink "${source}")" fi # Use filter instead of exclude so missing patterns don't throw errors. echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" local basename basename="$(basename -s .framework "$1")" binary="${destination}/${basename}.framework/${basename}" if ! [ -r "$binary" ]; then binary="${destination}/${basename}" elif [ -L "${binary}" ]; then echo "Destination binary is symlinked..." dirname="$(dirname "${binary}")" binary="${dirname}/$(readlink "${binary}")" fi # Strip invalid architectures so "fat" simulator / device frameworks work on device if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then strip_invalid_archs "$binary" fi # Resign the code if required by the build settings to avoid unstable apps code_sign_if_enabled "${destination}/$(basename "$1")" # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then local swift_runtime_libs swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) for lib in $swift_runtime_libs; do echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" code_sign_if_enabled "${destination}/${lib}" done fi } # Copies and strips a vendored dSYM install_dsym() { local source="$1" if [ -r "$source" ]; then # Copy the dSYM into a the targets temp dir. 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}\"" 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}" local basename basename="$(basename -s .framework.dSYM "$source")" binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" # Strip invalid architectures so "fat" simulator / device frameworks work on device if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then strip_invalid_archs "$binary" fi if [[ $STRIP_BINARY_RETVAL == 1 ]]; then # Move the stripped file into its final destination. 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}\"" 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}" else # 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. touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" fi fi } # Signs a framework with the provided identity code_sign_if_enabled() { if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then # Use the current code_sign_identity echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then code_sign_cmd="$code_sign_cmd &" fi echo "$code_sign_cmd" eval "$code_sign_cmd" fi } # Strip invalid architectures strip_invalid_archs() { binary="$1" # Get architectures for current target binary binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" # Intersect them with the architectures we are building for intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" # If there are no archs supported by this binary then warn the user if [[ -z "$intersected_archs" ]]; then echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." STRIP_BINARY_RETVAL=0 return fi stripped="" for arch in $binary_archs; do if ! [[ "${ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place lipo -remove "$arch" -output "$binary" "$binary" stripped="$stripped $arch" fi done if [[ "$stripped" ]]; then echo "Stripped $binary of architectures:$stripped" fi STRIP_BINARY_RETVAL=1 } if [[ "$CONFIGURATION" == "Debug" ]]; then install_framework "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then install_framework "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework" fi if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then wait fi ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleViewTests/Pods-CMPageTitleViewTests-umbrella.h ================================================ #ifdef __OBJC__ #import #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) #define FOUNDATION_EXPORT extern "C" #else #define FOUNDATION_EXPORT extern #endif #endif #endif FOUNDATION_EXPORT double Pods_CMPageTitleViewTestsVersionNumber; FOUNDATION_EXPORT const unsigned char Pods_CMPageTitleViewTestsVersionString[]; ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleViewTests/Pods-CMPageTitleViewTests.debug.xcconfig ================================================ FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh/MJRefresh.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "MJRefresh" -framework "Masonry" -framework "UIKit" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleViewTests/Pods-CMPageTitleViewTests.modulemap ================================================ framework module Pods_CMPageTitleViewTests { umbrella header "Pods-CMPageTitleViewTests-umbrella.h" export * module * { export * } } ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleViewTests/Pods-CMPageTitleViewTests.release.xcconfig ================================================ FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh/MJRefresh.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "MJRefresh" -framework "Masonry" -framework "UIKit" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleViewUITests/Pods-CMPageTitleViewUITests-Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier ${PRODUCT_BUNDLE_IDENTIFIER} CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType FMWK CFBundleShortVersionString 1.0.0 CFBundleSignature ???? CFBundleVersion ${CURRENT_PROJECT_VERSION} NSPrincipalClass ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleViewUITests/Pods-CMPageTitleViewUITests-acknowledgements.markdown ================================================ # Acknowledgements This application makes use of the following third party libraries: Generated by CocoaPods - https://cocoapods.org ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleViewUITests/Pods-CMPageTitleViewUITests-acknowledgements.plist ================================================ PreferenceSpecifiers FooterText This application makes use of the following third party libraries: Title Acknowledgements Type PSGroupSpecifier FooterText Generated by CocoaPods - https://cocoapods.org Title Type PSGroupSpecifier StringsTable Acknowledgements Title Acknowledgements ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleViewUITests/Pods-CMPageTitleViewUITests-dummy.m ================================================ #import @interface PodsDummy_Pods_CMPageTitleViewUITests : NSObject @end @implementation PodsDummy_Pods_CMPageTitleViewUITests @end ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleViewUITests/Pods-CMPageTitleViewUITests-umbrella.h ================================================ #ifdef __OBJC__ #import #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) #define FOUNDATION_EXPORT extern "C" #else #define FOUNDATION_EXPORT extern #endif #endif #endif FOUNDATION_EXPORT double Pods_CMPageTitleViewUITestsVersionNumber; FOUNDATION_EXPORT const unsigned char Pods_CMPageTitleViewUITestsVersionString[]; ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleViewUITests/Pods-CMPageTitleViewUITests.debug.xcconfig ================================================ FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh/MJRefresh.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "MJRefresh" -framework "Masonry" -framework "UIKit" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleViewUITests/Pods-CMPageTitleViewUITests.modulemap ================================================ framework module Pods_CMPageTitleViewUITests { umbrella header "Pods-CMPageTitleViewUITests-umbrella.h" export * module * { export * } } ================================================ FILE: CMPageTitleView/Pods/Target Support Files/Pods-CMPageTitleViewUITests/Pods-CMPageTitleViewUITests.release.xcconfig ================================================ FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh/MJRefresh.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "MJRefresh" -framework "Masonry" -framework "UIKit" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES ================================================ FILE: CMPageTitleView.podspec ================================================ Pod::Spec.new do |s| s.name = 'CMPageTitleView' s.version = '0.7.4' s.summary = 'An easy way to use title bar' s.homepage = 'https://github.com/CrabMen/CMPageTitleView' s.license = 'MIT' s.authors = {'CrabMan' => 'tobecrabman@163.com'} s.platform = :ios, '8.0' s.source = {:git => 'https://github.com/CrabMen/CMPageTitleView.git', :tag => s.version} s.source_files = '**/**/Class/*.{h,m}' s.requires_arc = true end ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2018 CrabMan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ ![](https://github.com/CrabMen/CMResources/blob/master/CMPageTitleView/logo.png) ![](https://img.shields.io/cocoapods/p/CMPageTitleView.svg) ![](https://img.shields.io/cocoapods/v/CMPageTitleView.svg) ![GitHub last commit (branch)](https://img.shields.io/github/last-commit/CrabMen/CMPageTitleView/master) ![](https://img.shields.io/apm/l/vim-mode.svg) * [效果展示](#screenshots) * [效果展示 - 基本样式](#screenshots-basic) * [效果展示 - 组合](#screenshots-multi) * [效果展示 - 其他样式](#screenshots-others) * [安装](#installation) * [示例](#example) * [支持的配置](#properties) * [版本记录](#version) * [支持](#support) * [许可](#license) ## 效果展示 ### 效果展示 - 基本样式 | 基本样式 | GIF| | :-------- | --------:| |00-00.颜色效果 - RGB渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_00_00.gif)| |00-01.颜色效果 - 填充渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_00_01.gif)| |00-02.颜色效果 - 无渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_00_02.gif)| |00-03.切换样式 - 字体放大 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_00_03.gif)| |00-04.切换样式 - 下划线 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_00_04.gif)| |00-05.切换样式 - 遮罩 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_00_05.gif)| |00-06.切换样式 - 字体放大 - 延迟 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_00_06.gif)| |00-07.切换样式 - 下划线 - 延迟 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_00_07.gif)| |00-08.切换样式 - 遮罩 - 延迟 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_00_08.gif)| |00-09.附加效果 - 标题栏下方分割线 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_00_09.gif)| |00-10.附加效果 - 标题文字之间分割线 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_00_10.gif)| |00-11.对齐方式 -- 左对齐 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_00_11.gif)| |00-12.对齐方式 -- 右对齐 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_00_12.gif)| |00-13.对齐方式 -- 居中 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_00_13.gif)| |00-14.对齐方式 -- SpaceAround |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_00_14.gif)| |00-15.字体放大效果时对其方式 -- 居中对齐 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_00_15.gif)| |00-16.字体放大效果时对其方式 -- 上对齐 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_00_16.gif)| |00-17.字体放大效果时对其方式 -- 下对齐 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_00_17.gif)| ### 效果展示 - 组合样式 根据上方的基本样式可以进行自由组合,从而达到你想要的效果;因组合样式过多,下方列出了部分 | 组合样式 | GIF| | :-------- | --------:| |01-00.字体放大 - 颜色RGB渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_00.gif)| |01-01.字体放大 - 颜色填充渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_01.gif)| |01-02.字体放大 - 颜色无渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_02.gif)| |01-03.字体放大(延迟) - 颜色RGB渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_03.gif)| |01-04.字体放大(延迟) - 颜色填充渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_04.gif)| |01-05.字体放大(延迟) - 颜色无渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_05.gif)| |01-06.下划线 - 颜色RGB渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_06.gif)| |01-07.下划线 - 颜色填充渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_07.gif)| |01-08.下划线 - 颜色无渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_08.gif)| |01-09.下划线(延迟) - 颜色RGB渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_09.gif)| |01-10.下划线(延迟) - 颜色填充渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_10.gif)| |01-11.下划线(延迟) - 颜色无渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_11.gif)| |01-12.下划线(固定宽度)- 颜色RGB渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_12.gif)| |01-13.下划线(固定宽度)- 颜色填充渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_13.gif)| |01-14.下划线(固定宽度)- 颜色无渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_14.gif)| |01-15.下划线(延迟 && 固定宽度)- 颜色RGB渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_15.gif)| |01-16.下划线(延迟 && 固定宽度)- 颜色填充渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_16.gif)| |01-17.下划线(延迟 && 固定宽度)- 颜色无渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_17.gif)| |01-18.下划线(比例宽度)- 颜色RGB渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_18.gif)| |01-19.下划线(比例宽度)- 颜色填充渐 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_19.gif)| |01-20.下划线(比例宽度)- 颜色无渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_20.gif)| |01-21.下划线(延迟 && 比例宽度)- 颜色RGB渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_21.gif)| |01-22.下划线(延迟 && 比例宽度)- 颜色填充渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_22.gif)| |01-23.下划线(延迟 && 比例宽度)- 颜色无渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_23.gif)| |01-24.下划线(延展)- 颜色RGB渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_24.gif)| |01-25.下划线(延展)- 颜色填充渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_25.gif)| |01-26.下划线(延展)- 颜色无渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_26.gif)| |01-27.下划线(延展 && 固定宽度)- 颜色RGB渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_27.gif)| |01-28.下划线(延展 && 固定宽度)- 颜色填充渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_28.gif)| |01-29.下划线(延展 && 固定宽度)- 颜色无渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_29.gif)| |01-30.下划线(延展 && 比例宽度)- 颜色RGB渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_30.gif)| |01-31.下划线(延展 && 比例宽度)- 颜色填充渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_31.gif)| |01-32.下划线(延展 && 比例宽度)- 颜色无渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_32.gif)| |01-33.遮罩 - 颜色RGB渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_33.gif)| |01-34.遮罩 - 颜色填充渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_34.gif)| |01-35.遮罩 - 颜色无渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_35.gif)| |01-36.遮罩(延迟) - 颜色RGB渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_36.gif)| |01-37.遮罩(延迟) - 颜色填充渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_37.gif)| |01-38.遮罩(延迟) - 颜色无渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_38.gif)| |01-39.遮罩(固定宽度)- 颜色RGB渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_39.gif)| |01-40.遮罩(固定宽度)- 颜色填充渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_40.gif)| |01-41.遮罩(固定宽度)- 颜色无渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_41.gif)| |01-42.遮罩(延迟 && 固定宽度)- 颜色RGB渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_42.gif)| |01-43.遮罩(延迟 && 固定宽度)- 颜色填充渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_43.gif)| |01-44.遮罩(延迟 && 固定宽度)- 颜色无渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_44.gif)| |01-45.字体放大 && 下划线 - 颜色填充渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_45.gif)| |01-46.字体放大 && 下划线 && 延迟 - 颜色无渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_46.gif)| |01-47.字体放大 && 下划线(延展)- 颜色填充渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_47.gif)| |01-48.字体放大 && 下划线(延展 && 固定宽度 )- 颜色填充渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_48.gif)| |01-49.字体放大 && 下划线(延展 && 比例宽度 )-颜色填充渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_49.gif)| |01-50.字体放大 && 下划线(延展 && 放大时下对齐 )-颜色填充渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_50.gif)| |01-51.字体放大 && 下划线(延展 && 放大时下对齐 && 左对齐)-颜色填充渐变 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_01_51.gif)| ### 效果展示 - 其他样式 | 其他样式 | GIF| | :-------- | --------:| |02-00.标题栏背景色 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_02_00.gif)| |02-01.标题栏背景图片 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_02_01.gif)| |02-02.rightView |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_02_02.gif)| |02-03.全屏穿透样式 |![](https://raw.githubusercontent.com/CrabMen/CMResources/master/CMPageTitleView/CMPageTitleView_02_03.gif)| ## 安装 ### CocoaPods安装: * For iOS8+: ```ruby use_frameworks! target '' do pod 'CMPageTitleView' end ``` ### 手动安装: 将 `CMPageTitleView/CMPageTitleView/Class` 路径下的所有文件拖拽到你的项目中. ## 示例 首先, 先要导入.h头文件. **如果cocoaposd安装:** ``` #import ``` **如果手动安装:** ``` #import "CMPageTitleView.h" ``` 创建CMPageTitleView 后,创建CMPageTitleConfig 对象并设置所需配置: ``` CMPageTitleView *pageView = [[CMPageTitleView alloc] initWithFrame:frame]; pageView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers; //必传参数 pageView.cm_config = config; [self.view addSubview:pageView]; ``` 同样支持Masonry布局,代码如下: ``` CMPageTitleView *pageView = [[CMPageTitleView alloc] init]; [self.view addSubview:pageView]; [pageView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(0); make.top.mas_equalTo(CM_NAVI_BAR_H); make.height.mas_equalTo(CM_SCREEN_H - CM_NAVI_BAR_H); }]; pageView.delegate = self; CMPageTitleConfig *config = [CMPageTitleConfig defaultConfig]; config.cm_childControllers = self.childControllers;//必传参数 pageView.cm_config = config; ``` 按照上方代码,你已经创建了一个最简单的菜单栏🎉 ## 支持的配置 | 配置 | 描述 | | :-------- | :--------| | cm_gradientStyle | 颜色渐变样式
``CMTitleColorGradientStyle_None``( 颜色无渐变)
``CMTitleColorGradientStyle_RGB``(RGB颜色渐变)
``CMTitleColorGradientStyle_Fill``(填充色颜色渐变)| | cm_switchMode | 标题切换样式
``CMPageTitleSwitchMode_Scale``(字体放大)
``CMPageTitleSwitchMode_Underline``(下划线样式)
``CMPageTitleSwitchMode_Cover`` (遮罩样式)
``CMPageTitleSwitchMode_Delay``(滑动切换时延迟,配合其他样式使用)| | cm_additionalMode | 标题栏附加样式
``CMPageTitleAdditionalMode_Seperateline``(标题栏下方的分割线)
``CMPageTitleAdditionalMode_Splitter``(标题文字之间的分割线)| | cm_contentMode | 对齐方式
``CMPageTitleContentMode_Center``(左右边距与标题间距一致)
``CMPageTitleContentMode_SpaceAround``(左右边距等于标题间距的一半)
``CMPageTitleContentMode_Left``(左对齐)
``CMPageTitleContentMode_Right``(右对齐) | | cm_scaleGradientContentMode | 垂直方向上的对齐方式
``CMPageTitleScaleGradientContentMode_Center``(居中)
``CMPageTitleScaleGradientContentMode_Top``(上对齐)
``CMPageTitleScaleGradientContentMode_Bottom``(下对齐)
``注意:``只有属性``cm_switchMode``包含``CMPageTitleSwitchMode_Scale``下才有效果 | | cm_childControllers | 子视图控制器数组 | | cm_titles | 标题数组 | | cm_font | 标题正常字体
默认字体大小:``[UIFont systemFontOfSize:15]`` | | cm_selectedFont | 标题选中字体
默认选中字体大小:``cm_font``的1.15倍 | | cm_backgroundColor | 视图的背景色
默认颜色:``[UIColor whiteColor]`` | | cm_normalColor | 标题正常颜色
默认颜色:``[UIColor blackColor]`` | | cm_selectedColor | 标题选中颜色
默认颜色:``[UIColor redColor]``| | cm_titleHeight | 标题高度
默认高度:44| | cm_titleTop | 标题视图距离上方的偏移量
默认高度:0| | cm_slideGestureEnable | 是否支持侧滑
默认值:``YES``| | cm_titleMargin | 标题之间的间隔| | cm_minTitleMargin | 最小的标题间距
默认值为 20| | cm_defaultIndex | 默认选中的index
默认选择第0个| | cm_seperaterLineColor | 标题栏下方分割线的颜色
默认颜色:```[UIColor grayColor]```| | cm_seperateLineHeight | 标题分割线的高度
默认值:1px| | cm_splitterColor | 标题之间的分割线颜色
默认为:```[UIColor lightGrayColor]```| | cm_splitterSize | 标题之间的分割线size
默认宽度:1px
默认高度:标题栏高度的一半| | cm_animationDruction | 下划线和遮罩,在点击标题时,动画的时间间隔
默认值为:0.25
``注意:``取值范围 0.25~0.8(超出范围会使用默认值)| | cm_rightView | 垂直方向上的对齐方式
默认值:``CMPageTitleVerticalContentMode_Center``
``注意:``只有属性``cm_switchMode``包含``CMPageTitleSwitchMode_Scale``下有效果| | cm_parentController | 父视图控制器 | | cm_fullScreen (getter=cm_isFullScreen) | 是否全屏显示
默认值:``NO`` | | cm_scale | 标题的缩放等级 默认为 1.15
``注意:``不建议依赖该属性,后期可能会废弃,可以使用``cm_selectedFont``配合``cm_font``属性进行设置)| | cm_titleWidths | 标题宽度数组
``注意:readonly`` | | cm_minContentWidth | 标题的总宽度 + 左右边距 + 所有的标题最小间距
``注意:readonly``| | cm_titlesWidth | 所有标题的总宽度
``注意: readonnly``)| | cm_underlineBorder | 下划线视图是否圆角
默认值:``NO``| | cm_underlineHeight | 下划线高度
默认值:2| | cm_underlineWidth | 下划线宽度
默认情况下跟随文字宽度,但是设置该属性后下划线会固定使用该宽度| | cm_underlineWidthScale | 下划线跟随文字宽度 * ``cm_underlineWidthScale``
``注意:``比例范围 0 ~ 1.3(超出 1.3 按 1.0 处理)| | cm_underlineColor | 下划线颜色
默认跟随标题的选中颜色| | cm_underlineStretch | 下划线是否延长
默认值:``NO`` (具体效果可以看github效果展示)| | cm_coverColor | 遮罩颜色| | cm_coverRadius | 遮罩圆角半径
默认为 cover高度的一半| | cm_coverWidth | 遮罩固定宽度
``注意:``未做最大最小限制,请根据实际情况妥善设置| | cm_coverVerticalMargin | 遮罩垂直方向边距
``注意:``未做最大最小限制,请根据实际情况妥善设置| | cm_coverHorizontalMargin | 遮罩水平方向边距
``注意:``未做最大最小限制,请根据实际情况妥善设置| **注意:** 倘若需要复杂效果,可以通过创建``CMPageTitleConfig``对象中的 ``cm_gradientStyle``(颜色渐变样式)、``cm_switchMode``(标题切换样式)、``cm_additionalMode``(附加效果)、``cm_contentMode``(对齐方式)、``cm_scaleGradientContentMode``(放大效果时的对齐样式)等基本样式的组合实现各种复杂效果,可以下载Demo查看具体效果,但是能实现的组合远远不止这些,更多组合可以集成到项目中尝试😊 ## 版本 * 2018-08-13 初始化项目 * 2019-04-26 版本 **0.3.0** 新增 下划线比例宽度跟随标题文字宽度 * 2019-05-03 版本 **0.3.1** * cm_scale可以继续使用,新增``cm_selectedFont``属性,便于设置选中字体大小; * 支持**Masonry** * 2019-05-09 版本 **0.4.0** * 新增设置标题分割线Size以及Color功能 * 新增对外暴露的代理方法,便于用户做对应处理 * 新增断言异常提示;新增设置是否允许侧滑功能 * 2019-05-16 版本 **0.4.1** 修复``cm_seperateLineHeight``为0时无效的问题 * 2019-05-17 版本 **0.4.2** 新增``cm_animationDruction``属性,便于用户设置动画时间 * 2019-05-23 版本 **0.5.0** * 新增``cm_verticalContentMode``,可以设置标题文字垂直方向的对齐方式 * 新增``cm_additionalMode``,便于设置分割线 * 优化``cm_backgroundColor``效果; * 优化相关代码调用时机 * ~~2019-07-13 版本 **0.5.1** ``CMPageTitleView``中新增``-(void)cm_reloadConfig``方法,便于用户刷新配置~~ * 2019-07-13 版本 **0.5.2** * ``CMPageTitleView``中新增``-(void)cm_reloadConfig``方法,便于用户刷新配置; * 修复**0.5.1**中的布局bug;修复部分情况下``CMPageTitleContentView``对象尺寸不准确问题 * 2019-08-14 版本 **0.6.0** * 新增cm_rightView属性 * 使用``NSLayoutConstraint``优化界面布局 * 优化``CMPageTitleConfig``类的``getter``方法,大幅提高三方库性能 * 解决与导航栏侧滑手势冲突的问题 * 修复设置``cm_defaultIndex``为非0时,界面动画闪动问题 * 新增示例 * 2019-12-21 版本 **0.6.1** * 手动管理childController的生命周期 * 优化rightView展示样式 * 新增childController中跳转逻辑demo * 2019-05-10 版本 **0.6.2** * 紧急修复iOS10机型标题栏的NSLayoutConstraint偏移问题 * 2020-06-07 版本 **0.7.0** * 新增全屏穿透样式 * 2020-07-15 版本 **0.7.1** * 紧急修复iOS11 在滑动内容视图时,Cell向上偏移的问题 * 适配MJRefresh * 2020-10-15 版本 **0.7.2** * 适配横竖屏切换 * 2020-10-29 版本 **0.7.3** * 新增 ``cm_titleTop``属性 * 2020-12-17 版本 **0.7.4** * 修复设置 ``cm_titleTop``时,rightview偏移问题 ## 注意 **1. UIScrollView、UITableView、UICollectionView 在标题栏切换时,下沉问题** 在``UIScrollView``、``UITableView``、``UICollectionView``视图所在的Controller中添加如下代码,(具体可以参考Demo中``CMChildTableController.m``的第95行) ``` if (@available(iOS 11.0, *)) { self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; } else { self.automaticallyAdjustsScrollViewInsets = NO; } ``` **2. 0.7.0版本中新增的全屏穿透样式** 全屏穿透样式在使用**MJRefresh**作为视图的下拉刷新时,透过标题栏是可以看到下拉刷新的布局的,请合理使用。 目前暂未想到良好的解决方案,如果你有好的方案,可以提PR ## 支持 * 如果觉得该三方库还不错,可以[**★Star**](#)支持一下你的[**★Star**](#)就是我最大的动力 * 如果发现bug或想有其他的新功能,可以 **[issue](https://github.com/CrabMen/CMPageTitleView/issues)** 我 ## 许可 CMPageTitleView 基于MIT许可