├── .gitignore ├── HGPersonalCenter.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── HGPersonalCenter.xcworkspace └── contents.xcworkspacedata ├── HGPersonalCenter ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── back.imageset │ │ ├── Contents.json │ │ └── back.pdf │ ├── cartoon.imageset │ │ ├── Contents.json │ │ └── cartoon.jpg │ ├── center_avatar.imageset │ │ ├── Contents.json │ │ └── center_avatar.jpeg │ └── center_bg.imageset │ │ ├── Contents.json │ │ └── center_bg.jpg ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Controllers │ ├── BaseControllers │ │ ├── HGBaseViewController.h │ │ ├── HGBaseViewController.m │ │ ├── HGNestedScrollViewController.h │ │ └── HGNestedScrollViewController.m │ ├── HGHomeViewController.h │ ├── HGHomeViewController.m │ ├── HGMessageViewController.h │ ├── HGMessageViewController.m │ ├── HGPersonalCenterViewController.h │ ├── HGPersonalCenterViewController.m │ └── PageViewControllers │ │ ├── HGFirstViewController.h │ │ ├── HGFirstViewController.m │ │ ├── HGSecondViewController.h │ │ ├── HGSecondViewController.m │ │ ├── HGThirdViewController.h │ │ └── HGThirdViewController.m ├── HGMacro.h ├── Info.plist ├── PrefixHeader.pch ├── Tools │ ├── HGDeviceHelper.h │ └── HGDeviceHelper.m ├── Views │ ├── HGHeaderImageView.h │ └── HGHeaderImageView.m └── main.m ├── LICENSE ├── Podfile ├── Podfile.lock ├── Pods ├── GKNavigationBarViewController │ ├── GKNavigationBarViewController │ │ ├── GKNavigationBarViewController.bundle │ │ │ ├── btn_back_black@2x.png │ │ │ ├── btn_back_black@3x.png │ │ │ ├── btn_back_white@2x.png │ │ │ ├── btn_back_white@3x.png │ │ │ ├── nav_line.png │ │ │ ├── nav_line@2x.png │ │ │ └── nav_line@3x.png │ │ ├── GKNavigationBarViewController.h │ │ └── GKNavigationBarViewController.m │ ├── LICENSE │ └── README.md ├── HGCategoryView │ ├── HGCategoryView │ │ ├── HGCategoryView.h │ │ └── HGCategoryView.m │ ├── LICENSE │ └── README.md ├── HGPersonalCenterExtend │ ├── HGPersonalCenterExtend │ │ ├── HGCenterBaseTableView.h │ │ ├── HGCenterBaseTableView.m │ │ ├── HGPageViewController.h │ │ ├── HGPageViewController.m │ │ ├── HGPagesViewController.h │ │ ├── HGPagesViewController.m │ │ ├── HGPersonalCenterExtend.h │ │ ├── HGPopGestureCompatibleCollectionView.h │ │ ├── HGPopGestureCompatibleCollectionView.m │ │ ├── HGSegmentedPageViewController.h │ │ └── HGSegmentedPageViewController.m │ ├── LICENSE │ └── README.md ├── Headers │ ├── Private │ │ ├── GKNavigationBarViewController │ │ │ ├── GKBaseTransitionAnimation.h │ │ │ ├── GKCategory.h │ │ │ ├── GKCommon.h │ │ │ ├── GKNavigationBar.h │ │ │ ├── GKNavigationBarConfigure.h │ │ │ ├── GKNavigationBarViewController.h │ │ │ ├── GKPopTransitionAnimation.h │ │ │ ├── GKPushTransitionAnimation.h │ │ │ ├── UIBarButtonItem+GKCategory.h │ │ │ ├── UINavigationController+GKCategory.h │ │ │ ├── UINavigationItem+GKCategory.h │ │ │ ├── UIScrollView+GKCategory.h │ │ │ └── UIViewController+GKCategory.h │ │ ├── HGCategoryView │ │ │ └── HGCategoryView.h │ │ ├── HGPersonalCenterExtend │ │ │ ├── HGCenterBaseTableView.h │ │ │ ├── HGPageViewController.h │ │ │ ├── HGPagesViewController.h │ │ │ ├── HGPersonalCenterExtend.h │ │ │ ├── HGPopGestureCompatibleCollectionView.h │ │ │ └── HGSegmentedPageViewController.h │ │ └── Masonry │ │ │ ├── MASCompositeConstraint.h │ │ │ ├── MASConstraint+Private.h │ │ │ ├── MASConstraint.h │ │ │ ├── MASConstraintMaker.h │ │ │ ├── MASLayoutConstraint.h │ │ │ ├── MASUtilities.h │ │ │ ├── MASViewAttribute.h │ │ │ ├── MASViewConstraint.h │ │ │ ├── Masonry.h │ │ │ ├── NSArray+MASAdditions.h │ │ │ ├── NSArray+MASShorthandAdditions.h │ │ │ ├── NSLayoutConstraint+MASDebugAdditions.h │ │ │ ├── View+MASAdditions.h │ │ │ ├── View+MASShorthandAdditions.h │ │ │ └── ViewController+MASAdditions.h │ └── Public │ │ ├── GKNavigationBarViewController │ │ ├── GKBaseTransitionAnimation.h │ │ ├── GKCategory.h │ │ ├── GKCommon.h │ │ ├── GKNavigationBar.h │ │ ├── GKNavigationBarConfigure.h │ │ ├── GKNavigationBarViewController.h │ │ ├── GKPopTransitionAnimation.h │ │ ├── GKPushTransitionAnimation.h │ │ ├── UIBarButtonItem+GKCategory.h │ │ ├── UINavigationController+GKCategory.h │ │ ├── UINavigationItem+GKCategory.h │ │ ├── UIScrollView+GKCategory.h │ │ └── UIViewController+GKCategory.h │ │ ├── HGCategoryView │ │ └── HGCategoryView.h │ │ ├── HGPersonalCenterExtend │ │ ├── HGCenterBaseTableView.h │ │ ├── HGPageViewController.h │ │ ├── HGPagesViewController.h │ │ ├── HGPersonalCenterExtend.h │ │ ├── HGPopGestureCompatibleCollectionView.h │ │ └── HGSegmentedPageViewController.h │ │ └── Masonry │ │ ├── MASCompositeConstraint.h │ │ ├── MASConstraint+Private.h │ │ ├── MASConstraint.h │ │ ├── MASConstraintMaker.h │ │ ├── MASLayoutConstraint.h │ │ ├── MASUtilities.h │ │ ├── MASViewAttribute.h │ │ ├── MASViewConstraint.h │ │ ├── Masonry.h │ │ ├── NSArray+MASAdditions.h │ │ ├── NSArray+MASShorthandAdditions.h │ │ ├── NSLayoutConstraint+MASDebugAdditions.h │ │ ├── View+MASAdditions.h │ │ ├── View+MASShorthandAdditions.h │ │ └── ViewController+MASAdditions.h ├── Manifest.lock ├── 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 │ ├── GKNavigationBarViewController │ ├── GKNavigationBarViewController-dummy.m │ ├── GKNavigationBarViewController-prefix.pch │ ├── GKNavigationBarViewController.debug.xcconfig │ └── GKNavigationBarViewController.release.xcconfig │ ├── HGCategoryView │ ├── HGCategoryView-dummy.m │ ├── HGCategoryView-prefix.pch │ ├── HGCategoryView.debug.xcconfig │ └── HGCategoryView.release.xcconfig │ ├── HGPersonalCenterExtend │ ├── HGPersonalCenterExtend-dummy.m │ ├── HGPersonalCenterExtend-prefix.pch │ ├── HGPersonalCenterExtend.debug.xcconfig │ └── HGPersonalCenterExtend.release.xcconfig │ ├── Masonry │ ├── Masonry-dummy.m │ ├── Masonry-prefix.pch │ ├── Masonry.debug.xcconfig │ └── Masonry.release.xcconfig │ └── Pods-HGPersonalCenter │ ├── Pods-HGPersonalCenter-acknowledgements.markdown │ ├── Pods-HGPersonalCenter-acknowledgements.plist │ ├── Pods-HGPersonalCenter-dummy.m │ ├── Pods-HGPersonalCenter-resources.sh │ ├── Pods-HGPersonalCenter.debug.xcconfig │ └── Pods-HGPersonalCenter.release.xcconfig ├── README.md └── show.gif /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | # CocoaPods 32 | Pods/ 33 | -------------------------------------------------------------------------------- /HGPersonalCenter.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HGPersonalCenter.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /HGPersonalCenter/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // HGPersonalCenter 4 | // 5 | // Created by Arch on 2017/6/16. 6 | // Copyright © 2017年 mint_bin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /HGPersonalCenter/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // PersonalCenter 4 | // 5 | // Created by Arch on 2017/6/16. 6 | // Copyright © 2017年 mint_bin. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | [[GKNavigationBarConfigure sharedInstance] setupCustomConfigure:^(GKNavigationBarConfigure *configure) { 21 | configure.gk_translationX = 15; 22 | configure.gk_translationY = 20; 23 | configure.gk_scaleX = 0.90; 24 | configure.gk_scaleY = 0.92; 25 | }]; 26 | 27 | return YES; 28 | } 29 | 30 | - (void)applicationWillResignActive:(UIApplication *)application { 31 | // 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. 32 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 33 | } 34 | 35 | 36 | - (void)applicationDidEnterBackground:(UIApplication *)application { 37 | // 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. 38 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 39 | } 40 | 41 | 42 | - (void)applicationWillEnterForeground:(UIApplication *)application { 43 | // 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. 44 | } 45 | 46 | 47 | - (void)applicationDidBecomeActive:(UIApplication *)application { 48 | // 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. 49 | } 50 | 51 | 52 | - (void)applicationWillTerminate:(UIApplication *)application { 53 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 54 | } 55 | 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /HGPersonalCenter/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /HGPersonalCenter/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /HGPersonalCenter/Assets.xcassets/back.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "back.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /HGPersonalCenter/Assets.xcassets/back.imageset/back.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLL/HGPersonalCenter/a0cb101f8964a8a5cb323030013b7094c35233a2/HGPersonalCenter/Assets.xcassets/back.imageset/back.pdf -------------------------------------------------------------------------------- /HGPersonalCenter/Assets.xcassets/cartoon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "cartoon.jpg" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /HGPersonalCenter/Assets.xcassets/cartoon.imageset/cartoon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLL/HGPersonalCenter/a0cb101f8964a8a5cb323030013b7094c35233a2/HGPersonalCenter/Assets.xcassets/cartoon.imageset/cartoon.jpg -------------------------------------------------------------------------------- /HGPersonalCenter/Assets.xcassets/center_avatar.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "center_avatar.jpeg" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /HGPersonalCenter/Assets.xcassets/center_avatar.imageset/center_avatar.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLL/HGPersonalCenter/a0cb101f8964a8a5cb323030013b7094c35233a2/HGPersonalCenter/Assets.xcassets/center_avatar.imageset/center_avatar.jpeg -------------------------------------------------------------------------------- /HGPersonalCenter/Assets.xcassets/center_bg.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "center_bg.jpg" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /HGPersonalCenter/Assets.xcassets/center_bg.imageset/center_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLL/HGPersonalCenter/a0cb101f8964a8a5cb323030013b7094c35233a2/HGPersonalCenter/Assets.xcassets/center_bg.imageset/center_bg.jpg -------------------------------------------------------------------------------- /HGPersonalCenter/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /HGPersonalCenter/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 39 | 40 | 41 | 42 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /HGPersonalCenter/Controllers/BaseControllers/HGBaseViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HGBaseViewController.h 3 | // HGPersonalCenter 4 | // 5 | // Created by Arch on 2017/6/19. 6 | // Copyright © 2017年 mint_bin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HGBaseViewController : GKNavigationBarViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HGPersonalCenter/Controllers/BaseControllers/HGBaseViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HGBaseViewController.m 3 | // HGPersonalCenter 4 | // 5 | // Created by Arch on 2017/6/19. 6 | // Copyright © 2017年 mint_bin. All rights reserved. 7 | // 8 | 9 | #import "HGBaseViewController.h" 10 | 11 | @interface HGBaseViewController () 12 | @property (nonatomic, strong) UIButton *backButton; 13 | @end 14 | 15 | @implementation HGBaseViewController 16 | #pragma mark - Life Cycle 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | self.view.backgroundColor = [UIColor whiteColor]; 20 | [self setBaseNavigationbar]; 21 | } 22 | 23 | #pragma mark - Private Methods 24 | - (void)setBaseNavigationbar { 25 | if (self.navigationController) { 26 | self.gk_navBackgroundColor = kRGBA(28, 162, 223, 1.0); 27 | self.gk_navTitleFont = [UIFont systemFontOfSize:18]; 28 | self.gk_navTitleColor = [UIColor whiteColor]; 29 | UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithCustomView:self.backButton]; 30 | self.gk_navItemLeftSpace = 8; 31 | self.gk_navItemRightSpace = 12; 32 | if (self.navigationController.childViewControllers.count > 1) { 33 | self.gk_navLeftBarButtonItem = backItem; 34 | } 35 | } 36 | } 37 | 38 | - (void)back { 39 | [self.navigationController popViewControllerAnimated:YES]; 40 | } 41 | 42 | #pragma mark - Getters 43 | - (UIButton *)backButton { 44 | if (!_backButton) { 45 | _backButton = [UIButton buttonWithType:UIButtonTypeCustom]; 46 | [_backButton setImage:[[UIImage imageNamed:@"back"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateNormal]; 47 | _backButton.tintColor = [UIColor whiteColor]; 48 | _backButton.contentEdgeInsets = UIEdgeInsetsMake(0, 12, 0, 12); 49 | [_backButton addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside]; 50 | } 51 | return _backButton; 52 | } 53 | 54 | @end 55 | 56 | -------------------------------------------------------------------------------- /HGPersonalCenter/Controllers/BaseControllers/HGNestedScrollViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HGNestedScrollViewController.h 3 | // HGPersonalCenterExtend 4 | // 5 | // Created by Arch on 2020/1/16. 6 | // Copyright © 2020 mint_bin@163.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "HGPersonalCenterExtend.h" 11 | #import "HGHeaderImageView.h" 12 | 13 | @interface HGNestedScrollViewController : HGBaseViewController 14 | @property (nonatomic, strong, readonly) HGCenterBaseTableView *tableView; 15 | @property (nonatomic, strong) HGHeaderImageView *headerImageView; 16 | @property (nonatomic, strong) UIView *headerView; 17 | @property (nonatomic, strong, readonly) UIView *footerView; 18 | @property (nonatomic, strong, readonly) HGSegmentedPageViewController *segmentedPageViewController; 19 | @property (nonatomic, assign) BOOL isEnlarge; 20 | @end 21 | -------------------------------------------------------------------------------- /HGPersonalCenter/Controllers/BaseControllers/HGNestedScrollViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HGNestedScrollViewController.m 3 | // HGPersonalCenterExtend 4 | // 5 | // Created by Arch on 2020/1/16. 6 | // Copyright © 2020 mint_bin@163.com. All rights reserved. 7 | // 8 | 9 | #import "HGNestedScrollViewController.h" 10 | 11 | @interface HGNestedScrollViewController () 12 | @property (nonatomic, strong) HGCenterBaseTableView *tableView; 13 | @property (nonatomic, strong) UIView *footerView; 14 | @property (nonatomic, strong) HGSegmentedPageViewController *segmentedPageViewController; 15 | @property (nonatomic) BOOL cannotScroll; 16 | @end 17 | 18 | @implementation HGNestedScrollViewController 19 | @synthesize headerView = _headerView; 20 | 21 | #pragma mark - Life Cycle 22 | - (void)viewDidLoad { 23 | [super viewDidLoad]; 24 | if (@available(iOS 11.0, *)) { 25 | [[UIScrollView appearance] setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever]; 26 | } else { 27 | self.automaticallyAdjustsScrollViewInsets = NO; 28 | } 29 | // 解决pop手势中断后tableView偏移问题 30 | self.extendedLayoutIncludesOpaqueBars = YES; 31 | [self setupSubViews]; 32 | } 33 | 34 | #pragma mark - Private Methods 35 | - (void)setupSubViews { 36 | [self.tableView addSubview:self.headerImageView]; 37 | [self.view addSubview:self.tableView]; 38 | [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { 39 | make.edges.equalTo(self.view); 40 | }]; 41 | 42 | [self addChildViewController:self.segmentedPageViewController]; 43 | [self.footerView addSubview:self.segmentedPageViewController.view]; 44 | [self.segmentedPageViewController didMoveToParentViewController:self]; 45 | [self.segmentedPageViewController.view mas_makeConstraints:^(MASConstraintMaker *make) { 46 | make.edges.equalTo(self.footerView); 47 | }]; 48 | } 49 | 50 | - (void)changeNavigationBarAlpha { 51 | CGFloat alpha = 0; 52 | CGFloat currentOffsetY = self.tableView.contentOffset.y; 53 | if (-currentOffsetY - HGDeviceHelper.topBarHeight <= FLT_EPSILON) { 54 | alpha = 1; 55 | } else if (self.headerImageView.initialHeight > HGDeviceHelper.topBarHeight) { 56 | alpha = (self.headerImageView.initialHeight + currentOffsetY) / (self.headerImageView.initialHeight - HGDeviceHelper.topBarHeight); 57 | } 58 | self.gk_navBarAlpha = alpha; 59 | } 60 | 61 | #pragma mark - UIScrollViewDelegate 62 | - (BOOL)scrollViewShouldScrollToTop:(UIScrollView *)scrollView { 63 | [self.segmentedPageViewController makePageViewControllersScrollToTop]; 64 | return YES; 65 | } 66 | 67 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView { 68 | // 第一部分:处理导航栏 69 | [self changeNavigationBarAlpha]; 70 | 71 | // 第二部分:处理手势冲突 72 | CGFloat contentOffsetY = scrollView.contentOffset.y; 73 | // 吸顶临界点(此时的临界点不是视觉感官上导航栏的底部,而是当前屏幕的顶部相对scrollViewContentView的位置) 74 | CGFloat criticalPointOffsetY = [self.tableView rectForSection:0].origin.y - HGDeviceHelper.topBarHeight; 75 | 76 | // 利用contentOffset处理内外层scrollView的滑动冲突问题 77 | if (contentOffsetY >= criticalPointOffsetY) { 78 | /* 79 | * 到达临界点: 80 | * 1.未吸顶状态 -> 吸顶状态 81 | * 2.维持吸顶状态(pageViewController.scrollView.contentOffsetY > 0) 82 | */ 83 | self.cannotScroll = YES; 84 | scrollView.contentOffset = CGPointMake(0, criticalPointOffsetY); 85 | [self.segmentedPageViewController makePageViewControllersScrollState:YES]; 86 | } else { 87 | /* 88 | * 未达到临界点: 89 | * 1.吸顶状态 -> 不吸顶状态 90 | * 2.维持吸顶状态(pageViewController.scrollView.contentOffsetY > 0) 91 | */ 92 | if (self.cannotScroll) { 93 | // “维持吸顶状态” 94 | scrollView.contentOffset = CGPointMake(0, criticalPointOffsetY); 95 | } else { 96 | // 吸顶状态 -> 不吸顶状态 97 | [self.segmentedPageViewController makePageViewControllersScrollToTop]; 98 | } 99 | } 100 | 101 | // 第三部分: 102 | /** 103 | * 处理头部自定义背景视图 (如: 下拉放大) 104 | * 图片会被拉伸多出状态栏的高度 105 | */ 106 | if (contentOffsetY <= -self.headerImageView.initialHeight) { 107 | if (self.isEnlarge) { 108 | CGRect frame = self.headerImageView.frame; 109 | // 改变HeadImageView的frame 110 | // 上下放大 111 | frame.origin.y = contentOffsetY; 112 | frame.size.height = -contentOffsetY; 113 | // 左右放大 114 | frame.origin.x = (contentOffsetY * SCREEN_WIDTH / self.headerImageView.initialHeight + SCREEN_WIDTH) / 2; 115 | frame.size.width = -contentOffsetY * SCREEN_WIDTH / self.headerImageView.initialHeight; 116 | // 改变头部视图的frame 117 | self.headerImageView.frame = frame; 118 | } else{ 119 | scrollView.bounces = NO; 120 | } 121 | } else { 122 | scrollView.bounces = YES; 123 | } 124 | } 125 | 126 | #pragma mark - HGSegmentedPageViewControllerDelegate 127 | - (void)segmentedPageViewControllerLeaveTop { 128 | self.cannotScroll = NO; 129 | } 130 | 131 | - (void)segmentedPageViewControllerWillBeginDragging { 132 | self.tableView.scrollEnabled = NO; 133 | } 134 | 135 | - (void)segmentedPageViewControllerDidEndDragging { 136 | self.tableView.scrollEnabled = YES; 137 | } 138 | 139 | #pragma mark - Getters 140 | - (UITableView *)tableView { 141 | if (!_tableView) { 142 | _tableView = [[HGCenterBaseTableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped]; 143 | _tableView.tableHeaderView = self.headerView; 144 | _tableView.tableFooterView = self.footerView; 145 | _tableView.contentInset = UIEdgeInsetsMake(self.headerImageView.initialHeight, 0, 0, 0); 146 | [_tableView setContentOffset:CGPointMake(0, -self.headerImageView.initialHeight)]; 147 | } 148 | return _tableView; 149 | } 150 | 151 | - (HGHeaderImageView *)headerImageView { 152 | if (!_headerImageView) { 153 | _headerImageView = [[HGHeaderImageView alloc] initWithFrame:CGRectMake(0, -240, SCREEN_WIDTH, 240)]; 154 | } 155 | return _headerImageView; 156 | } 157 | 158 | - (UIView *)headerView { 159 | if (!_headerView) { 160 | // 这里的height不能设置为0,否则系统会给tableHeaderView设置一个默认的高度 161 | _headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, CGFLOAT_MIN)]; 162 | } 163 | return _headerView; 164 | } 165 | 166 | - (UIView *)footerView { 167 | if (!_footerView) { 168 | // 如果当前控制器底部存在TabBar/ToolBar/自定义的bottomBar, 还需要减去barHeight和SAFE_AREA_INSERTS_BOTTOM的高度 169 | _footerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT - HGDeviceHelper.topBarHeight)]; 170 | } 171 | return _footerView; 172 | } 173 | 174 | - (HGSegmentedPageViewController *)segmentedPageViewController { 175 | if (!_segmentedPageViewController) { 176 | _segmentedPageViewController = [[HGSegmentedPageViewController alloc] init]; 177 | _segmentedPageViewController.delegate = self; 178 | _segmentedPageViewController.categoryView.alignment = HGCategoryViewAlignmentLeft; 179 | _segmentedPageViewController.categoryView.itemSpacing = 25; 180 | _segmentedPageViewController.categoryView.backgroundColor = [UIColor yellowColor]; 181 | _segmentedPageViewController.categoryView.isEqualParts = YES; 182 | } 183 | return _segmentedPageViewController; 184 | } 185 | 186 | #pragma mark - Setters 187 | - (void)setHeaderView:(UIView *)headerView { 188 | _headerView = headerView; 189 | self.tableView.tableHeaderView = headerView; 190 | } 191 | 192 | @end 193 | -------------------------------------------------------------------------------- /HGPersonalCenter/Controllers/HGHomeViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HGHomeViewController.h 3 | // HGPersonalCenter 4 | // 5 | // Created by Arch on 2017/6/16. 6 | // Copyright © 2017年 mint_bin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HGHomeViewController : HGBaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HGPersonalCenter/Controllers/HGHomeViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HGHomeViewController.m 3 | // HGPersonalCenter 4 | // 5 | // Created by Arch on 2017/6/16. 6 | // Copyright © 2017年 mint_bin. All rights reserved. 7 | // 8 | 9 | #import "HGHomeViewController.h" 10 | #import "HGPersonalCenterViewController.h" 11 | 12 | @interface HGHomeViewController () 13 | @property (weak, nonatomic) IBOutlet UISwitch *enlargeSwitch; 14 | @end 15 | 16 | @implementation HGHomeViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | self.gk_navTitle = @"主页"; 21 | } 22 | 23 | // 进入个人中心 24 | - (IBAction)enterCenterAction:(UIButton *)sender { 25 | HGPersonalCenterViewController *vc = [[HGPersonalCenterViewController alloc] init]; 26 | vc.isEnlarge = self.enlargeSwitch.on; 27 | vc.selectedIndex = 0; 28 | [self.navigationController pushViewController:vc animated:YES]; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /HGPersonalCenter/Controllers/HGMessageViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HGMessageViewController.h 3 | // HGPersonalCenter 4 | // 5 | // Created by Arch on 2019/5/15. 6 | // Copyright © 2019 mint_bin@163.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HGMessageViewController : HGBaseViewController 12 | @end 13 | -------------------------------------------------------------------------------- /HGPersonalCenter/Controllers/HGMessageViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HGMessageViewController.m 3 | // HGPersonalCenter 4 | // 5 | // Created by Arch on 2019/5/15. 6 | // Copyright © 2019 mint_bin@163.com. All rights reserved. 7 | // 8 | 9 | #import "HGMessageViewController.h" 10 | 11 | @interface HGMessageViewController () 12 | 13 | @end 14 | 15 | @implementation HGMessageViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | self.title = @"消息"; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /HGPersonalCenter/Controllers/HGPersonalCenterViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HGPersonalCenterViewController.h 3 | // HGPersonalCenter 4 | // 5 | // Created by Arch on 2017/6/16. 6 | // Copyright © 2017年 mint_bin. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "HGNestedScrollViewController.h" 11 | 12 | @interface HGPersonalCenterViewController : HGNestedScrollViewController 13 | @property (nonatomic, assign) NSUInteger selectedIndex; 14 | @end 15 | -------------------------------------------------------------------------------- /HGPersonalCenter/Controllers/HGPersonalCenterViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HGPersonalCenterViewController.m 3 | // HGPersonalCenter 4 | // 5 | // Created by Arch on 2017/6/16. 6 | // Copyright © 2017年 mint_bin. All rights reserved. 7 | // 8 | 9 | #import "HGPersonalCenterViewController.h" 10 | #import "HGFirstViewController.h" 11 | #import "HGSecondViewController.h" 12 | #import "HGThirdViewController.h" 13 | #import "HGCenterBaseTableView.h" 14 | #import "HGHeaderImageView.h" 15 | #import "HGMessageViewController.h" 16 | 17 | @interface HGPersonalCenterViewController () 18 | @property (nonatomic, strong) UIButton *messageButton; 19 | @end 20 | 21 | @implementation HGPersonalCenterViewController 22 | 23 | #pragma mark - Life Cycle 24 | - (void)viewDidLoad { 25 | [super viewDidLoad]; 26 | [self setupNavigationBar]; 27 | [self setupTableView]; 28 | // 可以在请求数据成功后设置/改变pageViewControllers, 但是要保证titles.count = pageViewControllers.count 29 | [self setupPageViewControllers]; 30 | /// 支持修改单个title 31 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(6.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 32 | [self.segmentedPageViewController.categoryView updateSelectedTitle:@"哔哩哔哩"]; 33 | }); 34 | } 35 | 36 | #pragma mark - Private Methods 37 | - (void)setupNavigationBar { 38 | self.gk_navBarAlpha = 0; 39 | UIBarButtonItem *messageItem = [[UIBarButtonItem alloc] initWithCustomView:self.messageButton]; 40 | self.gk_navRightBarButtonItem = messageItem; 41 | } 42 | 43 | - (void)setupTableView { 44 | self.tableView.delegate = self; 45 | self.tableView.dataSource = self; 46 | self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; 47 | self.tableView.showsVerticalScrollIndicator = NO; 48 | } 49 | 50 | #pragma mark - Private Methods 51 | - (void)setupPageViewControllers { 52 | NSMutableArray *controllers = [NSMutableArray array]; 53 | NSArray *titles = @[@"主页", @"动态", @"关注", @"粉丝"]; 54 | for (int i = 0; i < titles.count; i++) { 55 | HGPageViewController *controller; 56 | if (i % 3 == 0) { 57 | controller = [[HGThirdViewController alloc] init]; 58 | } else if (i % 2 == 0) { 59 | controller = [[HGSecondViewController alloc] init]; 60 | } else { 61 | controller = [[HGFirstViewController alloc] init]; 62 | } 63 | [controllers addObject:controller]; 64 | } 65 | self.segmentedPageViewController.pageViewControllers = controllers; 66 | self.segmentedPageViewController.selectedPage = self.selectedIndex; 67 | self.segmentedPageViewController.categoryView.titles = titles; 68 | } 69 | 70 | - (void)viewMessage { 71 | HGMessageViewController *vc = [[HGMessageViewController alloc] init]; 72 | [self.navigationController pushViewController:vc animated:YES]; 73 | } 74 | 75 | #pragma mark - UITableViewDataSource 76 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 77 | return 1; 78 | } 79 | 80 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 81 | return [UITableViewCell new]; 82 | } 83 | 84 | #pragma mark - UITableViewDelegate 85 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 86 | return CGFLOAT_MIN; 87 | } 88 | 89 | // 解决tableView在group类型下tableView头部和底部多余空白的问题 90 | - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { 91 | return nil; 92 | } 93 | 94 | - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { 95 | return nil; 96 | } 97 | 98 | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { 99 | return CGFLOAT_MIN; 100 | } 101 | 102 | - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { 103 | return CGFLOAT_MIN; 104 | } 105 | 106 | #pragma mark - Getters 107 | - (UIButton *)messageButton { 108 | if (!_messageButton) { 109 | _messageButton = [UIButton buttonWithType:UIButtonTypeCustom]; 110 | [_messageButton setTitle:@"消息" forState:UIControlStateNormal]; 111 | [_messageButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 112 | _messageButton.titleLabel.font = [UIFont systemFontOfSize:17]; 113 | _messageButton.contentEdgeInsets = UIEdgeInsetsMake(0, 12, 0, 12); 114 | [_messageButton addTarget:self action:@selector(viewMessage) forControlEvents:UIControlEventTouchUpInside]; 115 | } 116 | return _messageButton; 117 | } 118 | 119 | @end 120 | 121 | -------------------------------------------------------------------------------- /HGPersonalCenter/Controllers/PageViewControllers/HGFirstViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HGFirstViewController.h 3 | // HGPersonalCenter 4 | // 5 | // Created by Arch on 2017/6/16. 6 | // Copyright © 2017年 mint_bin. All rights reserved. 7 | // 8 | 9 | #import "HGPageViewController.h" 10 | 11 | @interface HGFirstViewController : HGPageViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HGPersonalCenter/Controllers/PageViewControllers/HGFirstViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HGFirstViewController.m 3 | // HGPersonalCenter 4 | // 5 | // Created by Arch on 2017/6/16. 6 | // Copyright © 2017年 mint_bin. All rights reserved. 7 | // 8 | 9 | #import "HGFirstViewController.h" 10 | 11 | @interface HGFirstViewController () < UITableViewDelegate, UITableViewDataSource> 12 | @property (nonatomic, strong) UITableView *tableView; 13 | @end 14 | 15 | @implementation HGFirstViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | [self.view addSubview:self.tableView]; 20 | [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { 21 | make.edges.equalTo(self.view); 22 | }]; 23 | } 24 | 25 | #pragma mark - UITableViewDataSource 26 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 27 | return 30; 28 | } 29 | 30 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 31 | static NSString *const FirstViewControllerTableViewCellIdentifier = @"FirstViewControllerTableViewCell"; 32 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:FirstViewControllerTableViewCellIdentifier]; 33 | if (cell == nil) { 34 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:FirstViewControllerTableViewCellIdentifier]; 35 | } 36 | cell.textLabel.text = @"我要这天,再遮不住我眼"; 37 | return cell; 38 | } 39 | 40 | #pragma mark - Getters 41 | - (UITableView *)tableView { 42 | if (!_tableView) { 43 | _tableView = [[UITableView alloc] init]; 44 | _tableView.delegate = self; 45 | _tableView.dataSource = self; 46 | _tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine; 47 | _tableView.rowHeight = 50; 48 | _tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero]; 49 | } 50 | return _tableView; 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /HGPersonalCenter/Controllers/PageViewControllers/HGSecondViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HGSecondViewController.h 3 | // HGPersonalCenter 4 | // 5 | // Created by Arch on 2017/6/16. 6 | // Copyright © 2017年 mint_bin. All rights reserved. 7 | // 8 | 9 | #import "HGPageViewController.h" 10 | 11 | @interface HGSecondViewController : HGPageViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HGPersonalCenter/Controllers/PageViewControllers/HGSecondViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HGSecondViewController.m 3 | // HGPersonalCenter 4 | // 5 | // Created by Arch on 2017/6/16. 6 | // Copyright © 2017年 mint_bin. All rights reserved. 7 | // 8 | 9 | #import "HGSecondViewController.h" 10 | 11 | static NSString *const SecondViewControllerTableVIewCellIdentifier = @"SecondViewControllerTableVIewCell"; 12 | 13 | @interface HGSecondViewController () 14 | @property(nonatomic, strong) UITableView *tableView; 15 | @end 16 | 17 | @implementation HGSecondViewController 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | [self.view addSubview:self.tableView]; 21 | [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { 22 | make.edges.equalTo(self.view); 23 | }]; 24 | } 25 | 26 | #pragma mark - UITableViewDataSource 27 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 28 | return 6; 29 | } 30 | 31 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 32 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SecondViewControllerTableVIewCellIdentifier forIndexPath:indexPath]; 33 | cell.textLabel.text = [NSString stringWithFormat:@"爱晚起,也爱工作到深夜 Row: %ld", indexPath.row]; 34 | cell.imageView.image = [UIImage imageNamed:@"cartoon.jpg"]; 35 | return cell; 36 | } 37 | 38 | #pragma mark - UITableViewDelegate 39 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 40 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 41 | } 42 | 43 | #pragma mark - Getters 44 | - (UITableView *)tableView { 45 | if (!_tableView) { 46 | _tableView = [[UITableView alloc] init]; 47 | _tableView.delegate = self; 48 | _tableView.dataSource = self; 49 | _tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine; 50 | _tableView.rowHeight = 50; 51 | _tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero]; 52 | [_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:SecondViewControllerTableVIewCellIdentifier]; 53 | } 54 | return _tableView; 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /HGPersonalCenter/Controllers/PageViewControllers/HGThirdViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HGThirdViewController.h 3 | // HGPersonalCenter 4 | // 5 | // Created by Arch on 2017/6/16. 6 | // Copyright © 2017年 mint_bin. All rights reserved. 7 | // 8 | 9 | #import "HGPageViewController.h" 10 | 11 | @interface HGThirdViewController : HGPageViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HGPersonalCenter/Controllers/PageViewControllers/HGThirdViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HGThirdViewController.m 3 | // HGPersonalCenter 4 | // 5 | // Created by Arch on 2017/6/16. 6 | // Copyright © 2017年 mint_bin. All rights reserved. 7 | // 8 | 9 | #import "HGThirdViewController.h" 10 | 11 | static NSString *const ThirdViewControllerCollectionViewCellIdentifier = @"ThirdViewControllerCollectionViewCell"; 12 | 13 | @interface HGThirdViewController () 14 | @property (nonatomic, strong) UICollectionView *collectionView; 15 | 16 | @end 17 | 18 | @implementation HGThirdViewController 19 | 20 | - (void)viewDidLoad { 21 | [super viewDidLoad]; 22 | [self.view addSubview:self.collectionView]; 23 | [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) { 24 | make.edges.equalTo(self.view); 25 | }]; 26 | } 27 | 28 | #pragma mark - UICollectionViewDataSource 29 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { 30 | return 5; 31 | } 32 | 33 | - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { 34 | UICollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:ThirdViewControllerCollectionViewCellIdentifier forIndexPath:indexPath]; 35 | cell.backgroundColor = kRGBA(28, 162, 223, 1.0);; 36 | return cell; 37 | } 38 | 39 | #pragma mark - UICollectionViewDelegate 40 | - (BOOL)collectionView:(UICollectionView *)collectionView shouldSelectItemAtIndexPath:(NSIndexPath *)indexPath { 41 | return YES; 42 | } 43 | 44 | #pragma mark - Getters 45 | - (UICollectionView *)collectionView { 46 | if (!_collectionView) { 47 | UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init]; 48 | flowLayout.minimumInteritemSpacing = 10; 49 | flowLayout.minimumLineSpacing = 10; 50 | flowLayout.sectionInset = UIEdgeInsetsMake(10, 10, 5, 10); 51 | flowLayout.itemSize = CGSizeMake((SCREEN_WIDTH - 30) / 2.0, 200); 52 | flowLayout.scrollDirection = UICollectionViewScrollDirectionVertical; 53 | 54 | _collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:flowLayout]; 55 | _collectionView.delegate = self; 56 | _collectionView.dataSource = self; 57 | // 因为当collectionView的内容不满一屏时,会导致竖直方向滑动失效,所以需要设置alwaysBounceVertical为YES 58 | _collectionView.alwaysBounceVertical = YES; 59 | _collectionView.backgroundColor = [UIColor whiteColor]; 60 | [_collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:ThirdViewControllerCollectionViewCellIdentifier]; 61 | } 62 | return _collectionView; 63 | } 64 | @end 65 | -------------------------------------------------------------------------------- /HGPersonalCenter/HGMacro.h: -------------------------------------------------------------------------------- 1 | // 2 | // HGMacro.h 3 | // HGPersonalCenterExtend 4 | // 5 | // Created by Arch on 2019/5/15. 6 | // Copyright © 2019 mint_bin@163.com. All rights reserved. 7 | // 8 | 9 | #ifndef HGMacro_h 10 | #define HGMacro_h 11 | 12 | // device 13 | #define SCREEN_HEIGHT [[UIScreen mainScreen] bounds].size.height 14 | #define SCREEN_WIDTH [[UIScreen mainScreen] bounds].size.width 15 | #define STATUS_BAR_HEIGHT [UIApplication sharedApplication].statusBarFrame.size.height 16 | #define NAVIGATION_BAR_HEIGHT (IS_IPAD ? 50 : 44) 17 | #define IS_EXIST_FRINGE [HGDeviceHelper isExistFringe] 18 | #define IS_EXIST_JAW [HGDeviceHelper isExistJaw] 19 | #define SAFE_AREA_INSERTS_BOTTOM [HGDeviceHelper safeAreaInsetsBottom] 20 | #define SAFE_AREA_INSERTS_TOP [HGDeviceHelper safeAreaInsetsTop] 21 | #define TOP_BAR_HEIGHT (SAFE_AREA_INSERTS_TOP + NAVIGATION_BAR_HEIGHT) 22 | #define IS_IPAD ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) 23 | // color 24 | #define kRGBA(r, g, b, a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a] 25 | 26 | #endif /* HGMacro_h */ 27 | -------------------------------------------------------------------------------- /HGPersonalCenter/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UIStatusBarStyle 32 | UIStatusBarStyleLightContent 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /HGPersonalCenter/PrefixHeader.pch: -------------------------------------------------------------------------------- 1 | // 2 | // PrefixHeader.pch 3 | // HGPersonalCenter 4 | // 5 | // Created by Arch on 2017/9/15. 6 | // Copyright © 2017年 mint_bin. All rights reserved. 7 | // 8 | 9 | #ifndef PrefixHeader_pch 10 | #define PrefixHeader_pch 11 | 12 | // Include any system framework and library headers here that should be included in all compilation units. 13 | // You will also need to set the Prefix Header build setting of moveLine or more of your targets to reference this file. 14 | 15 | // 第三方 16 | #import "Masonry.h" 17 | #import "GKNavigationBarViewController.h" 18 | 19 | // 工程 20 | #import "HGBaseViewController.h" 21 | #import "HGDeviceHelper.h" 22 | #import "HGMacro.h" 23 | 24 | #endif /* PrefixHeader_pch */ 25 | -------------------------------------------------------------------------------- /HGPersonalCenter/Tools/HGDeviceHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // HGDeviceHelper.h 3 | // HGPersonalCenter 4 | // 5 | // Created by Arch on 2018/9/17. 6 | // Copyright © 2019 mint_bin@163.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HGDeviceHelper : NSObject 12 | + (BOOL)isIpad; 13 | + (BOOL)isExistFringe; 14 | + (BOOL)isExistJaw; 15 | + (CGFloat)safeAreaInsetsTop; 16 | + (CGFloat)safeAreaInsetsBottom; 17 | + (CGFloat)navigationBarHeight; 18 | + (CGFloat)topBarHeight; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /HGPersonalCenter/Tools/HGDeviceHelper.m: -------------------------------------------------------------------------------- 1 | // 2 | // HGDeviceHelper.m 3 | // HGPersonalCenter 4 | // 5 | // Created by Arch on 2018/9/17. 6 | // Copyright © 2019 mint_bin@163.com. All rights reserved. 7 | // 8 | 9 | #import "HGDeviceHelper.h" 10 | 11 | @implementation HGDeviceHelper 12 | 13 | + (BOOL)isIpad { 14 | return [UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad; 15 | } 16 | 17 | + (BOOL)isExistFringe { 18 | BOOL isExistFringe = NO; 19 | if (@available(iOS 11.0, *)) { 20 | UIWindow *mainWindow = [UIApplication sharedApplication].delegate.window; 21 | if (mainWindow.safeAreaInsets.top > 20.0) { 22 | isExistFringe = YES; 23 | } 24 | } 25 | return isExistFringe; 26 | } 27 | 28 | + (BOOL)isExistJaw { 29 | BOOL isExistJaw = NO; 30 | if (@available(iOS 11.0, *)) { 31 | UIWindow *mainWindow = [UIApplication sharedApplication].delegate.window; 32 | if (mainWindow.safeAreaInsets.bottom > 0.0) { 33 | isExistJaw = YES; 34 | } 35 | } 36 | return isExistJaw; 37 | } 38 | 39 | + (CGFloat)safeAreaInsetsBottom { 40 | if (@available(iOS 11.0, *)) { 41 | UIWindow *mainWindow = [UIApplication sharedApplication].delegate.window; 42 | return mainWindow.safeAreaInsets.bottom; 43 | } else { 44 | return 0; 45 | } 46 | } 47 | 48 | + (CGFloat)safeAreaInsetsTop { 49 | if (@available(iOS 11.0, *)) { 50 | UIWindow *mainWindow = [UIApplication sharedApplication].delegate.window; 51 | return mainWindow.safeAreaInsets.top; 52 | } else { 53 | return 20; 54 | } 55 | } 56 | 57 | + (CGFloat)navigationBarHeight { 58 | if (@available(iOS 12.0, *)) { 59 | if ([self isIpad]) { 60 | return 50; 61 | } 62 | } 63 | return 44; 64 | } 65 | 66 | + (CGFloat)topBarHeight { 67 | return [self safeAreaInsetsTop] + [self navigationBarHeight]; 68 | } 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /HGPersonalCenter/Views/HGHeaderImageView.h: -------------------------------------------------------------------------------- 1 | // 2 | // HGHeaderImageView.h 3 | // HGPersonalCenter 4 | // 5 | // Created by Arch on 2019/5/17. 6 | // Copyright © 2019 mint_bin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HGHeaderImageView : UIView 12 | @property (nonatomic) CGFloat initialHeight; 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /HGPersonalCenter/Views/HGHeaderImageView.m: -------------------------------------------------------------------------------- 1 | // 2 | // HGHeaderImageView.m 3 | // HGPersonalCenter 4 | // 5 | // Created by 黑色幽默 on 2019/5/17. 6 | // Copyright © 2019 mint_bin. All rights reserved. 7 | // 8 | 9 | #import "HGHeaderImageView.h" 10 | 11 | @interface HGHeaderImageView () 12 | @property (nonatomic, strong) UIImageView *backgroundImageView; 13 | @property (nonatomic, strong) UIImageView *avatarImageView; 14 | @property (nonatomic, strong) UILabel *nickNameLabel; 15 | @end 16 | 17 | @implementation HGHeaderImageView 18 | 19 | - (instancetype)initWithFrame:(CGRect)frame { 20 | self = [super initWithFrame:frame]; 21 | if (self) { 22 | _initialHeight = frame.size.height; 23 | [self setupViews]; 24 | } 25 | return self; 26 | } 27 | 28 | - (void)setupViews { 29 | [self addSubview:self.backgroundImageView]; 30 | [self addSubview:self.avatarImageView]; 31 | [self addSubview:self.nickNameLabel]; 32 | 33 | [self.backgroundImageView mas_makeConstraints:^(MASConstraintMaker *make) { 34 | make.edges.equalTo(self); 35 | }]; 36 | [self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) { 37 | make.centerX.equalTo(self.backgroundImageView); 38 | make.size.mas_equalTo(CGSizeMake(80, 80)); 39 | make.bottom.mas_equalTo(-70); 40 | }]; 41 | [self.nickNameLabel mas_makeConstraints:^(MASConstraintMaker *make) { 42 | make.centerX.equalTo(self.backgroundImageView); 43 | make.width.mas_lessThanOrEqualTo(200); 44 | make.bottom.mas_equalTo(-40); 45 | }]; 46 | } 47 | 48 | - (UIImageView *)avatarImageView { 49 | if (!_avatarImageView) { 50 | _avatarImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"center_avatar.jpeg"]]; 51 | _avatarImageView.layer.borderWidth = 1; 52 | _avatarImageView.layer.borderColor = kRGBA(255, 253, 253, 1).CGColor; 53 | _avatarImageView.layer.cornerRadius = 40; 54 | _avatarImageView.layer.masksToBounds = YES; 55 | } 56 | return _avatarImageView; 57 | } 58 | 59 | - (UILabel *)nickNameLabel { 60 | if (!_nickNameLabel) { 61 | _nickNameLabel = [[UILabel alloc] init]; 62 | _nickNameLabel.font = [UIFont systemFontOfSize:16]; 63 | _nickNameLabel.textColor = [UIColor whiteColor]; 64 | _nickNameLabel.textAlignment = NSTextAlignmentCenter; 65 | _nickNameLabel.text = @"下雪天"; 66 | } 67 | return _nickNameLabel; 68 | } 69 | 70 | - (UIImageView *)backgroundImageView { 71 | if (!_backgroundImageView) { 72 | _backgroundImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"center_bg.jpg"]]; 73 | } 74 | return _backgroundImageView; 75 | } 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /HGPersonalCenter/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // HGPersonalCenter 4 | // 5 | // Created by Arch on 2017/6/16. 6 | // Copyright © 2017年 mint_bin. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 mint_bin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | source 'https://github.com/CocoaPods/Specs.git' 3 | 4 | platform :ios, '9.0' 5 | 6 | inhibit_all_warnings! 7 | 8 | target 'HGPersonalCenter' do 9 | 10 | pod 'HGPersonalCenterExtend', '~> 1.3.2' 11 | pod 'GKNavigationBarViewController', '~> 3.0.0' 12 | pod 'FDFullscreenPopGesture', '~> 1.1' 13 | 14 | end 15 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FDFullscreenPopGesture (1.1) 3 | - GKNavigationBarViewController (3.0.0) 4 | - HGCategoryView (1.2.1): 5 | - Masonry (~> 1.1.0) 6 | - HGPersonalCenterExtend (1.3.2): 7 | - HGCategoryView (~> 1.2.1) 8 | - Masonry (~> 1.1.0) 9 | - Masonry (1.1.0) 10 | 11 | DEPENDENCIES: 12 | - FDFullscreenPopGesture (~> 1.1) 13 | - GKNavigationBarViewController (~> 3.0.0) 14 | - HGPersonalCenterExtend (~> 1.3.2) 15 | 16 | SPEC REPOS: 17 | https://github.com/CocoaPods/Specs.git: 18 | - FDFullscreenPopGesture 19 | - GKNavigationBarViewController 20 | - HGCategoryView 21 | - HGPersonalCenterExtend 22 | - Masonry 23 | 24 | SPEC CHECKSUMS: 25 | FDFullscreenPopGesture: a8a620179e3d9c40e8e00256dcee1c1a27c6d0f0 26 | GKNavigationBarViewController: 103e7cac0a4b3e7d083ebee7d10ec5e7b4ee2758 27 | HGCategoryView: d0aafdb8f6e7d5e46857061928dd1bb4cc17d9fb 28 | HGPersonalCenterExtend: 9c77a16f66947c04d46a8ab4f990f5481476d608 29 | Masonry: 678fab65091a9290e40e2832a55e7ab731aad201 30 | 31 | PODFILE CHECKSUM: 337cbb0acf41253292d14c35bdeb99050214d326 32 | 33 | COCOAPODS: 1.10.1 34 | -------------------------------------------------------------------------------- /Pods/GKNavigationBarViewController/GKNavigationBarViewController/GKNavigationBarViewController.bundle/btn_back_black@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLL/HGPersonalCenter/a0cb101f8964a8a5cb323030013b7094c35233a2/Pods/GKNavigationBarViewController/GKNavigationBarViewController/GKNavigationBarViewController.bundle/btn_back_black@2x.png -------------------------------------------------------------------------------- /Pods/GKNavigationBarViewController/GKNavigationBarViewController/GKNavigationBarViewController.bundle/btn_back_black@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLL/HGPersonalCenter/a0cb101f8964a8a5cb323030013b7094c35233a2/Pods/GKNavigationBarViewController/GKNavigationBarViewController/GKNavigationBarViewController.bundle/btn_back_black@3x.png -------------------------------------------------------------------------------- /Pods/GKNavigationBarViewController/GKNavigationBarViewController/GKNavigationBarViewController.bundle/btn_back_white@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLL/HGPersonalCenter/a0cb101f8964a8a5cb323030013b7094c35233a2/Pods/GKNavigationBarViewController/GKNavigationBarViewController/GKNavigationBarViewController.bundle/btn_back_white@2x.png -------------------------------------------------------------------------------- /Pods/GKNavigationBarViewController/GKNavigationBarViewController/GKNavigationBarViewController.bundle/btn_back_white@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLL/HGPersonalCenter/a0cb101f8964a8a5cb323030013b7094c35233a2/Pods/GKNavigationBarViewController/GKNavigationBarViewController/GKNavigationBarViewController.bundle/btn_back_white@3x.png -------------------------------------------------------------------------------- /Pods/GKNavigationBarViewController/GKNavigationBarViewController/GKNavigationBarViewController.bundle/nav_line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLL/HGPersonalCenter/a0cb101f8964a8a5cb323030013b7094c35233a2/Pods/GKNavigationBarViewController/GKNavigationBarViewController/GKNavigationBarViewController.bundle/nav_line.png -------------------------------------------------------------------------------- /Pods/GKNavigationBarViewController/GKNavigationBarViewController/GKNavigationBarViewController.bundle/nav_line@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLL/HGPersonalCenter/a0cb101f8964a8a5cb323030013b7094c35233a2/Pods/GKNavigationBarViewController/GKNavigationBarViewController/GKNavigationBarViewController.bundle/nav_line@2x.png -------------------------------------------------------------------------------- /Pods/GKNavigationBarViewController/GKNavigationBarViewController/GKNavigationBarViewController.bundle/nav_line@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLL/HGPersonalCenter/a0cb101f8964a8a5cb323030013b7094c35233a2/Pods/GKNavigationBarViewController/GKNavigationBarViewController/GKNavigationBarViewController.bundle/nav_line@3x.png -------------------------------------------------------------------------------- /Pods/GKNavigationBarViewController/GKNavigationBarViewController/GKNavigationBarViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // GKNavigationBarViewController.h 3 | // GKNavigationBarViewController 4 | // 5 | // Created by QuintGao on 2017/7/7. 6 | // Copyright © 2017年 高坤. All rights reserved. 7 | // 所有需要显示导航条的基类,可根据自己的需求设置导航栏 8 | // 基本原理就是为每一个控制器添加自定义导航条,做到导航条与控制器相连的效果 9 | 10 | #import 11 | #import "GKCategory.h" 12 | #import "GKNavigationBar.h" 13 | #import "GKNavigationBarConfigure.h" 14 | 15 | @interface GKNavigationBarViewController : UIViewController 16 | 17 | /// 自定义导航条 18 | @property (nonatomic, strong, readonly) GKNavigationBar *gk_navigationBar; 19 | 20 | /// 自定义导航条栏目 21 | @property (nonatomic, strong, readonly) UINavigationItem *gk_navigationItem; 22 | 23 | #pragma mark - 额外的快速设置导航栏的属性 24 | @property (nonatomic, strong) UIColor *gk_navBarTintColor; 25 | @property (nonatomic, strong) UIColor *gk_navBackgroundColor; 26 | @property (nonatomic, strong) UIImage *gk_navBackgroundImage; 27 | /** 设置导航栏分割线颜色或图片 */ 28 | @property (nonatomic, strong) UIColor *gk_navShadowColor; 29 | @property (nonatomic, strong) UIImage *gk_navShadowImage; 30 | 31 | @property (nonatomic, strong) UIColor *gk_navTintColor; 32 | @property (nonatomic, strong) UIView *gk_navTitleView; 33 | @property (nonatomic, strong) UIColor *gk_navTitleColor; 34 | @property (nonatomic, strong) UIFont *gk_navTitleFont; 35 | 36 | @property (nonatomic, strong) UIBarButtonItem *gk_navLeftBarButtonItem; 37 | @property (nonatomic, strong) NSArray *gk_navLeftBarButtonItems; 38 | 39 | @property (nonatomic, strong) UIBarButtonItem *gk_navRightBarButtonItem; 40 | @property (nonatomic, strong) NSArray *gk_navRightBarButtonItems; 41 | 42 | /** 页面标题-快速设置 */ 43 | @property (nonatomic, copy) NSString *gk_navTitle; 44 | 45 | /// 是否隐藏导航栏分割线,默认为NO 46 | @property (nonatomic, assign) BOOL gk_navLineHidden; 47 | 48 | /// 显示导航栏分割线 49 | - (void)showNavLine; 50 | 51 | /// 隐藏导航栏分割线 52 | - (void)hideNavLine; 53 | 54 | /// 刷新导航栏frame 55 | - (void)refreshNavBarFrame; 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /Pods/GKNavigationBarViewController/GKNavigationBarViewController/GKNavigationBarViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // GKNavigationBarViewController.m 3 | // GKNavigationBarViewController 4 | // 5 | // Created by QuintGao on 2017/7/7. 6 | // Copyright © 2017年 高坤. All rights reserved. 7 | // 8 | 9 | #import "GKNavigationBarViewController.h" 10 | #import "GKNavigationBarConfigure.h" 11 | #import "UINavigationController+GKCategory.h" 12 | 13 | @interface GKNavigationBarViewController () 14 | 15 | @property (nonatomic, strong) GKNavigationBar *gk_navigationBar; 16 | 17 | @property (nonatomic, strong) UINavigationItem *gk_navigationItem; 18 | 19 | @end 20 | 21 | @implementation GKNavigationBarViewController 22 | 23 | - (void)viewDidLoad { 24 | [super viewDidLoad]; 25 | 26 | // 设置自定义导航栏 27 | [self setupCustomNavBar]; 28 | 29 | // 设置导航栏外观 30 | [self setupNavBarAppearance]; 31 | } 32 | 33 | - (void)viewWillAppear:(BOOL)animated { 34 | [super viewWillAppear:animated]; 35 | 36 | // 隐藏系统导航栏 37 | if (!self.navigationController.gk_openSystemNavHandle) { 38 | [self.navigationController setNavigationBarHidden:YES]; 39 | } 40 | 41 | // 将自定义导航栏放置顶层 42 | if (self.gk_navigationBar && !self.gk_navigationBar.hidden) { 43 | [self.view bringSubviewToFront:self.gk_navigationBar]; 44 | } 45 | 46 | // 返回按钮样式 47 | if (self.gk_backStyle == GKNavigationBarBackStyleNone) { 48 | self.gk_backStyle = GKConfigure.backStyle; 49 | } 50 | } 51 | 52 | #pragma mark - Public Methods 53 | - (void)showNavLine { 54 | self.gk_navLineHidden = NO; 55 | } 56 | 57 | - (void)hideNavLine { 58 | self.gk_navLineHidden = YES; 59 | } 60 | 61 | - (void)refreshNavBarFrame { 62 | [self setupNavBarFrame]; 63 | } 64 | 65 | #pragma mark - private Methods 66 | /** 67 | 设置自定义导航条 68 | */ 69 | - (void)setupCustomNavBar { 70 | 71 | [self.view addSubview:self.gk_navigationBar]; 72 | 73 | [self setupNavBarFrame]; 74 | 75 | self.gk_navigationBar.items = @[self.gk_navigationItem]; 76 | } 77 | 78 | /** 79 | 设置导航栏外观 80 | */ 81 | - (void)setupNavBarAppearance { 82 | GKNavigationBarConfigure *configure = [GKNavigationBarConfigure sharedInstance]; 83 | 84 | // 设置默认背景色 85 | if (configure.backgroundColor) { 86 | self.gk_navBackgroundColor = configure.backgroundColor; 87 | } 88 | 89 | // 设置默认标题颜色 90 | if (configure.titleColor) { 91 | self.gk_navTitleColor = configure.titleColor; 92 | } 93 | 94 | // 设置默认标题字体 95 | if (configure.titleFont) { 96 | self.gk_navTitleFont = configure.titleFont; 97 | } 98 | 99 | // 设置默认返回图片 100 | if (self.gk_backImage == nil) { 101 | self.gk_backImage = configure.backImage; 102 | } 103 | 104 | // 设置默认返回样式 105 | if (self.gk_backStyle == GKNavigationBarBackStyleNone) { 106 | self.gk_backStyle = configure.backStyle; 107 | } 108 | } 109 | 110 | - (void)viewWillLayoutSubviews { 111 | [super viewWillLayoutSubviews]; 112 | 113 | [self setupNavBarFrame]; 114 | } 115 | 116 | - (void)setupNavBarFrame { 117 | CGFloat navBarH = 0.0f; 118 | if (GK_IS_iPad) { // iPad 119 | navBarH = self.gk_statusBarHidden ? GK_NAVBAR_HEIGHT : GK_STATUSBAR_NAVBAR_HEIGHT; 120 | }else if (GK_IS_LANDSCAPE) { // 横屏不显示状态栏 121 | navBarH = GK_NAVBAR_HEIGHT; 122 | }else { 123 | if (GK_NOTCHED_SCREEN) { // 刘海屏手机 124 | navBarH = GK_SAFEAREA_TOP + GK_NAVBAR_HEIGHT; 125 | }else { 126 | navBarH = self.gk_statusBarHidden ? GK_NAVBAR_HEIGHT : GK_STATUSBAR_NAVBAR_HEIGHT; 127 | } 128 | } 129 | self.gk_navigationBar.frame = CGRectMake(0, 0, GK_SCREEN_WIDTH, navBarH); 130 | [self.gk_navigationBar layoutSubviews]; 131 | } 132 | 133 | #pragma mark - 控制状态栏的方法 134 | - (BOOL)prefersStatusBarHidden { 135 | return self.gk_statusBarHidden; 136 | } 137 | 138 | - (UIStatusBarStyle)preferredStatusBarStyle { 139 | return self.gk_statusBarStyle; 140 | } 141 | 142 | #pragma mark - 懒加载 143 | - (GKNavigationBar *)gk_navigationBar { 144 | if (!_gk_navigationBar) { 145 | _gk_navigationBar = [[GKNavigationBar alloc] initWithFrame:CGRectZero]; 146 | } 147 | return _gk_navigationBar; 148 | } 149 | 150 | - (UINavigationItem *)gk_navigationItem { 151 | if (!_gk_navigationItem) { 152 | _gk_navigationItem = [UINavigationItem new]; 153 | } 154 | return _gk_navigationItem; 155 | } 156 | 157 | #pragma mark - setter 158 | - (void)setGk_navTitle:(NSString *)gk_navTitle { 159 | _gk_navTitle = gk_navTitle; 160 | 161 | self.gk_navigationItem.title = gk_navTitle; 162 | } 163 | 164 | - (void)setGk_navBarTintColor:(UIColor *)gk_navBarTintColor { 165 | _gk_navBarTintColor = gk_navBarTintColor; 166 | 167 | self.gk_navigationBar.barTintColor = gk_navBarTintColor; 168 | } 169 | 170 | - (void)setGk_navBackgroundColor:(UIColor *)gk_navBackgroundColor { 171 | _gk_navBackgroundColor = gk_navBackgroundColor; 172 | 173 | [self.gk_navigationBar setBackgroundImage:[UIImage gk_imageWithColor:gk_navBackgroundColor] forBarMetrics:UIBarMetricsDefault]; 174 | } 175 | 176 | - (void)setGk_navBackgroundImage:(UIImage *)gk_navBackgroundImage { 177 | _gk_navBackgroundImage = gk_navBackgroundImage; 178 | 179 | [self.gk_navigationBar setBackgroundImage:gk_navBackgroundImage forBarMetrics:UIBarMetricsDefault]; 180 | } 181 | 182 | - (void)setGk_navShadowColor:(UIColor *)gk_navShadowColor { 183 | _gk_navShadowColor = gk_navShadowColor; 184 | 185 | self.gk_navigationBar.shadowImage = [UIImage gk_changeImage:[UIImage gk_imageNamed:@"nav_line"] color:gk_navShadowColor]; 186 | } 187 | 188 | - (void)setGk_navShadowImage:(UIImage *)gk_navShadowImage { 189 | _gk_navShadowImage = gk_navShadowImage; 190 | 191 | self.gk_navigationBar.shadowImage = gk_navShadowImage; 192 | } 193 | 194 | - (void)setGk_navTintColor:(UIColor *)gk_navTintColor { 195 | _gk_navTintColor = gk_navTintColor; 196 | 197 | self.gk_navigationBar.tintColor = gk_navTintColor; 198 | } 199 | 200 | - (void)setGk_navTitleView:(UIView *)gk_navTitleView { 201 | _gk_navTitleView = gk_navTitleView; 202 | 203 | self.gk_navigationItem.titleView = gk_navTitleView; 204 | } 205 | 206 | - (void)setGk_navTitleColor:(UIColor *)gk_navTitleColor { 207 | _gk_navTitleColor = gk_navTitleColor; 208 | 209 | UIFont *titleFont = self.gk_navTitleFont ? self.gk_navTitleFont : GKConfigure.titleFont; 210 | 211 | self.gk_navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: gk_navTitleColor, NSFontAttributeName: titleFont}; 212 | } 213 | 214 | - (void)setGk_navTitleFont:(UIFont *)gk_navTitleFont { 215 | _gk_navTitleFont = gk_navTitleFont; 216 | 217 | UIColor *titleColor = self.gk_navTitleColor ? self.gk_navTitleColor : GKConfigure.titleColor; 218 | 219 | self.gk_navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: titleColor, NSFontAttributeName: gk_navTitleFont}; 220 | } 221 | 222 | - (void)setGk_navLeftBarButtonItem:(UIBarButtonItem *)gk_navLeftBarButtonItem { 223 | _gk_navLeftBarButtonItem = gk_navLeftBarButtonItem; 224 | 225 | self.gk_navigationItem.leftBarButtonItem = gk_navLeftBarButtonItem; 226 | } 227 | 228 | - (void)setGk_navLeftBarButtonItems:(NSArray *)gk_navLeftBarButtonItems { 229 | _gk_navLeftBarButtonItems = gk_navLeftBarButtonItems; 230 | 231 | self.gk_navigationItem.leftBarButtonItems = gk_navLeftBarButtonItems; 232 | } 233 | 234 | - (void)setGk_navRightBarButtonItem:(UIBarButtonItem *)gk_navRightBarButtonItem { 235 | _gk_navRightBarButtonItem = gk_navRightBarButtonItem; 236 | 237 | self.gk_navigationItem.rightBarButtonItem = gk_navRightBarButtonItem; 238 | } 239 | 240 | - (void)setGk_navRightBarButtonItems:(NSArray *)gk_navRightBarButtonItems { 241 | _gk_navRightBarButtonItems = gk_navRightBarButtonItems; 242 | 243 | self.gk_navigationItem.rightBarButtonItems = gk_navRightBarButtonItems; 244 | } 245 | 246 | - (void)setGk_navLineHidden:(BOOL)gk_navLineHidden { 247 | _gk_navLineHidden = gk_navLineHidden; 248 | 249 | self.gk_navigationBar.gk_navLineHidden = gk_navLineHidden; 250 | 251 | if (@available(iOS 11.0, *)) { 252 | UIImage *shadowImage = nil; 253 | if (gk_navLineHidden) { 254 | shadowImage = [UIImage new]; 255 | }else if (self.gk_navShadowImage) { 256 | shadowImage = self.gk_navShadowImage; 257 | }else if (self.gk_navShadowColor) { 258 | shadowImage = [UIImage gk_changeImage:[UIImage gk_imageNamed:@"nav_line"] color:self.gk_navShadowColor]; 259 | } 260 | self.gk_navigationBar.shadowImage = shadowImage; 261 | } 262 | 263 | [self.gk_navigationBar layoutSubviews]; 264 | } 265 | 266 | @end 267 | -------------------------------------------------------------------------------- /Pods/GKNavigationBarViewController/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 高坤 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Pods/HGCategoryView/HGCategoryView/HGCategoryView.h: -------------------------------------------------------------------------------- 1 | // 2 | // HGCategoryView.h 3 | // HGCategoryView 4 | // 5 | // Created by Arch on 2018/8/20. 6 | // Copyright © 2018年 mint_bin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef NS_ENUM(NSUInteger, HGCategoryViewAlignment) { 12 | HGCategoryViewAlignmentLeft, 13 | HGCategoryViewAlignmentCenter, 14 | HGCategoryViewAlignmentRight 15 | }; 16 | 17 | @protocol HGCategoryViewDelegate 18 | @optional 19 | - (void)categoryViewDidSelectedItemAtIndex:(NSInteger)index; 20 | @end 21 | 22 | @interface HGCategoryView : UIView 23 | 24 | @property (nonatomic, weak) id delegate; 25 | 26 | /// titles 27 | @property (nonatomic, copy) NSArray *titles; 28 | 29 | /// 当前选中的下标,default:0 30 | @property (nonatomic) NSUInteger selectedIndex; 31 | 32 | /// 自身高度,default:41 33 | @property (nonatomic) CGFloat height; 34 | 35 | /// 分布方式(左、中、右) 36 | @property (nonatomic) HGCategoryViewAlignment alignment; 37 | 38 | /// 未选中时的字体,default size:16 39 | @property (nonatomic, strong) UIFont *titleNomalFont; 40 | 41 | /// 选中时的字体,default size:17 42 | @property (nonatomic, strong) UIFont *titleSelectedFont; 43 | 44 | /// 未选中时的字体颜色,default:[UIColor grayColor] 45 | @property (nonatomic, strong) UIColor *titleNormalColor; 46 | 47 | /// 选中时的字体颜色,default:[UIColor redColor] 48 | @property (nonatomic, strong) UIColor *titleSelectedColor; 49 | 50 | /// 上边框(高度为一个像素),默认显示 51 | @property (nonatomic, strong, readonly) UIView *topBorder; 52 | 53 | /// 下边框(高度为一个像素),默认显示 54 | @property (nonatomic, strong, readonly) UIView *bottomBorder; 55 | 56 | /// 游标 57 | @property (nonatomic, strong, readonly) UIView *vernier; 58 | 59 | /// 游标的宽度(设置后固定),default:随着title的宽度变化, 60 | @property (nonatomic) CGFloat vernierWidth; 61 | 62 | /// 游标的高度,default:1.8 63 | @property (nonatomic) CGFloat vernierHeight; 64 | 65 | /// item间距,default:15 66 | @property (nonatomic) CGFloat itemSpacing; 67 | 68 | /// item宽度(设置后固定),default:随着内容宽度变化 69 | @property (nonatomic) CGFloat itemWidth; 70 | 71 | /// collectionView左边的margin,default:10 72 | @property (nonatomic) CGFloat leftMargin; 73 | 74 | /// collectionView右边的margin,default:10 75 | @property (nonatomic) CGFloat rightMargin; 76 | 77 | /// item是否等分(实质上改变的是itemWidth),default:NO 78 | @property (nonatomic) CGFloat isEqualParts; 79 | 80 | /// 字体变大、vernier位置切换动画时长,default:0.25 81 | @property (nonatomic) CGFloat animateDuration; 82 | 83 | /** 84 | 使collectionView滚动到指定的cell 85 | 86 | @param targetIndex 目标cell的index 87 | @param sourceIndex 当前cell的index 88 | @param percent 滑动距离/(sourceIndex与targetIndex的距离) 89 | */ 90 | - (void)scrollToTargetIndex:(NSUInteger)targetIndex sourceIndex:(NSUInteger)sourceIndex percent:(CGFloat)percent; 91 | 92 | /// 修改当前选中的title 93 | - (void)updateSelectedTitle:(NSString *)title; 94 | /// 修改对应index的title 95 | - (void)updateTitle:(NSString *)title atIndex:(NSUInteger)index; 96 | 97 | @end 98 | -------------------------------------------------------------------------------- /Pods/HGCategoryView/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Arch 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Pods/HGCategoryView/README.md: -------------------------------------------------------------------------------- 1 | # HGCategoryView 2 | 3 | ## Installation 4 | 5 | HGCategoryView is available through [CocoaPods](https://cocoapods.org). To install 6 | it, simply add the following line to your Podfile: 7 | 8 | ```ruby 9 | pod 'HGCategoryView', '~> 1.2.1' 10 | ``` 11 | 12 | ## Usage 13 | 14 | 可以参照我在另外两个库的使用方法: 15 | 16 | [HGPersonalCenterExtend](https://github.com/ArchLL/HGPersonalCenterExtend) 17 | 18 | [HGSegmentedPageViewController](https://github.com/ArchLL/HGSegmentedPageViewController) 19 | 20 | ## Author 21 | 22 | Arch, mint_bin@163.com 23 | 24 | ## License 25 | 26 | HGCategoryView is available under the MIT license. See the LICENSE file for more info. 27 | -------------------------------------------------------------------------------- /Pods/HGPersonalCenterExtend/HGPersonalCenterExtend/HGCenterBaseTableView.h: -------------------------------------------------------------------------------- 1 | // 2 | // HGCenterBaseTableView.h 3 | // HGPersonalCenterExtend 4 | // 5 | // Created by Arch on 2017/6/16. 6 | // Copyright © 2017年 mint_bin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //⚠️:如果使用Swift改写HGCenterBaseTableView这个类, 则需要主动去服从UIGestureRecognizerDelegate这个代理协议 12 | @interface HGCenterBaseTableView : UITableView 13 | @end 14 | -------------------------------------------------------------------------------- /Pods/HGPersonalCenterExtend/HGPersonalCenterExtend/HGCenterBaseTableView.m: -------------------------------------------------------------------------------- 1 | // 2 | // HGCenterBaseTableView.m 3 | // HGPersonalCenterExtend 4 | // 5 | // Created by Arch on 2017/6/16. 6 | // Copyright © 2017年 mint_bin. All rights reserved. 7 | // 8 | 9 | #import "HGCenterBaseTableView.h" 10 | 11 | @implementation HGCenterBaseTableView 12 | 13 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { 14 | if ([otherGestureRecognizer.view isKindOfClass:[HGCenterBaseTableView class]]) { 15 | return YES; 16 | } else { 17 | if ([otherGestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]] 18 | && [otherGestureRecognizer.view isKindOfClass:[UIScrollView class]]) { 19 | UIScrollView *scrollView = (UIScrollView *)otherGestureRecognizer.view; 20 | // 解决scrollView横向滚动不能与其他scrollView纵向滚动互斥的问题 21 | if (fabs(scrollView.contentOffset.x) > 0 && fabs(scrollView.contentOffset.y) == 0) { // 横向滚动 22 | return NO; 23 | } 24 | return YES; 25 | } 26 | return NO; 27 | } 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Pods/HGPersonalCenterExtend/HGPersonalCenterExtend/HGPageViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HGPageViewController.h 3 | // HGPersonalCenterExtend 4 | // 5 | // Created by Arch on 2017/6/16. 6 | // Copyright © 2017年 mint_bin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol HGPageViewControllerDelegate 12 | - (void)pageViewControllerLeaveTop; 13 | @end 14 | 15 | @interface HGPageViewController : UIViewController 16 | @property (nonatomic) BOOL canScroll; 17 | @property (nonatomic, weak) id delegate; 18 | @property (nonatomic) NSInteger pageIndex; 19 | 20 | - (void)scrollToTop; 21 | @end 22 | -------------------------------------------------------------------------------- /Pods/HGPersonalCenterExtend/HGPersonalCenterExtend/HGPageViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HGBasePageViewController.m 3 | // HGPersonalCenterExtend 4 | // 5 | // Created by Arch on 2017/6/16. 6 | // Copyright © 2017年 mint_bin. All rights reserved. 7 | // 8 | 9 | #import "HGPageViewController.h" 10 | #import "HGCategoryView.h" 11 | 12 | @interface HGPageViewController () 13 | @property (nonatomic, strong) UIScrollView *scrollView; 14 | @end 15 | 16 | @implementation HGPageViewController 17 | 18 | #pragma mark - Public Methods 19 | - (void)scrollToTop { 20 | [self.scrollView setContentOffset:CGPointZero]; 21 | } 22 | 23 | #pragma mark - Setters 24 | - (void)setCanScroll:(BOOL)canScroll { 25 | _canScroll = canScroll; 26 | self.scrollView.showsVerticalScrollIndicator = canScroll; 27 | if (!canScroll) { 28 | self.scrollView.contentOffset = CGPointZero; 29 | } 30 | } 31 | 32 | #pragma mark - UIScrollViewDelegate 33 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView { 34 | self.scrollView = scrollView; 35 | if (self.canScroll) { 36 | if (scrollView.contentOffset.y <= 0) { 37 | self.canScroll = NO; 38 | if ([self.delegate respondsToSelector:@selector(pageViewControllerLeaveTop)]) { 39 | [self.delegate pageViewControllerLeaveTop]; 40 | } 41 | } 42 | } else { 43 | self.canScroll = NO; 44 | } 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /Pods/HGPersonalCenterExtend/HGPersonalCenterExtend/HGPagesViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HGPagesViewController.h 3 | // HGPersonalCenterExtend 4 | // 5 | // Created by Arch on 2019/11/13. 6 | // Copyright © 2019 mint_bin. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "HGPageViewController.h" 11 | #import "HGPopGestureCompatibleCollectionView.h" 12 | 13 | @protocol HGPagesViewControllerDelegate 14 | - (void)pagesViewControllerLeaveTop; 15 | - (void)pagesViewControllerWillBeginDragging; 16 | - (void)pagesViewControllerDidEndDragging; 17 | - (void)pagesViewControllerScrollingToTargetPage:(NSInteger)targetPage sourcePage:(NSInteger)sourcePage percent:(CGFloat)percent; 18 | 19 | @optional 20 | - (void)pagesViewControllerWillTransitionToPage:(NSInteger)page; 21 | - (void)pagesViewControllerDidTransitionToPage:(NSInteger)page; 22 | @end 23 | 24 | @interface HGPagesViewController : UIViewController 25 | @property (nonatomic, strong, readonly) HGPopGestureCompatibleCollectionView *collectionView; 26 | @property (nonatomic, copy) NSArray *viewControllers; 27 | @property (nonatomic) NSInteger selectedPage; 28 | @property (nonatomic, strong, readonly) HGPageViewController *selectedPageViewController; 29 | @property (nonatomic, weak) id delegate; 30 | 31 | - (void)makeViewControllersScrollToTop; 32 | - (void)setSelectedPage:(NSInteger)selectedPage animated:(BOOL)animated; 33 | @end 34 | 35 | -------------------------------------------------------------------------------- /Pods/HGPersonalCenterExtend/HGPersonalCenterExtend/HGPersonalCenterExtend.h: -------------------------------------------------------------------------------- 1 | // 2 | // HGPersonalCenterExtend.h 3 | // HGPersonalCenterExtendExtend 4 | // 5 | // Created by Arch on 2019/1/20. 6 | // Copyright © 2019 mint_bin. All rights reserved. 7 | // 8 | 9 | #ifndef HGPersonalCenterExtend_h 10 | #define HGPersonalCenterExtend_h 11 | 12 | #import "HGCenterBaseTableView.h" 13 | #import "HGCategoryView.h" 14 | #import "HGPageViewController.h" 15 | #import "HGPagesViewController.h" 16 | #import "HGSegmentedPageViewController.h" 17 | 18 | #endif /* HGPersonalCenterExtend_h */ 19 | -------------------------------------------------------------------------------- /Pods/HGPersonalCenterExtend/HGPersonalCenterExtend/HGPopGestureCompatibleCollectionView.h: -------------------------------------------------------------------------------- 1 | // 2 | // HGPopGestureCompatibleCollectionView.h 3 | // HGPersonalCenterExtend 4 | // 5 | // Created by Arch on 2019/11/14. 6 | // Copyright © 2019 mint_bin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface HGPopGestureCompatibleCollectionView : UICollectionView 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /Pods/HGPersonalCenterExtend/HGPersonalCenterExtend/HGPopGestureCompatibleCollectionView.m: -------------------------------------------------------------------------------- 1 | // 2 | // HGPopGestureCompatibleCollectionView.m 3 | // HGPersonalCenterExtend 4 | // 5 | // Created by Arch on 2019/11/14. 6 | // Copyright © 2019 mint_bin. All rights reserved. 7 | // 8 | 9 | #import "HGPopGestureCompatibleCollectionView.h" 10 | 11 | @implementation HGPopGestureCompatibleCollectionView 12 | 13 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { 14 | if (self.contentOffset.x <= 0) { 15 | if ([otherGestureRecognizer.delegate isKindOfClass:NSClassFromString(@"_FDFullscreenPopGestureRecognizerDelegate")]) { 16 | return YES; 17 | } 18 | } 19 | return NO; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Pods/HGPersonalCenterExtend/HGPersonalCenterExtend/HGSegmentedPageViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HGSegmentedPageViewController.h 3 | // HGPersonalCenterExtend 4 | // 5 | // Created by Arch on 2019/1/3. 6 | // Copyright © 2019 mint_bin. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "HGCategoryView.h" 11 | #import "HGPageViewController.h" 12 | 13 | @protocol HGSegmentedPageViewControllerDelegate 14 | - (void)segmentedPageViewControllerLeaveTop; 15 | - (void)segmentedPageViewControllerWillBeginDragging; 16 | - (void)segmentedPageViewControllerDidEndDragging; 17 | 18 | @optional 19 | - (void)segmentedPageViewControllerWillTransitionToPage:(NSInteger)page; 20 | - (void)segmentedPageViewControllerDidTransitionToPage:(NSInteger)page; 21 | @end 22 | 23 | @interface HGSegmentedPageViewController : UIViewController 24 | @property (nonatomic, strong, readonly) HGCategoryView *categoryView; 25 | @property (nonatomic, copy) NSArray *pageViewControllers; 26 | @property (nonatomic) NSInteger selectedPage; 27 | @property (nonatomic, strong, readonly) HGPageViewController *selectedPageViewController; 28 | @property (nonatomic, weak) id delegate; 29 | @property (nonatomic) BOOL scrollEnabled; // 是否允许pageViewControllers被拖动. default is YES 30 | 31 | - (void)makePageViewControllersScrollToTop; 32 | - (void)makePageViewControllersScrollState:(BOOL)canScroll; 33 | @end 34 | 35 | -------------------------------------------------------------------------------- /Pods/HGPersonalCenterExtend/HGPersonalCenterExtend/HGSegmentedPageViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HGSegmentedPageViewController.m 3 | // HGPersonalCenterExtend 4 | // 5 | // Created by Arch on 2019/1/3. 6 | // Copyright © 2019 mint_bin. All rights reserved. 7 | // 8 | 9 | #import "HGSegmentedPageViewController.h" 10 | #import "HGPagesViewController.h" 11 | #import "masonry.h" 12 | 13 | #define kWidth self.view.frame.size.width 14 | 15 | @interface HGSegmentedPageViewController () 16 | @property (nonatomic, strong) HGCategoryView *categoryView; 17 | @property (nonatomic, strong) HGPagesViewController *pagesViewController; 18 | @end 19 | 20 | @implementation HGSegmentedPageViewController 21 | @synthesize selectedPage = _selectedPage; 22 | 23 | #pragma mark - Life Cycle 24 | - (void)viewDidLoad { 25 | [super viewDidLoad]; 26 | [self.view addSubview:self.categoryView]; 27 | [self addChildViewController:self.pagesViewController]; 28 | [self.view addSubview:self.pagesViewController.view]; 29 | [self.pagesViewController didMoveToParentViewController:self]; 30 | 31 | [self.categoryView mas_makeConstraints:^(MASConstraintMaker *make) { 32 | make.top.left.right.equalTo(self.view); 33 | make.height.mas_equalTo(self.categoryView.height); 34 | }]; 35 | [self.pagesViewController.view mas_makeConstraints:^(MASConstraintMaker *make) { 36 | make.top.equalTo(self.categoryView.mas_bottom); 37 | make.left.right.bottom.equalTo(self.view); 38 | }]; 39 | } 40 | 41 | #pragma mark - Public Methods 42 | - (void)makePageViewControllersScrollToTop { 43 | [self.pagesViewController makeViewControllersScrollToTop]; 44 | } 45 | 46 | - (void)makePageViewControllersScrollState:(BOOL)canScroll { 47 | [self.pageViewControllers enumerateObjectsUsingBlock:^(HGPageViewController * _Nonnull controller, NSUInteger index, BOOL * _Nonnull stop) { 48 | controller.canScroll = canScroll; 49 | }]; 50 | } 51 | 52 | #pragma mark - HGCategoryViewDelegate 53 | - (void)categoryViewDidSelectedItemAtIndex:(NSInteger)index { 54 | self.pagesViewController.selectedPage = index; 55 | } 56 | 57 | #pragma mark - HGPagesViewControllerDelegate 58 | - (void)pagesViewControllerLeaveTop { 59 | if ([self.delegate respondsToSelector:@selector(segmentedPageViewControllerLeaveTop)]) { 60 | [self.delegate segmentedPageViewControllerLeaveTop]; 61 | } 62 | } 63 | 64 | - (void)pagesViewControllerWillBeginDragging { 65 | if ([self.delegate respondsToSelector:@selector(segmentedPageViewControllerWillBeginDragging)]) { 66 | [self.delegate segmentedPageViewControllerWillBeginDragging]; 67 | } 68 | } 69 | 70 | - (void)pagesViewControllerDidEndDragging { 71 | if ([self.delegate respondsToSelector:@selector(segmentedPageViewControllerDidEndDragging)]) { 72 | [self.delegate segmentedPageViewControllerDidEndDragging]; 73 | } 74 | } 75 | 76 | - (void)pagesViewControllerScrollingToTargetPage:(NSInteger)targetPage sourcePage:(NSInteger)sourcePage percent:(CGFloat)percent { 77 | [self.categoryView scrollToTargetIndex:targetPage sourceIndex:sourcePage percent:percent]; 78 | } 79 | 80 | - (void)pagesViewControllerWillTransitionToPage:(NSInteger)page { 81 | if ([self.delegate respondsToSelector:@selector(segmentedPageViewControllerWillTransitionToPage:)]) { 82 | [self.delegate segmentedPageViewControllerWillTransitionToPage:page]; 83 | } 84 | } 85 | 86 | - (void)pagesViewControllerDidTransitionToPage:(NSInteger)page { 87 | if ([self.delegate respondsToSelector:@selector(segmentedPageViewControllerDidTransitionToPage:)]) { 88 | [self.delegate segmentedPageViewControllerDidTransitionToPage:page]; 89 | } 90 | } 91 | 92 | #pragma mark - Setters 93 | - (void)setPageViewControllers:(NSArray *)pageViewControllers { 94 | _pageViewControllers = pageViewControllers; 95 | self.pagesViewController.viewControllers = pageViewControllers; 96 | } 97 | 98 | - (void)setSelectedPage:(NSInteger)selectedPage { 99 | _selectedPage = selectedPage; 100 | self.categoryView.selectedIndex = selectedPage; 101 | self.pagesViewController.selectedPage = selectedPage; 102 | } 103 | 104 | - (void)setScrollEnabled:(BOOL)scrollEnabled { 105 | _scrollEnabled = scrollEnabled; 106 | self.pagesViewController.collectionView.scrollEnabled = scrollEnabled; 107 | } 108 | 109 | #pragma mark - Getters 110 | - (HGCategoryView *)categoryView { 111 | if (!_categoryView) { 112 | _categoryView = [[HGCategoryView alloc] init]; 113 | _categoryView.delegate = self; 114 | } 115 | return _categoryView; 116 | } 117 | 118 | - (HGPagesViewController *)pagesViewController { 119 | if (!_pagesViewController) { 120 | _pagesViewController = [[HGPagesViewController alloc] init]; 121 | _pagesViewController.delegate = self; 122 | } 123 | return _pagesViewController; 124 | } 125 | 126 | - (NSInteger)selectedPage { 127 | return self.categoryView.selectedIndex; 128 | } 129 | 130 | - (HGPageViewController *)selectedPageViewController { 131 | return self.pagesViewController.selectedPageViewController; 132 | } 133 | 134 | @end 135 | -------------------------------------------------------------------------------- /Pods/HGPersonalCenterExtend/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 mint_bin@163.com 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Pods/HGPersonalCenterExtend/README.md: -------------------------------------------------------------------------------- 1 | # HGPersonalCenterExtend 2 | 3 | ![License MIT](https://img.shields.io/dub/l/vibe-d.svg) 4 | [![Platform](https://img.shields.io/cocoapods/p/HGPersonalCenterExtend.svg?style=flat)](http://cocoapods.org/pods/HGPersonalCenterExtend) 5 | ![Pod version](http://img.shields.io/cocoapods/v/HGPersonalCenterExtend.svg?style=flat) 6 | 7 | ## Example 8 | 9 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 10 | 11 | ## Requirements 12 | 13 | - iOS 9.0+ 14 | - Objective-C 15 | - Xcode 10+ 16 | 17 | ## Installation 18 | 19 | HGPersonalCenterExtend is available through [CocoaPods](https://cocoapods.org). To install 20 | it, simply add the following line to your Podfile: 21 | 22 | ```ruby 23 | pod 'HGPersonalCenterExtend', '~> 1.3.2' 24 | ``` 25 | 26 | ## Main 27 | 1.使用`Masonry`方式布局; 28 | 2.解决外层和内层滚动视图的上下滑动冲突问题; 29 | 3.解决`segmentedPageViewController`的`scrollView`横向滚动和外层`scrollView`纵向滑动不能互斥的问题等; 30 | 4.支持全屏返回; 31 | 32 | ## Plan 33 | 1.支持刷新; 34 | 2.`HGCategoryView`支持更多样式 ; 35 | 36 | ## Show 37 | ![image](https://github.com/ArchLL/HGPersonalCenterExtend/blob/master/show.gif) 38 | 39 | ## Usage 40 | `Example: HGPersonalCenterExtend/Example` 41 | 42 | 1.新建一个主控制器(可参照`Example`中`HGPersonalCenterViewController`),并继承自`HGNestedScrollViewController`,在这里你只需要设置`pageViewControllers`和`categaryView相关的属性`,不需要关心嵌套的交互逻辑; 43 | 44 | 2.嵌套逻辑交互封装在`HGNestedScrollViewController`中,大家可根据自己实际业务需求进行自定义; 45 | 问:为什么这个控制器不直接放进`HGPersonalCenterExtend`库中呢? 46 | 答:这是为了方便大家`DIY`(改个基类/改个样式),你们可以将其文件拖到自己的项目中,稍加改动即可使用; 47 | 48 | 3.新建需要的子控制器, 需要继承自`HGPageViewController`,其他正常开发即可; 49 | 50 | 4.如果你的`pageViewController`下的`scrollView`是`UICollectionView`类型,需要额外进行如下设置: 51 | 52 | ```Objc 53 | // 因为当collectionView的内容不满一屏时,会导致竖直方向滑动失效,所以需要设置alwaysBounceVertical为YES 54 | _collectionView.alwaysBounceVertical = YES; 55 | ``` 56 | 57 | ## Recommend 58 | 59 | 如果想实现头部背景视图放大的效果,可关注我另一个库:[HGPersonalCenter](https://github.com/ArchLL/HGPersonalCenter) 60 | 61 | ## Blog 62 | [简书](https://www.jianshu.com/p/8b87837d9e3a) 63 | 64 | ## Author 65 | 66 | Arch, mint_bin@163.com 67 | 68 | ## License 69 | 70 | HGPersonalCenterExtend is available under the MIT license. See the LICENSE file for more info. 71 | -------------------------------------------------------------------------------- /Pods/Headers/Private/GKNavigationBarViewController/GKBaseTransitionAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKTransition/GKBaseTransitionAnimation.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GKNavigationBarViewController/GKCategory.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKCategory/GKCategory.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GKNavigationBarViewController/GKCommon.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKConfigure/GKCommon.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GKNavigationBarViewController/GKNavigationBar.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKConfigure/GKNavigationBar.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GKNavigationBarViewController/GKNavigationBarConfigure.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKConfigure/GKNavigationBarConfigure.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GKNavigationBarViewController/GKNavigationBarViewController.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKNavigationBarViewController.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GKNavigationBarViewController/GKPopTransitionAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKTransition/GKPopTransitionAnimation.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GKNavigationBarViewController/GKPushTransitionAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKTransition/GKPushTransitionAnimation.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GKNavigationBarViewController/UIBarButtonItem+GKCategory.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKCategory/UIBarButtonItem+GKCategory.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GKNavigationBarViewController/UINavigationController+GKCategory.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKCategory/UINavigationController+GKCategory.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GKNavigationBarViewController/UINavigationItem+GKCategory.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKCategory/UINavigationItem+GKCategory.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GKNavigationBarViewController/UIScrollView+GKCategory.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKCategory/UIScrollView+GKCategory.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GKNavigationBarViewController/UIViewController+GKCategory.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKCategory/UIViewController+GKCategory.h -------------------------------------------------------------------------------- /Pods/Headers/Private/HGCategoryView/HGCategoryView.h: -------------------------------------------------------------------------------- 1 | ../../../HGCategoryView/HGCategoryView/HGCategoryView.h -------------------------------------------------------------------------------- /Pods/Headers/Private/HGPersonalCenterExtend/HGCenterBaseTableView.h: -------------------------------------------------------------------------------- 1 | ../../../HGPersonalCenterExtend/HGPersonalCenterExtend/HGCenterBaseTableView.h -------------------------------------------------------------------------------- /Pods/Headers/Private/HGPersonalCenterExtend/HGPageViewController.h: -------------------------------------------------------------------------------- 1 | ../../../HGPersonalCenterExtend/HGPersonalCenterExtend/HGPageViewController.h -------------------------------------------------------------------------------- /Pods/Headers/Private/HGPersonalCenterExtend/HGPagesViewController.h: -------------------------------------------------------------------------------- 1 | ../../../HGPersonalCenterExtend/HGPersonalCenterExtend/HGPagesViewController.h -------------------------------------------------------------------------------- /Pods/Headers/Private/HGPersonalCenterExtend/HGPersonalCenterExtend.h: -------------------------------------------------------------------------------- 1 | ../../../HGPersonalCenterExtend/HGPersonalCenterExtend/HGPersonalCenterExtend.h -------------------------------------------------------------------------------- /Pods/Headers/Private/HGPersonalCenterExtend/HGPopGestureCompatibleCollectionView.h: -------------------------------------------------------------------------------- 1 | ../../../HGPersonalCenterExtend/HGPersonalCenterExtend/HGPopGestureCompatibleCollectionView.h -------------------------------------------------------------------------------- /Pods/Headers/Private/HGPersonalCenterExtend/HGSegmentedPageViewController.h: -------------------------------------------------------------------------------- 1 | ../../../HGPersonalCenterExtend/HGPersonalCenterExtend/HGSegmentedPageViewController.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASCompositeConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASCompositeConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASConstraint+Private.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint+Private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASConstraintMaker.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraintMaker.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASLayoutConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASUtilities.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASUtilities.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASViewAttribute.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewAttribute.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/MASViewConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/Masonry.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/Masonry.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/NSArray+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/NSArray+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/NSLayoutConstraint+MASDebugAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/View+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/View+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASShorthandAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Masonry/ViewController+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/ViewController+MASAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GKNavigationBarViewController/GKBaseTransitionAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKTransition/GKBaseTransitionAnimation.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GKNavigationBarViewController/GKCategory.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKCategory/GKCategory.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GKNavigationBarViewController/GKCommon.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKConfigure/GKCommon.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GKNavigationBarViewController/GKNavigationBar.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKConfigure/GKNavigationBar.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GKNavigationBarViewController/GKNavigationBarConfigure.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKConfigure/GKNavigationBarConfigure.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GKNavigationBarViewController/GKNavigationBarViewController.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKNavigationBarViewController.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GKNavigationBarViewController/GKPopTransitionAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKTransition/GKPopTransitionAnimation.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GKNavigationBarViewController/GKPushTransitionAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKTransition/GKPushTransitionAnimation.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GKNavigationBarViewController/UIBarButtonItem+GKCategory.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKCategory/UIBarButtonItem+GKCategory.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GKNavigationBarViewController/UINavigationController+GKCategory.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKCategory/UINavigationController+GKCategory.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GKNavigationBarViewController/UINavigationItem+GKCategory.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKCategory/UINavigationItem+GKCategory.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GKNavigationBarViewController/UIScrollView+GKCategory.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKCategory/UIScrollView+GKCategory.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GKNavigationBarViewController/UIViewController+GKCategory.h: -------------------------------------------------------------------------------- 1 | ../../../GKNavigationBarViewController/GKNavigationBarViewController/GKCategory/UIViewController+GKCategory.h -------------------------------------------------------------------------------- /Pods/Headers/Public/HGCategoryView/HGCategoryView.h: -------------------------------------------------------------------------------- 1 | ../../../HGCategoryView/HGCategoryView/HGCategoryView.h -------------------------------------------------------------------------------- /Pods/Headers/Public/HGPersonalCenterExtend/HGCenterBaseTableView.h: -------------------------------------------------------------------------------- 1 | ../../../HGPersonalCenterExtend/HGPersonalCenterExtend/HGCenterBaseTableView.h -------------------------------------------------------------------------------- /Pods/Headers/Public/HGPersonalCenterExtend/HGPageViewController.h: -------------------------------------------------------------------------------- 1 | ../../../HGPersonalCenterExtend/HGPersonalCenterExtend/HGPageViewController.h -------------------------------------------------------------------------------- /Pods/Headers/Public/HGPersonalCenterExtend/HGPagesViewController.h: -------------------------------------------------------------------------------- 1 | ../../../HGPersonalCenterExtend/HGPersonalCenterExtend/HGPagesViewController.h -------------------------------------------------------------------------------- /Pods/Headers/Public/HGPersonalCenterExtend/HGPersonalCenterExtend.h: -------------------------------------------------------------------------------- 1 | ../../../HGPersonalCenterExtend/HGPersonalCenterExtend/HGPersonalCenterExtend.h -------------------------------------------------------------------------------- /Pods/Headers/Public/HGPersonalCenterExtend/HGPopGestureCompatibleCollectionView.h: -------------------------------------------------------------------------------- 1 | ../../../HGPersonalCenterExtend/HGPersonalCenterExtend/HGPopGestureCompatibleCollectionView.h -------------------------------------------------------------------------------- /Pods/Headers/Public/HGPersonalCenterExtend/HGSegmentedPageViewController.h: -------------------------------------------------------------------------------- 1 | ../../../HGPersonalCenterExtend/HGPersonalCenterExtend/HGSegmentedPageViewController.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASCompositeConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASCompositeConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASConstraint+Private.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint+Private.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASConstraintMaker.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraintMaker.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASLayoutConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASUtilities.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASUtilities.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASViewAttribute.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewAttribute.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/MASViewConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewConstraint.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/Masonry.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/Masonry.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/NSArray+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/NSArray+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/NSLayoutConstraint+MASDebugAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/View+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/View+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASShorthandAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Masonry/ViewController+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/ViewController+MASAdditions.h -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FDFullscreenPopGesture (1.1) 3 | - GKNavigationBarViewController (3.0.0) 4 | - HGCategoryView (1.2.1): 5 | - Masonry (~> 1.1.0) 6 | - HGPersonalCenterExtend (1.3.2): 7 | - HGCategoryView (~> 1.2.1) 8 | - Masonry (~> 1.1.0) 9 | - Masonry (1.1.0) 10 | 11 | DEPENDENCIES: 12 | - FDFullscreenPopGesture (~> 1.1) 13 | - GKNavigationBarViewController (~> 3.0.0) 14 | - HGPersonalCenterExtend (~> 1.3.2) 15 | 16 | SPEC REPOS: 17 | https://github.com/CocoaPods/Specs.git: 18 | - FDFullscreenPopGesture 19 | - GKNavigationBarViewController 20 | - HGCategoryView 21 | - HGPersonalCenterExtend 22 | - Masonry 23 | 24 | SPEC CHECKSUMS: 25 | FDFullscreenPopGesture: a8a620179e3d9c40e8e00256dcee1c1a27c6d0f0 26 | GKNavigationBarViewController: 103e7cac0a4b3e7d083ebee7d10ec5e7b4ee2758 27 | HGCategoryView: d0aafdb8f6e7d5e46857061928dd1bb4cc17d9fb 28 | HGPersonalCenterExtend: 9c77a16f66947c04d46a8ab4f990f5481476d608 29 | Masonry: 678fab65091a9290e40e2832a55e7ab731aad201 30 | 31 | PODFILE CHECKSUM: 337cbb0acf41253292d14c35bdeb99050214d326 32 | 33 | COCOAPODS: 1.10.1 34 | -------------------------------------------------------------------------------- /Pods/Masonry/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASCompositeConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASCompositeConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASConstraint.h" 10 | #import "MASUtilities.h" 11 | 12 | /** 13 | * A group of MASConstraint objects 14 | */ 15 | @interface MASCompositeConstraint : MASConstraint 16 | 17 | /** 18 | * Creates a composite with a predefined array of children 19 | * 20 | * @param children child MASConstraints 21 | * 22 | * @return a composite constraint 23 | */ 24 | - (id)initWithChildren:(NSArray *)children; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASCompositeConstraint.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASCompositeConstraint.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASCompositeConstraint.h" 10 | #import "MASConstraint+Private.h" 11 | 12 | @interface MASCompositeConstraint () 13 | 14 | @property (nonatomic, strong) id mas_key; 15 | @property (nonatomic, strong) NSMutableArray *childConstraints; 16 | 17 | @end 18 | 19 | @implementation MASCompositeConstraint 20 | 21 | - (id)initWithChildren:(NSArray *)children { 22 | self = [super init]; 23 | if (!self) return nil; 24 | 25 | _childConstraints = [children mutableCopy]; 26 | for (MASConstraint *constraint in _childConstraints) { 27 | constraint.delegate = self; 28 | } 29 | 30 | return self; 31 | } 32 | 33 | #pragma mark - MASConstraintDelegate 34 | 35 | - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint { 36 | NSUInteger index = [self.childConstraints indexOfObject:constraint]; 37 | NSAssert(index != NSNotFound, @"Could not find constraint %@", constraint); 38 | [self.childConstraints replaceObjectAtIndex:index withObject:replacementConstraint]; 39 | } 40 | 41 | - (MASConstraint *)constraint:(MASConstraint __unused *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { 42 | id strongDelegate = self.delegate; 43 | MASConstraint *newConstraint = [strongDelegate constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; 44 | newConstraint.delegate = self; 45 | [self.childConstraints addObject:newConstraint]; 46 | return newConstraint; 47 | } 48 | 49 | #pragma mark - NSLayoutConstraint multiplier proxies 50 | 51 | - (MASConstraint * (^)(CGFloat))multipliedBy { 52 | return ^id(CGFloat multiplier) { 53 | for (MASConstraint *constraint in self.childConstraints) { 54 | constraint.multipliedBy(multiplier); 55 | } 56 | return self; 57 | }; 58 | } 59 | 60 | - (MASConstraint * (^)(CGFloat))dividedBy { 61 | return ^id(CGFloat divider) { 62 | for (MASConstraint *constraint in self.childConstraints) { 63 | constraint.dividedBy(divider); 64 | } 65 | return self; 66 | }; 67 | } 68 | 69 | #pragma mark - MASLayoutPriority proxy 70 | 71 | - (MASConstraint * (^)(MASLayoutPriority))priority { 72 | return ^id(MASLayoutPriority priority) { 73 | for (MASConstraint *constraint in self.childConstraints) { 74 | constraint.priority(priority); 75 | } 76 | return self; 77 | }; 78 | } 79 | 80 | #pragma mark - NSLayoutRelation proxy 81 | 82 | - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation { 83 | return ^id(id attr, NSLayoutRelation relation) { 84 | for (MASConstraint *constraint in self.childConstraints.copy) { 85 | constraint.equalToWithRelation(attr, relation); 86 | } 87 | return self; 88 | }; 89 | } 90 | 91 | #pragma mark - attribute chaining 92 | 93 | - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { 94 | [self constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; 95 | return self; 96 | } 97 | 98 | #pragma mark - Animator proxy 99 | 100 | #if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV) 101 | 102 | - (MASConstraint *)animator { 103 | for (MASConstraint *constraint in self.childConstraints) { 104 | [constraint animator]; 105 | } 106 | return self; 107 | } 108 | 109 | #endif 110 | 111 | #pragma mark - debug helpers 112 | 113 | - (MASConstraint * (^)(id))key { 114 | return ^id(id key) { 115 | self.mas_key = key; 116 | int i = 0; 117 | for (MASConstraint *constraint in self.childConstraints) { 118 | constraint.key([NSString stringWithFormat:@"%@[%d]", key, i++]); 119 | } 120 | return self; 121 | }; 122 | } 123 | 124 | #pragma mark - NSLayoutConstraint constant setters 125 | 126 | - (void)setInsets:(MASEdgeInsets)insets { 127 | for (MASConstraint *constraint in self.childConstraints) { 128 | constraint.insets = insets; 129 | } 130 | } 131 | 132 | - (void)setInset:(CGFloat)inset { 133 | for (MASConstraint *constraint in self.childConstraints) { 134 | constraint.inset = inset; 135 | } 136 | } 137 | 138 | - (void)setOffset:(CGFloat)offset { 139 | for (MASConstraint *constraint in self.childConstraints) { 140 | constraint.offset = offset; 141 | } 142 | } 143 | 144 | - (void)setSizeOffset:(CGSize)sizeOffset { 145 | for (MASConstraint *constraint in self.childConstraints) { 146 | constraint.sizeOffset = sizeOffset; 147 | } 148 | } 149 | 150 | - (void)setCenterOffset:(CGPoint)centerOffset { 151 | for (MASConstraint *constraint in self.childConstraints) { 152 | constraint.centerOffset = centerOffset; 153 | } 154 | } 155 | 156 | #pragma mark - MASConstraint 157 | 158 | - (void)activate { 159 | for (MASConstraint *constraint in self.childConstraints) { 160 | [constraint activate]; 161 | } 162 | } 163 | 164 | - (void)deactivate { 165 | for (MASConstraint *constraint in self.childConstraints) { 166 | [constraint deactivate]; 167 | } 168 | } 169 | 170 | - (void)install { 171 | for (MASConstraint *constraint in self.childConstraints) { 172 | constraint.updateExisting = self.updateExisting; 173 | [constraint install]; 174 | } 175 | } 176 | 177 | - (void)uninstall { 178 | for (MASConstraint *constraint in self.childConstraints) { 179 | [constraint uninstall]; 180 | } 181 | } 182 | 183 | @end 184 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASConstraint+Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASConstraint+Private.h 3 | // Masonry 4 | // 5 | // Created by Nick Tymchenko on 29/04/14. 6 | // Copyright (c) 2014 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASConstraint.h" 10 | 11 | @protocol MASConstraintDelegate; 12 | 13 | 14 | @interface MASConstraint () 15 | 16 | /** 17 | * Whether or not to check for an existing constraint instead of adding constraint 18 | */ 19 | @property (nonatomic, assign) BOOL updateExisting; 20 | 21 | /** 22 | * Usually MASConstraintMaker but could be a parent MASConstraint 23 | */ 24 | @property (nonatomic, weak) id delegate; 25 | 26 | /** 27 | * Based on a provided value type, is equal to calling: 28 | * NSNumber - setOffset: 29 | * NSValue with CGPoint - setPointOffset: 30 | * NSValue with CGSize - setSizeOffset: 31 | * NSValue with MASEdgeInsets - setInsets: 32 | */ 33 | - (void)setLayoutConstantWithValue:(NSValue *)value; 34 | 35 | @end 36 | 37 | 38 | @interface MASConstraint (Abstract) 39 | 40 | /** 41 | * Sets the constraint relation to given NSLayoutRelation 42 | * returns a block which accepts one of the following: 43 | * MASViewAttribute, UIView, NSValue, NSArray 44 | * see readme for more details. 45 | */ 46 | - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation; 47 | 48 | /** 49 | * Override to set a custom chaining behaviour 50 | */ 51 | - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute; 52 | 53 | @end 54 | 55 | 56 | @protocol MASConstraintDelegate 57 | 58 | /** 59 | * Notifies the delegate when the constraint needs to be replaced with another constraint. For example 60 | * A MASViewConstraint may turn into a MASCompositeConstraint when an array is passed to one of the equality blocks 61 | */ 62 | - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint; 63 | 64 | - (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute; 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASConstraintMaker.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASConstraintMaker.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASConstraint.h" 10 | #import "MASUtilities.h" 11 | 12 | typedef NS_OPTIONS(NSInteger, MASAttribute) { 13 | MASAttributeLeft = 1 << NSLayoutAttributeLeft, 14 | MASAttributeRight = 1 << NSLayoutAttributeRight, 15 | MASAttributeTop = 1 << NSLayoutAttributeTop, 16 | MASAttributeBottom = 1 << NSLayoutAttributeBottom, 17 | MASAttributeLeading = 1 << NSLayoutAttributeLeading, 18 | MASAttributeTrailing = 1 << NSLayoutAttributeTrailing, 19 | MASAttributeWidth = 1 << NSLayoutAttributeWidth, 20 | MASAttributeHeight = 1 << NSLayoutAttributeHeight, 21 | MASAttributeCenterX = 1 << NSLayoutAttributeCenterX, 22 | MASAttributeCenterY = 1 << NSLayoutAttributeCenterY, 23 | MASAttributeBaseline = 1 << NSLayoutAttributeBaseline, 24 | 25 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 26 | 27 | MASAttributeFirstBaseline = 1 << NSLayoutAttributeFirstBaseline, 28 | MASAttributeLastBaseline = 1 << NSLayoutAttributeLastBaseline, 29 | 30 | #endif 31 | 32 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) 33 | 34 | MASAttributeLeftMargin = 1 << NSLayoutAttributeLeftMargin, 35 | MASAttributeRightMargin = 1 << NSLayoutAttributeRightMargin, 36 | MASAttributeTopMargin = 1 << NSLayoutAttributeTopMargin, 37 | MASAttributeBottomMargin = 1 << NSLayoutAttributeBottomMargin, 38 | MASAttributeLeadingMargin = 1 << NSLayoutAttributeLeadingMargin, 39 | MASAttributeTrailingMargin = 1 << NSLayoutAttributeTrailingMargin, 40 | MASAttributeCenterXWithinMargins = 1 << NSLayoutAttributeCenterXWithinMargins, 41 | MASAttributeCenterYWithinMargins = 1 << NSLayoutAttributeCenterYWithinMargins, 42 | 43 | #endif 44 | 45 | }; 46 | 47 | /** 48 | * Provides factory methods for creating MASConstraints. 49 | * Constraints are collected until they are ready to be installed 50 | * 51 | */ 52 | @interface MASConstraintMaker : NSObject 53 | 54 | /** 55 | * The following properties return a new MASViewConstraint 56 | * with the first item set to the makers associated view and the appropriate MASViewAttribute 57 | */ 58 | @property (nonatomic, strong, readonly) MASConstraint *left; 59 | @property (nonatomic, strong, readonly) MASConstraint *top; 60 | @property (nonatomic, strong, readonly) MASConstraint *right; 61 | @property (nonatomic, strong, readonly) MASConstraint *bottom; 62 | @property (nonatomic, strong, readonly) MASConstraint *leading; 63 | @property (nonatomic, strong, readonly) MASConstraint *trailing; 64 | @property (nonatomic, strong, readonly) MASConstraint *width; 65 | @property (nonatomic, strong, readonly) MASConstraint *height; 66 | @property (nonatomic, strong, readonly) MASConstraint *centerX; 67 | @property (nonatomic, strong, readonly) MASConstraint *centerY; 68 | @property (nonatomic, strong, readonly) MASConstraint *baseline; 69 | 70 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 71 | 72 | @property (nonatomic, strong, readonly) MASConstraint *firstBaseline; 73 | @property (nonatomic, strong, readonly) MASConstraint *lastBaseline; 74 | 75 | #endif 76 | 77 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) 78 | 79 | @property (nonatomic, strong, readonly) MASConstraint *leftMargin; 80 | @property (nonatomic, strong, readonly) MASConstraint *rightMargin; 81 | @property (nonatomic, strong, readonly) MASConstraint *topMargin; 82 | @property (nonatomic, strong, readonly) MASConstraint *bottomMargin; 83 | @property (nonatomic, strong, readonly) MASConstraint *leadingMargin; 84 | @property (nonatomic, strong, readonly) MASConstraint *trailingMargin; 85 | @property (nonatomic, strong, readonly) MASConstraint *centerXWithinMargins; 86 | @property (nonatomic, strong, readonly) MASConstraint *centerYWithinMargins; 87 | 88 | #endif 89 | 90 | /** 91 | * Returns a block which creates a new MASCompositeConstraint with the first item set 92 | * to the makers associated view and children corresponding to the set bits in the 93 | * MASAttribute parameter. Combine multiple attributes via binary-or. 94 | */ 95 | @property (nonatomic, strong, readonly) MASConstraint *(^attributes)(MASAttribute attrs); 96 | 97 | /** 98 | * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeEdges 99 | * which generates the appropriate MASViewConstraint children (top, left, bottom, right) 100 | * with the first item set to the makers associated view 101 | */ 102 | @property (nonatomic, strong, readonly) MASConstraint *edges; 103 | 104 | /** 105 | * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeSize 106 | * which generates the appropriate MASViewConstraint children (width, height) 107 | * with the first item set to the makers associated view 108 | */ 109 | @property (nonatomic, strong, readonly) MASConstraint *size; 110 | 111 | /** 112 | * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeCenter 113 | * which generates the appropriate MASViewConstraint children (centerX, centerY) 114 | * with the first item set to the makers associated view 115 | */ 116 | @property (nonatomic, strong, readonly) MASConstraint *center; 117 | 118 | /** 119 | * Whether or not to check for an existing constraint instead of adding constraint 120 | */ 121 | @property (nonatomic, assign) BOOL updateExisting; 122 | 123 | /** 124 | * Whether or not to remove existing constraints prior to installing 125 | */ 126 | @property (nonatomic, assign) BOOL removeExisting; 127 | 128 | /** 129 | * initialises the maker with a default view 130 | * 131 | * @param view any MASConstraint are created with this view as the first item 132 | * 133 | * @return a new MASConstraintMaker 134 | */ 135 | - (id)initWithView:(MAS_VIEW *)view; 136 | 137 | /** 138 | * Calls install method on any MASConstraints which have been created by this maker 139 | * 140 | * @return an array of all the installed MASConstraints 141 | */ 142 | - (NSArray *)install; 143 | 144 | - (MASConstraint * (^)(dispatch_block_t))group; 145 | 146 | @end 147 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASLayoutConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * When you are debugging or printing the constraints attached to a view this subclass 13 | * makes it easier to identify which constraints have been created via Masonry 14 | */ 15 | @interface MASLayoutConstraint : NSLayoutConstraint 16 | 17 | /** 18 | * a key to associate with this constraint 19 | */ 20 | @property (nonatomic, strong) id mas_key; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASLayoutConstraint.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASLayoutConstraint.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASLayoutConstraint.h" 10 | 11 | @implementation MASLayoutConstraint 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASUtilities.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASUtilities.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 19/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | 13 | #if TARGET_OS_IPHONE || TARGET_OS_TV 14 | 15 | #import 16 | #define MAS_VIEW UIView 17 | #define MAS_VIEW_CONTROLLER UIViewController 18 | #define MASEdgeInsets UIEdgeInsets 19 | 20 | typedef UILayoutPriority MASLayoutPriority; 21 | static const MASLayoutPriority MASLayoutPriorityRequired = UILayoutPriorityRequired; 22 | static const MASLayoutPriority MASLayoutPriorityDefaultHigh = UILayoutPriorityDefaultHigh; 23 | static const MASLayoutPriority MASLayoutPriorityDefaultMedium = 500; 24 | static const MASLayoutPriority MASLayoutPriorityDefaultLow = UILayoutPriorityDefaultLow; 25 | static const MASLayoutPriority MASLayoutPriorityFittingSizeLevel = UILayoutPriorityFittingSizeLevel; 26 | 27 | #elif TARGET_OS_MAC 28 | 29 | #import 30 | #define MAS_VIEW NSView 31 | #define MASEdgeInsets NSEdgeInsets 32 | 33 | typedef NSLayoutPriority MASLayoutPriority; 34 | static const MASLayoutPriority MASLayoutPriorityRequired = NSLayoutPriorityRequired; 35 | static const MASLayoutPriority MASLayoutPriorityDefaultHigh = NSLayoutPriorityDefaultHigh; 36 | static const MASLayoutPriority MASLayoutPriorityDragThatCanResizeWindow = NSLayoutPriorityDragThatCanResizeWindow; 37 | static const MASLayoutPriority MASLayoutPriorityDefaultMedium = 501; 38 | static const MASLayoutPriority MASLayoutPriorityWindowSizeStayPut = NSLayoutPriorityWindowSizeStayPut; 39 | static const MASLayoutPriority MASLayoutPriorityDragThatCannotResizeWindow = NSLayoutPriorityDragThatCannotResizeWindow; 40 | static const MASLayoutPriority MASLayoutPriorityDefaultLow = NSLayoutPriorityDefaultLow; 41 | static const MASLayoutPriority MASLayoutPriorityFittingSizeCompression = NSLayoutPriorityFittingSizeCompression; 42 | 43 | #endif 44 | 45 | /** 46 | * Allows you to attach keys to objects matching the variable names passed. 47 | * 48 | * view1.mas_key = @"view1", view2.mas_key = @"view2"; 49 | * 50 | * is equivalent to: 51 | * 52 | * MASAttachKeys(view1, view2); 53 | */ 54 | #define MASAttachKeys(...) \ 55 | { \ 56 | NSDictionary *keyPairs = NSDictionaryOfVariableBindings(__VA_ARGS__); \ 57 | for (id key in keyPairs.allKeys) { \ 58 | id obj = keyPairs[key]; \ 59 | NSAssert([obj respondsToSelector:@selector(setMas_key:)], \ 60 | @"Cannot attach mas_key to %@", obj); \ 61 | [obj setMas_key:key]; \ 62 | } \ 63 | } 64 | 65 | /** 66 | * Used to create object hashes 67 | * Based on http://www.mikeash.com/pyblog/friday-qa-2010-06-18-implementing-equality-and-hashing.html 68 | */ 69 | #define MAS_NSUINT_BIT (CHAR_BIT * sizeof(NSUInteger)) 70 | #define MAS_NSUINTROTATE(val, howmuch) ((((NSUInteger)val) << howmuch) | (((NSUInteger)val) >> (MAS_NSUINT_BIT - howmuch))) 71 | 72 | /** 73 | * Given a scalar or struct value, wraps it in NSValue 74 | * Based on EXPObjectify: https://github.com/specta/expecta 75 | */ 76 | static inline id _MASBoxValue(const char *type, ...) { 77 | va_list v; 78 | va_start(v, type); 79 | id obj = nil; 80 | if (strcmp(type, @encode(id)) == 0) { 81 | id actual = va_arg(v, id); 82 | obj = actual; 83 | } else if (strcmp(type, @encode(CGPoint)) == 0) { 84 | CGPoint actual = (CGPoint)va_arg(v, CGPoint); 85 | obj = [NSValue value:&actual withObjCType:type]; 86 | } else if (strcmp(type, @encode(CGSize)) == 0) { 87 | CGSize actual = (CGSize)va_arg(v, CGSize); 88 | obj = [NSValue value:&actual withObjCType:type]; 89 | } else if (strcmp(type, @encode(MASEdgeInsets)) == 0) { 90 | MASEdgeInsets actual = (MASEdgeInsets)va_arg(v, MASEdgeInsets); 91 | obj = [NSValue value:&actual withObjCType:type]; 92 | } else if (strcmp(type, @encode(double)) == 0) { 93 | double actual = (double)va_arg(v, double); 94 | obj = [NSNumber numberWithDouble:actual]; 95 | } else if (strcmp(type, @encode(float)) == 0) { 96 | float actual = (float)va_arg(v, double); 97 | obj = [NSNumber numberWithFloat:actual]; 98 | } else if (strcmp(type, @encode(int)) == 0) { 99 | int actual = (int)va_arg(v, int); 100 | obj = [NSNumber numberWithInt:actual]; 101 | } else if (strcmp(type, @encode(long)) == 0) { 102 | long actual = (long)va_arg(v, long); 103 | obj = [NSNumber numberWithLong:actual]; 104 | } else if (strcmp(type, @encode(long long)) == 0) { 105 | long long actual = (long long)va_arg(v, long long); 106 | obj = [NSNumber numberWithLongLong:actual]; 107 | } else if (strcmp(type, @encode(short)) == 0) { 108 | short actual = (short)va_arg(v, int); 109 | obj = [NSNumber numberWithShort:actual]; 110 | } else if (strcmp(type, @encode(char)) == 0) { 111 | char actual = (char)va_arg(v, int); 112 | obj = [NSNumber numberWithChar:actual]; 113 | } else if (strcmp(type, @encode(bool)) == 0) { 114 | bool actual = (bool)va_arg(v, int); 115 | obj = [NSNumber numberWithBool:actual]; 116 | } else if (strcmp(type, @encode(unsigned char)) == 0) { 117 | unsigned char actual = (unsigned char)va_arg(v, unsigned int); 118 | obj = [NSNumber numberWithUnsignedChar:actual]; 119 | } else if (strcmp(type, @encode(unsigned int)) == 0) { 120 | unsigned int actual = (unsigned int)va_arg(v, unsigned int); 121 | obj = [NSNumber numberWithUnsignedInt:actual]; 122 | } else if (strcmp(type, @encode(unsigned long)) == 0) { 123 | unsigned long actual = (unsigned long)va_arg(v, unsigned long); 124 | obj = [NSNumber numberWithUnsignedLong:actual]; 125 | } else if (strcmp(type, @encode(unsigned long long)) == 0) { 126 | unsigned long long actual = (unsigned long long)va_arg(v, unsigned long long); 127 | obj = [NSNumber numberWithUnsignedLongLong:actual]; 128 | } else if (strcmp(type, @encode(unsigned short)) == 0) { 129 | unsigned short actual = (unsigned short)va_arg(v, unsigned int); 130 | obj = [NSNumber numberWithUnsignedShort:actual]; 131 | } 132 | va_end(v); 133 | return obj; 134 | } 135 | 136 | #define MASBoxValue(value) _MASBoxValue(@encode(__typeof__((value))), (value)) 137 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASViewAttribute.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASViewAttribute.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * An immutable tuple which stores the view and the related NSLayoutAttribute. 13 | * Describes part of either the left or right hand side of a constraint equation 14 | */ 15 | @interface MASViewAttribute : NSObject 16 | 17 | /** 18 | * The view which the reciever relates to. Can be nil if item is not a view. 19 | */ 20 | @property (nonatomic, weak, readonly) MAS_VIEW *view; 21 | 22 | /** 23 | * The item which the reciever relates to. 24 | */ 25 | @property (nonatomic, weak, readonly) id item; 26 | 27 | /** 28 | * The attribute which the reciever relates to 29 | */ 30 | @property (nonatomic, assign, readonly) NSLayoutAttribute layoutAttribute; 31 | 32 | /** 33 | * Convenience initializer. 34 | */ 35 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute; 36 | 37 | /** 38 | * The designated initializer. 39 | */ 40 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute; 41 | 42 | /** 43 | * Determine whether the layoutAttribute is a size attribute 44 | * 45 | * @return YES if layoutAttribute is equal to NSLayoutAttributeWidth or NSLayoutAttributeHeight 46 | */ 47 | - (BOOL)isSizeAttribute; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASViewAttribute.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASViewAttribute.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASViewAttribute.h" 10 | 11 | @implementation MASViewAttribute 12 | 13 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute { 14 | self = [self initWithView:view item:view layoutAttribute:layoutAttribute]; 15 | return self; 16 | } 17 | 18 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute { 19 | self = [super init]; 20 | if (!self) return nil; 21 | 22 | _view = view; 23 | _item = item; 24 | _layoutAttribute = layoutAttribute; 25 | 26 | return self; 27 | } 28 | 29 | - (BOOL)isSizeAttribute { 30 | return self.layoutAttribute == NSLayoutAttributeWidth 31 | || self.layoutAttribute == NSLayoutAttributeHeight; 32 | } 33 | 34 | - (BOOL)isEqual:(MASViewAttribute *)viewAttribute { 35 | if ([viewAttribute isKindOfClass:self.class]) { 36 | return self.view == viewAttribute.view 37 | && self.layoutAttribute == viewAttribute.layoutAttribute; 38 | } 39 | return [super isEqual:viewAttribute]; 40 | } 41 | 42 | - (NSUInteger)hash { 43 | return MAS_NSUINTROTATE([self.view hash], MAS_NSUINT_BIT / 2) ^ self.layoutAttribute; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/MASViewConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASViewConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASViewAttribute.h" 10 | #import "MASConstraint.h" 11 | #import "MASLayoutConstraint.h" 12 | #import "MASUtilities.h" 13 | 14 | /** 15 | * A single constraint. 16 | * Contains the attributes neccessary for creating a NSLayoutConstraint and adding it to the appropriate view 17 | */ 18 | @interface MASViewConstraint : MASConstraint 19 | 20 | /** 21 | * First item/view and first attribute of the NSLayoutConstraint 22 | */ 23 | @property (nonatomic, strong, readonly) MASViewAttribute *firstViewAttribute; 24 | 25 | /** 26 | * Second item/view and second attribute of the NSLayoutConstraint 27 | */ 28 | @property (nonatomic, strong, readonly) MASViewAttribute *secondViewAttribute; 29 | 30 | /** 31 | * initialises the MASViewConstraint with the first part of the equation 32 | * 33 | * @param firstViewAttribute view.mas_left, view.mas_width etc. 34 | * 35 | * @return a new view constraint 36 | */ 37 | - (id)initWithFirstViewAttribute:(MASViewAttribute *)firstViewAttribute; 38 | 39 | /** 40 | * Returns all MASViewConstraints installed with this view as a first item. 41 | * 42 | * @param view A view to retrieve constraints for. 43 | * 44 | * @return An array of MASViewConstraints. 45 | */ 46 | + (NSArray *)installedConstraintsForView:(MAS_VIEW *)view; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/Masonry.h: -------------------------------------------------------------------------------- 1 | // 2 | // Masonry.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Masonry. 12 | FOUNDATION_EXPORT double MasonryVersionNumber; 13 | 14 | //! Project version string for Masonry. 15 | FOUNDATION_EXPORT const unsigned char MasonryVersionString[]; 16 | 17 | #import "MASUtilities.h" 18 | #import "View+MASAdditions.h" 19 | #import "View+MASShorthandAdditions.h" 20 | #import "ViewController+MASAdditions.h" 21 | #import "NSArray+MASAdditions.h" 22 | #import "NSArray+MASShorthandAdditions.h" 23 | #import "MASConstraint.h" 24 | #import "MASCompositeConstraint.h" 25 | #import "MASViewAttribute.h" 26 | #import "MASViewConstraint.h" 27 | #import "MASConstraintMaker.h" 28 | #import "MASLayoutConstraint.h" 29 | #import "NSLayoutConstraint+MASDebugAdditions.h" 30 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/NSArray+MASAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MASAdditions.h 3 | // 4 | // 5 | // Created by Daniel Hammond on 11/26/13. 6 | // 7 | // 8 | 9 | #import "MASUtilities.h" 10 | #import "MASConstraintMaker.h" 11 | #import "MASViewAttribute.h" 12 | 13 | typedef NS_ENUM(NSUInteger, MASAxisType) { 14 | MASAxisTypeHorizontal, 15 | MASAxisTypeVertical 16 | }; 17 | 18 | @interface NSArray (MASAdditions) 19 | 20 | /** 21 | * Creates a MASConstraintMaker with each view in the callee. 22 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing on each view 23 | * 24 | * @param block scope within which you can build up the constraints which you wish to apply to each view. 25 | * 26 | * @return Array of created MASConstraints 27 | */ 28 | - (NSArray *)mas_makeConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; 29 | 30 | /** 31 | * Creates a MASConstraintMaker with each view in the callee. 32 | * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view. 33 | * If an existing constraint exists then it will be updated instead. 34 | * 35 | * @param block scope within which you can build up the constraints which you wish to apply to each view. 36 | * 37 | * @return Array of created/updated MASConstraints 38 | */ 39 | - (NSArray *)mas_updateConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; 40 | 41 | /** 42 | * Creates a MASConstraintMaker with each view in the callee. 43 | * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view. 44 | * All constraints previously installed for the views will be removed. 45 | * 46 | * @param block scope within which you can build up the constraints which you wish to apply to each view. 47 | * 48 | * @return Array of created/updated MASConstraints 49 | */ 50 | - (NSArray *)mas_remakeConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; 51 | 52 | /** 53 | * distribute with fixed spacing 54 | * 55 | * @param axisType which axis to distribute items along 56 | * @param fixedSpacing the spacing between each item 57 | * @param leadSpacing the spacing before the first item and the container 58 | * @param tailSpacing the spacing after the last item and the container 59 | */ 60 | - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedSpacing:(CGFloat)fixedSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing; 61 | 62 | /** 63 | * distribute with fixed item size 64 | * 65 | * @param axisType which axis to distribute items along 66 | * @param fixedItemLength the fixed length of each item 67 | * @param leadSpacing the spacing before the first item and the container 68 | * @param tailSpacing the spacing after the last item and the container 69 | */ 70 | - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedItemLength:(CGFloat)fixedItemLength leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing; 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/NSArray+MASAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MASAdditions.m 3 | // 4 | // 5 | // Created by Daniel Hammond on 11/26/13. 6 | // 7 | // 8 | 9 | #import "NSArray+MASAdditions.h" 10 | #import "View+MASAdditions.h" 11 | 12 | @implementation NSArray (MASAdditions) 13 | 14 | - (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *make))block { 15 | NSMutableArray *constraints = [NSMutableArray array]; 16 | for (MAS_VIEW *view in self) { 17 | NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views"); 18 | [constraints addObjectsFromArray:[view mas_makeConstraints:block]]; 19 | } 20 | return constraints; 21 | } 22 | 23 | - (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *make))block { 24 | NSMutableArray *constraints = [NSMutableArray array]; 25 | for (MAS_VIEW *view in self) { 26 | NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views"); 27 | [constraints addObjectsFromArray:[view mas_updateConstraints:block]]; 28 | } 29 | return constraints; 30 | } 31 | 32 | - (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block { 33 | NSMutableArray *constraints = [NSMutableArray array]; 34 | for (MAS_VIEW *view in self) { 35 | NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views"); 36 | [constraints addObjectsFromArray:[view mas_remakeConstraints:block]]; 37 | } 38 | return constraints; 39 | } 40 | 41 | - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedSpacing:(CGFloat)fixedSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing { 42 | if (self.count < 2) { 43 | NSAssert(self.count>1,@"views to distribute need to bigger than one"); 44 | return; 45 | } 46 | 47 | MAS_VIEW *tempSuperView = [self mas_commonSuperviewOfViews]; 48 | if (axisType == MASAxisTypeHorizontal) { 49 | MAS_VIEW *prev; 50 | for (int i = 0; i < self.count; i++) { 51 | MAS_VIEW *v = self[i]; 52 | [v mas_makeConstraints:^(MASConstraintMaker *make) { 53 | if (prev) { 54 | make.width.equalTo(prev); 55 | make.left.equalTo(prev.mas_right).offset(fixedSpacing); 56 | if (i == self.count - 1) {//last one 57 | make.right.equalTo(tempSuperView).offset(-tailSpacing); 58 | } 59 | } 60 | else {//first one 61 | make.left.equalTo(tempSuperView).offset(leadSpacing); 62 | } 63 | 64 | }]; 65 | prev = v; 66 | } 67 | } 68 | else { 69 | MAS_VIEW *prev; 70 | for (int i = 0; i < self.count; i++) { 71 | MAS_VIEW *v = self[i]; 72 | [v mas_makeConstraints:^(MASConstraintMaker *make) { 73 | if (prev) { 74 | make.height.equalTo(prev); 75 | make.top.equalTo(prev.mas_bottom).offset(fixedSpacing); 76 | if (i == self.count - 1) {//last one 77 | make.bottom.equalTo(tempSuperView).offset(-tailSpacing); 78 | } 79 | } 80 | else {//first one 81 | make.top.equalTo(tempSuperView).offset(leadSpacing); 82 | } 83 | 84 | }]; 85 | prev = v; 86 | } 87 | } 88 | } 89 | 90 | - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedItemLength:(CGFloat)fixedItemLength leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing { 91 | if (self.count < 2) { 92 | NSAssert(self.count>1,@"views to distribute need to bigger than one"); 93 | return; 94 | } 95 | 96 | MAS_VIEW *tempSuperView = [self mas_commonSuperviewOfViews]; 97 | if (axisType == MASAxisTypeHorizontal) { 98 | MAS_VIEW *prev; 99 | for (int i = 0; i < self.count; i++) { 100 | MAS_VIEW *v = self[i]; 101 | [v mas_makeConstraints:^(MASConstraintMaker *make) { 102 | make.width.equalTo(@(fixedItemLength)); 103 | if (prev) { 104 | if (i == self.count - 1) {//last one 105 | make.right.equalTo(tempSuperView).offset(-tailSpacing); 106 | } 107 | else { 108 | CGFloat offset = (1-(i/((CGFloat)self.count-1)))*(fixedItemLength+leadSpacing)-i*tailSpacing/(((CGFloat)self.count-1)); 109 | make.right.equalTo(tempSuperView).multipliedBy(i/((CGFloat)self.count-1)).with.offset(offset); 110 | } 111 | } 112 | else {//first one 113 | make.left.equalTo(tempSuperView).offset(leadSpacing); 114 | } 115 | }]; 116 | prev = v; 117 | } 118 | } 119 | else { 120 | MAS_VIEW *prev; 121 | for (int i = 0; i < self.count; i++) { 122 | MAS_VIEW *v = self[i]; 123 | [v mas_makeConstraints:^(MASConstraintMaker *make) { 124 | make.height.equalTo(@(fixedItemLength)); 125 | if (prev) { 126 | if (i == self.count - 1) {//last one 127 | make.bottom.equalTo(tempSuperView).offset(-tailSpacing); 128 | } 129 | else { 130 | CGFloat offset = (1-(i/((CGFloat)self.count-1)))*(fixedItemLength+leadSpacing)-i*tailSpacing/(((CGFloat)self.count-1)); 131 | make.bottom.equalTo(tempSuperView).multipliedBy(i/((CGFloat)self.count-1)).with.offset(offset); 132 | } 133 | } 134 | else {//first one 135 | make.top.equalTo(tempSuperView).offset(leadSpacing); 136 | } 137 | }]; 138 | prev = v; 139 | } 140 | } 141 | } 142 | 143 | - (MAS_VIEW *)mas_commonSuperviewOfViews 144 | { 145 | MAS_VIEW *commonSuperview = nil; 146 | MAS_VIEW *previousView = nil; 147 | for (id object in self) { 148 | if ([object isKindOfClass:[MAS_VIEW class]]) { 149 | MAS_VIEW *view = (MAS_VIEW *)object; 150 | if (previousView) { 151 | commonSuperview = [view mas_closestCommonSuperview:commonSuperview]; 152 | } else { 153 | commonSuperview = view; 154 | } 155 | previousView = view; 156 | } 157 | } 158 | 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."); 159 | return commonSuperview; 160 | } 161 | 162 | @end 163 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/NSArray+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MASShorthandAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 22/07/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "NSArray+MASAdditions.h" 10 | 11 | #ifdef MAS_SHORTHAND 12 | 13 | /** 14 | * Shorthand array additions without the 'mas_' prefixes, 15 | * only enabled if MAS_SHORTHAND is defined 16 | */ 17 | @interface NSArray (MASShorthandAdditions) 18 | 19 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; 20 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; 21 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; 22 | 23 | @end 24 | 25 | @implementation NSArray (MASShorthandAdditions) 26 | 27 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block { 28 | return [self mas_makeConstraints:block]; 29 | } 30 | 31 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block { 32 | return [self mas_updateConstraints:block]; 33 | } 34 | 35 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block { 36 | return [self mas_remakeConstraints:block]; 37 | } 38 | 39 | @end 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSLayoutConstraint+MASDebugAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * makes debug and log output of NSLayoutConstraints more readable 13 | */ 14 | @interface NSLayoutConstraint (MASDebugAdditions) 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSLayoutConstraint+MASDebugAdditions.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "NSLayoutConstraint+MASDebugAdditions.h" 10 | #import "MASConstraint.h" 11 | #import "MASLayoutConstraint.h" 12 | 13 | @implementation NSLayoutConstraint (MASDebugAdditions) 14 | 15 | #pragma mark - description maps 16 | 17 | + (NSDictionary *)layoutRelationDescriptionsByValue { 18 | static dispatch_once_t once; 19 | static NSDictionary *descriptionMap; 20 | dispatch_once(&once, ^{ 21 | descriptionMap = @{ 22 | @(NSLayoutRelationEqual) : @"==", 23 | @(NSLayoutRelationGreaterThanOrEqual) : @">=", 24 | @(NSLayoutRelationLessThanOrEqual) : @"<=", 25 | }; 26 | }); 27 | return descriptionMap; 28 | } 29 | 30 | + (NSDictionary *)layoutAttributeDescriptionsByValue { 31 | static dispatch_once_t once; 32 | static NSDictionary *descriptionMap; 33 | dispatch_once(&once, ^{ 34 | descriptionMap = @{ 35 | @(NSLayoutAttributeTop) : @"top", 36 | @(NSLayoutAttributeLeft) : @"left", 37 | @(NSLayoutAttributeBottom) : @"bottom", 38 | @(NSLayoutAttributeRight) : @"right", 39 | @(NSLayoutAttributeLeading) : @"leading", 40 | @(NSLayoutAttributeTrailing) : @"trailing", 41 | @(NSLayoutAttributeWidth) : @"width", 42 | @(NSLayoutAttributeHeight) : @"height", 43 | @(NSLayoutAttributeCenterX) : @"centerX", 44 | @(NSLayoutAttributeCenterY) : @"centerY", 45 | @(NSLayoutAttributeBaseline) : @"baseline", 46 | 47 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 48 | @(NSLayoutAttributeFirstBaseline) : @"firstBaseline", 49 | @(NSLayoutAttributeLastBaseline) : @"lastBaseline", 50 | #endif 51 | 52 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) 53 | @(NSLayoutAttributeLeftMargin) : @"leftMargin", 54 | @(NSLayoutAttributeRightMargin) : @"rightMargin", 55 | @(NSLayoutAttributeTopMargin) : @"topMargin", 56 | @(NSLayoutAttributeBottomMargin) : @"bottomMargin", 57 | @(NSLayoutAttributeLeadingMargin) : @"leadingMargin", 58 | @(NSLayoutAttributeTrailingMargin) : @"trailingMargin", 59 | @(NSLayoutAttributeCenterXWithinMargins) : @"centerXWithinMargins", 60 | @(NSLayoutAttributeCenterYWithinMargins) : @"centerYWithinMargins", 61 | #endif 62 | 63 | }; 64 | 65 | }); 66 | return descriptionMap; 67 | } 68 | 69 | 70 | + (NSDictionary *)layoutPriorityDescriptionsByValue { 71 | static dispatch_once_t once; 72 | static NSDictionary *descriptionMap; 73 | dispatch_once(&once, ^{ 74 | #if TARGET_OS_IPHONE || TARGET_OS_TV 75 | descriptionMap = @{ 76 | @(MASLayoutPriorityDefaultHigh) : @"high", 77 | @(MASLayoutPriorityDefaultLow) : @"low", 78 | @(MASLayoutPriorityDefaultMedium) : @"medium", 79 | @(MASLayoutPriorityRequired) : @"required", 80 | @(MASLayoutPriorityFittingSizeLevel) : @"fitting size", 81 | }; 82 | #elif TARGET_OS_MAC 83 | descriptionMap = @{ 84 | @(MASLayoutPriorityDefaultHigh) : @"high", 85 | @(MASLayoutPriorityDragThatCanResizeWindow) : @"drag can resize window", 86 | @(MASLayoutPriorityDefaultMedium) : @"medium", 87 | @(MASLayoutPriorityWindowSizeStayPut) : @"window size stay put", 88 | @(MASLayoutPriorityDragThatCannotResizeWindow) : @"drag cannot resize window", 89 | @(MASLayoutPriorityDefaultLow) : @"low", 90 | @(MASLayoutPriorityFittingSizeCompression) : @"fitting size", 91 | @(MASLayoutPriorityRequired) : @"required", 92 | }; 93 | #endif 94 | }); 95 | return descriptionMap; 96 | } 97 | 98 | #pragma mark - description override 99 | 100 | + (NSString *)descriptionForObject:(id)obj { 101 | if ([obj respondsToSelector:@selector(mas_key)] && [obj mas_key]) { 102 | return [NSString stringWithFormat:@"%@:%@", [obj class], [obj mas_key]]; 103 | } 104 | return [NSString stringWithFormat:@"%@:%p", [obj class], obj]; 105 | } 106 | 107 | - (NSString *)description { 108 | NSMutableString *description = [[NSMutableString alloc] initWithString:@"<"]; 109 | 110 | [description appendString:[self.class descriptionForObject:self]]; 111 | 112 | [description appendFormat:@" %@", [self.class descriptionForObject:self.firstItem]]; 113 | if (self.firstAttribute != NSLayoutAttributeNotAnAttribute) { 114 | [description appendFormat:@".%@", self.class.layoutAttributeDescriptionsByValue[@(self.firstAttribute)]]; 115 | } 116 | 117 | [description appendFormat:@" %@", self.class.layoutRelationDescriptionsByValue[@(self.relation)]]; 118 | 119 | if (self.secondItem) { 120 | [description appendFormat:@" %@", [self.class descriptionForObject:self.secondItem]]; 121 | } 122 | if (self.secondAttribute != NSLayoutAttributeNotAnAttribute) { 123 | [description appendFormat:@".%@", self.class.layoutAttributeDescriptionsByValue[@(self.secondAttribute)]]; 124 | } 125 | 126 | if (self.multiplier != 1) { 127 | [description appendFormat:@" * %g", self.multiplier]; 128 | } 129 | 130 | if (self.secondAttribute == NSLayoutAttributeNotAnAttribute) { 131 | [description appendFormat:@" %g", self.constant]; 132 | } else { 133 | if (self.constant) { 134 | [description appendFormat:@" %@ %g", (self.constant < 0 ? @"-" : @"+"), ABS(self.constant)]; 135 | } 136 | } 137 | 138 | if (self.priority != MASLayoutPriorityRequired) { 139 | [description appendFormat:@" ^%@", self.class.layoutPriorityDescriptionsByValue[@(self.priority)] ?: [NSNumber numberWithDouble:self.priority]]; 140 | } 141 | 142 | [description appendString:@">"]; 143 | return description; 144 | } 145 | 146 | @end 147 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/View+MASAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+MASAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | #import "MASConstraintMaker.h" 11 | #import "MASViewAttribute.h" 12 | 13 | /** 14 | * Provides constraint maker block 15 | * and convience methods for creating MASViewAttribute which are view + NSLayoutAttribute pairs 16 | */ 17 | @interface MAS_VIEW (MASAdditions) 18 | 19 | /** 20 | * following properties return a new MASViewAttribute with current view and appropriate NSLayoutAttribute 21 | */ 22 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_left; 23 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_top; 24 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_right; 25 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottom; 26 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_leading; 27 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_trailing; 28 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_width; 29 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_height; 30 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerX; 31 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerY; 32 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_baseline; 33 | @property (nonatomic, strong, readonly) MASViewAttribute *(^mas_attribute)(NSLayoutAttribute attr); 34 | 35 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 36 | 37 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_firstBaseline; 38 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_lastBaseline; 39 | 40 | #endif 41 | 42 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) 43 | 44 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_leftMargin; 45 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_rightMargin; 46 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topMargin; 47 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomMargin; 48 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_leadingMargin; 49 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_trailingMargin; 50 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerXWithinMargins; 51 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerYWithinMargins; 52 | 53 | #endif 54 | 55 | #if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) 56 | 57 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuide API_AVAILABLE(ios(11.0),tvos(11.0)); 58 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideTop API_AVAILABLE(ios(11.0),tvos(11.0)); 59 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideBottom API_AVAILABLE(ios(11.0),tvos(11.0)); 60 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideLeft API_AVAILABLE(ios(11.0),tvos(11.0)); 61 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideRight API_AVAILABLE(ios(11.0),tvos(11.0)); 62 | 63 | #endif 64 | 65 | /** 66 | * a key to associate with this view 67 | */ 68 | @property (nonatomic, strong) id mas_key; 69 | 70 | /** 71 | * Finds the closest common superview between this view and another view 72 | * 73 | * @param view other view 74 | * 75 | * @return returns nil if common superview could not be found 76 | */ 77 | - (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view; 78 | 79 | /** 80 | * Creates a MASConstraintMaker with the callee view. 81 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing 82 | * 83 | * @param block scope within which you can build up the constraints which you wish to apply to the view. 84 | * 85 | * @return Array of created MASConstraints 86 | */ 87 | - (NSArray *)mas_makeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block; 88 | 89 | /** 90 | * Creates a MASConstraintMaker with the callee view. 91 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing. 92 | * If an existing constraint exists then it will be updated instead. 93 | * 94 | * @param block scope within which you can build up the constraints which you wish to apply to the view. 95 | * 96 | * @return Array of created/updated MASConstraints 97 | */ 98 | - (NSArray *)mas_updateConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block; 99 | 100 | /** 101 | * Creates a MASConstraintMaker with the callee view. 102 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing. 103 | * All constraints previously installed for the view will be removed. 104 | * 105 | * @param block scope within which you can build up the constraints which you wish to apply to the view. 106 | * 107 | * @return Array of created/updated MASConstraints 108 | */ 109 | - (NSArray *)mas_remakeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block; 110 | 111 | @end 112 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/View+MASAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+MASAdditions.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "View+MASAdditions.h" 10 | #import 11 | 12 | @implementation MAS_VIEW (MASAdditions) 13 | 14 | - (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *))block { 15 | self.translatesAutoresizingMaskIntoConstraints = NO; 16 | MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self]; 17 | block(constraintMaker); 18 | return [constraintMaker install]; 19 | } 20 | 21 | - (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *))block { 22 | self.translatesAutoresizingMaskIntoConstraints = NO; 23 | MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self]; 24 | constraintMaker.updateExisting = YES; 25 | block(constraintMaker); 26 | return [constraintMaker install]; 27 | } 28 | 29 | - (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block { 30 | self.translatesAutoresizingMaskIntoConstraints = NO; 31 | MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self]; 32 | constraintMaker.removeExisting = YES; 33 | block(constraintMaker); 34 | return [constraintMaker install]; 35 | } 36 | 37 | #pragma mark - NSLayoutAttribute properties 38 | 39 | - (MASViewAttribute *)mas_left { 40 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeft]; 41 | } 42 | 43 | - (MASViewAttribute *)mas_top { 44 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTop]; 45 | } 46 | 47 | - (MASViewAttribute *)mas_right { 48 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeRight]; 49 | } 50 | 51 | - (MASViewAttribute *)mas_bottom { 52 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBottom]; 53 | } 54 | 55 | - (MASViewAttribute *)mas_leading { 56 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeading]; 57 | } 58 | 59 | - (MASViewAttribute *)mas_trailing { 60 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTrailing]; 61 | } 62 | 63 | - (MASViewAttribute *)mas_width { 64 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeWidth]; 65 | } 66 | 67 | - (MASViewAttribute *)mas_height { 68 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeHeight]; 69 | } 70 | 71 | - (MASViewAttribute *)mas_centerX { 72 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterX]; 73 | } 74 | 75 | - (MASViewAttribute *)mas_centerY { 76 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterY]; 77 | } 78 | 79 | - (MASViewAttribute *)mas_baseline { 80 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBaseline]; 81 | } 82 | 83 | - (MASViewAttribute *(^)(NSLayoutAttribute))mas_attribute 84 | { 85 | return ^(NSLayoutAttribute attr) { 86 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:attr]; 87 | }; 88 | } 89 | 90 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 91 | 92 | - (MASViewAttribute *)mas_firstBaseline { 93 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeFirstBaseline]; 94 | } 95 | - (MASViewAttribute *)mas_lastBaseline { 96 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLastBaseline]; 97 | } 98 | 99 | #endif 100 | 101 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) 102 | 103 | - (MASViewAttribute *)mas_leftMargin { 104 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeftMargin]; 105 | } 106 | 107 | - (MASViewAttribute *)mas_rightMargin { 108 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeRightMargin]; 109 | } 110 | 111 | - (MASViewAttribute *)mas_topMargin { 112 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTopMargin]; 113 | } 114 | 115 | - (MASViewAttribute *)mas_bottomMargin { 116 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBottomMargin]; 117 | } 118 | 119 | - (MASViewAttribute *)mas_leadingMargin { 120 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeadingMargin]; 121 | } 122 | 123 | - (MASViewAttribute *)mas_trailingMargin { 124 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTrailingMargin]; 125 | } 126 | 127 | - (MASViewAttribute *)mas_centerXWithinMargins { 128 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterXWithinMargins]; 129 | } 130 | 131 | - (MASViewAttribute *)mas_centerYWithinMargins { 132 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterYWithinMargins]; 133 | } 134 | 135 | #endif 136 | 137 | #if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) 138 | 139 | - (MASViewAttribute *)mas_safeAreaLayoutGuide { 140 | return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; 141 | } 142 | - (MASViewAttribute *)mas_safeAreaLayoutGuideTop { 143 | return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeTop]; 144 | } 145 | - (MASViewAttribute *)mas_safeAreaLayoutGuideBottom { 146 | return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; 147 | } 148 | - (MASViewAttribute *)mas_safeAreaLayoutGuideLeft { 149 | return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeLeft]; 150 | } 151 | - (MASViewAttribute *)mas_safeAreaLayoutGuideRight { 152 | return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeRight]; 153 | } 154 | 155 | #endif 156 | 157 | #pragma mark - associated properties 158 | 159 | - (id)mas_key { 160 | return objc_getAssociatedObject(self, @selector(mas_key)); 161 | } 162 | 163 | - (void)setMas_key:(id)key { 164 | objc_setAssociatedObject(self, @selector(mas_key), key, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 165 | } 166 | 167 | #pragma mark - heirachy 168 | 169 | - (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view { 170 | MAS_VIEW *closestCommonSuperview = nil; 171 | 172 | MAS_VIEW *secondViewSuperview = view; 173 | while (!closestCommonSuperview && secondViewSuperview) { 174 | MAS_VIEW *firstViewSuperview = self; 175 | while (!closestCommonSuperview && firstViewSuperview) { 176 | if (secondViewSuperview == firstViewSuperview) { 177 | closestCommonSuperview = secondViewSuperview; 178 | } 179 | firstViewSuperview = firstViewSuperview.superview; 180 | } 181 | secondViewSuperview = secondViewSuperview.superview; 182 | } 183 | return closestCommonSuperview; 184 | } 185 | 186 | @end 187 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/View+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+MASShorthandAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 22/07/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "View+MASAdditions.h" 10 | 11 | #ifdef MAS_SHORTHAND 12 | 13 | /** 14 | * Shorthand view additions without the 'mas_' prefixes, 15 | * only enabled if MAS_SHORTHAND is defined 16 | */ 17 | @interface MAS_VIEW (MASShorthandAdditions) 18 | 19 | @property (nonatomic, strong, readonly) MASViewAttribute *left; 20 | @property (nonatomic, strong, readonly) MASViewAttribute *top; 21 | @property (nonatomic, strong, readonly) MASViewAttribute *right; 22 | @property (nonatomic, strong, readonly) MASViewAttribute *bottom; 23 | @property (nonatomic, strong, readonly) MASViewAttribute *leading; 24 | @property (nonatomic, strong, readonly) MASViewAttribute *trailing; 25 | @property (nonatomic, strong, readonly) MASViewAttribute *width; 26 | @property (nonatomic, strong, readonly) MASViewAttribute *height; 27 | @property (nonatomic, strong, readonly) MASViewAttribute *centerX; 28 | @property (nonatomic, strong, readonly) MASViewAttribute *centerY; 29 | @property (nonatomic, strong, readonly) MASViewAttribute *baseline; 30 | @property (nonatomic, strong, readonly) MASViewAttribute *(^attribute)(NSLayoutAttribute attr); 31 | 32 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 33 | 34 | @property (nonatomic, strong, readonly) MASViewAttribute *firstBaseline; 35 | @property (nonatomic, strong, readonly) MASViewAttribute *lastBaseline; 36 | 37 | #endif 38 | 39 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) 40 | 41 | @property (nonatomic, strong, readonly) MASViewAttribute *leftMargin; 42 | @property (nonatomic, strong, readonly) MASViewAttribute *rightMargin; 43 | @property (nonatomic, strong, readonly) MASViewAttribute *topMargin; 44 | @property (nonatomic, strong, readonly) MASViewAttribute *bottomMargin; 45 | @property (nonatomic, strong, readonly) MASViewAttribute *leadingMargin; 46 | @property (nonatomic, strong, readonly) MASViewAttribute *trailingMargin; 47 | @property (nonatomic, strong, readonly) MASViewAttribute *centerXWithinMargins; 48 | @property (nonatomic, strong, readonly) MASViewAttribute *centerYWithinMargins; 49 | 50 | #endif 51 | 52 | #if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) 53 | 54 | @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideTop API_AVAILABLE(ios(11.0),tvos(11.0)); 55 | @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideBottom API_AVAILABLE(ios(11.0),tvos(11.0)); 56 | @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideLeft API_AVAILABLE(ios(11.0),tvos(11.0)); 57 | @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideRight API_AVAILABLE(ios(11.0),tvos(11.0)); 58 | 59 | #endif 60 | 61 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; 62 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; 63 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; 64 | 65 | @end 66 | 67 | #define MAS_ATTR_FORWARD(attr) \ 68 | - (MASViewAttribute *)attr { \ 69 | return [self mas_##attr]; \ 70 | } 71 | 72 | @implementation MAS_VIEW (MASShorthandAdditions) 73 | 74 | MAS_ATTR_FORWARD(top); 75 | MAS_ATTR_FORWARD(left); 76 | MAS_ATTR_FORWARD(bottom); 77 | MAS_ATTR_FORWARD(right); 78 | MAS_ATTR_FORWARD(leading); 79 | MAS_ATTR_FORWARD(trailing); 80 | MAS_ATTR_FORWARD(width); 81 | MAS_ATTR_FORWARD(height); 82 | MAS_ATTR_FORWARD(centerX); 83 | MAS_ATTR_FORWARD(centerY); 84 | MAS_ATTR_FORWARD(baseline); 85 | 86 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 87 | 88 | MAS_ATTR_FORWARD(firstBaseline); 89 | MAS_ATTR_FORWARD(lastBaseline); 90 | 91 | #endif 92 | 93 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) 94 | 95 | MAS_ATTR_FORWARD(leftMargin); 96 | MAS_ATTR_FORWARD(rightMargin); 97 | MAS_ATTR_FORWARD(topMargin); 98 | MAS_ATTR_FORWARD(bottomMargin); 99 | MAS_ATTR_FORWARD(leadingMargin); 100 | MAS_ATTR_FORWARD(trailingMargin); 101 | MAS_ATTR_FORWARD(centerXWithinMargins); 102 | MAS_ATTR_FORWARD(centerYWithinMargins); 103 | 104 | #endif 105 | 106 | #if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) 107 | 108 | MAS_ATTR_FORWARD(safeAreaLayoutGuideTop); 109 | MAS_ATTR_FORWARD(safeAreaLayoutGuideBottom); 110 | MAS_ATTR_FORWARD(safeAreaLayoutGuideLeft); 111 | MAS_ATTR_FORWARD(safeAreaLayoutGuideRight); 112 | 113 | #endif 114 | 115 | - (MASViewAttribute *(^)(NSLayoutAttribute))attribute { 116 | return [self mas_attribute]; 117 | } 118 | 119 | - (NSArray *)makeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block { 120 | return [self mas_makeConstraints:block]; 121 | } 122 | 123 | - (NSArray *)updateConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block { 124 | return [self mas_updateConstraints:block]; 125 | } 126 | 127 | - (NSArray *)remakeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block { 128 | return [self mas_remakeConstraints:block]; 129 | } 130 | 131 | @end 132 | 133 | #endif 134 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/ViewController+MASAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+MASAdditions.h 3 | // Masonry 4 | // 5 | // Created by Craig Siemens on 2015-06-23. 6 | // 7 | // 8 | 9 | #import "MASUtilities.h" 10 | #import "MASConstraintMaker.h" 11 | #import "MASViewAttribute.h" 12 | 13 | #ifdef MAS_VIEW_CONTROLLER 14 | 15 | @interface MAS_VIEW_CONTROLLER (MASAdditions) 16 | 17 | /** 18 | * following properties return a new MASViewAttribute with appropriate UILayoutGuide and NSLayoutAttribute 19 | */ 20 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuide; 21 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuide; 22 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideTop; 23 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideBottom; 24 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideTop; 25 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideBottom; 26 | 27 | 28 | @end 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /Pods/Masonry/Masonry/ViewController+MASAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+MASAdditions.m 3 | // Masonry 4 | // 5 | // Created by Craig Siemens on 2015-06-23. 6 | // 7 | // 8 | 9 | #import "ViewController+MASAdditions.h" 10 | 11 | #ifdef MAS_VIEW_CONTROLLER 12 | 13 | @implementation MAS_VIEW_CONTROLLER (MASAdditions) 14 | 15 | - (MASViewAttribute *)mas_topLayoutGuide { 16 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; 17 | } 18 | - (MASViewAttribute *)mas_topLayoutGuideTop { 19 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeTop]; 20 | } 21 | - (MASViewAttribute *)mas_topLayoutGuideBottom { 22 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; 23 | } 24 | 25 | - (MASViewAttribute *)mas_bottomLayoutGuide { 26 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop]; 27 | } 28 | - (MASViewAttribute *)mas_bottomLayoutGuideTop { 29 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop]; 30 | } 31 | - (MASViewAttribute *)mas_bottomLayoutGuideBottom { 32 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; 33 | } 34 | 35 | 36 | 37 | @end 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /Pods/Target Support Files/GKNavigationBarViewController/GKNavigationBarViewController-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_GKNavigationBarViewController : NSObject 3 | @end 4 | @implementation PodsDummy_GKNavigationBarViewController 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/GKNavigationBarViewController/GKNavigationBarViewController-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/GKNavigationBarViewController/GKNavigationBarViewController.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/GKNavigationBarViewController 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/GKNavigationBarViewController" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/GKNavigationBarViewController" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/GKNavigationBarViewController 9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/GKNavigationBarViewController/GKNavigationBarViewController.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/GKNavigationBarViewController 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/GKNavigationBarViewController" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/GKNavigationBarViewController" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/GKNavigationBarViewController 9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/HGCategoryView/HGCategoryView-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_HGCategoryView : NSObject 3 | @end 4 | @implementation PodsDummy_HGCategoryView 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/HGCategoryView/HGCategoryView-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/HGCategoryView/HGCategoryView.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/HGCategoryView 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/HGCategoryView" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/HGCategoryView" "${PODS_ROOT}/Headers/Public/Masonry" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/HGCategoryView 9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/HGCategoryView/HGCategoryView.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/HGCategoryView 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/HGCategoryView" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/HGCategoryView" "${PODS_ROOT}/Headers/Public/Masonry" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/HGCategoryView 9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/HGPersonalCenterExtend/HGPersonalCenterExtend-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_HGPersonalCenterExtend : NSObject 3 | @end 4 | @implementation PodsDummy_HGPersonalCenterExtend 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/HGPersonalCenterExtend/HGPersonalCenterExtend-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/HGPersonalCenterExtend/HGPersonalCenterExtend.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/HGPersonalCenterExtend 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/HGPersonalCenterExtend" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/HGCategoryView" "${PODS_ROOT}/Headers/Public/HGPersonalCenterExtend" "${PODS_ROOT}/Headers/Public/Masonry" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/HGPersonalCenterExtend 9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/HGPersonalCenterExtend/HGPersonalCenterExtend.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/HGPersonalCenterExtend 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/HGPersonalCenterExtend" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/HGCategoryView" "${PODS_ROOT}/Headers/Public/HGPersonalCenterExtend" "${PODS_ROOT}/Headers/Public/Masonry" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/HGPersonalCenterExtend 9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Masonry/Masonry-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Masonry : NSObject 3 | @end 4 | @implementation PodsDummy_Masonry 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Masonry/Masonry-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Masonry/Masonry.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Masonry 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Masonry" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Masonry" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Masonry 9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Masonry/Masonry.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Masonry 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Masonry" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Masonry" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Masonry 9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-HGPersonalCenter/Pods-HGPersonalCenter-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## FDFullscreenPopGesture 5 | 6 | The MIT License (MIT) 7 | 8 | Copyright (c) 2015 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | 29 | 30 | ## GKNavigationBarViewController 31 | 32 | MIT License 33 | 34 | Copyright (c) 2017 高坤 35 | 36 | Permission is hereby granted, free of charge, to any person obtaining a copy 37 | of this software and associated documentation files (the "Software"), to deal 38 | in the Software without restriction, including without limitation the rights 39 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 40 | copies of the Software, and to permit persons to whom the Software is 41 | furnished to do so, subject to the following conditions: 42 | 43 | The above copyright notice and this permission notice shall be included in all 44 | copies or substantial portions of the Software. 45 | 46 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 47 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 48 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 49 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 50 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 51 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 52 | SOFTWARE. 53 | 54 | 55 | ## HGCategoryView 56 | 57 | MIT License 58 | 59 | Copyright (c) 2019 Arch 60 | 61 | Permission is hereby granted, free of charge, to any person obtaining a copy 62 | of this software and associated documentation files (the "Software"), to deal 63 | in the Software without restriction, including without limitation the rights 64 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 65 | copies of the Software, and to permit persons to whom the Software is 66 | furnished to do so, subject to the following conditions: 67 | 68 | The above copyright notice and this permission notice shall be included in all 69 | copies or substantial portions of the Software. 70 | 71 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 72 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 73 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 74 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 75 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 76 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 77 | SOFTWARE. 78 | 79 | 80 | ## HGPersonalCenterExtend 81 | 82 | Copyright (c) 2019 mint_bin@163.com 83 | 84 | Permission is hereby granted, free of charge, to any person obtaining a copy 85 | of this software and associated documentation files (the "Software"), to deal 86 | in the Software without restriction, including without limitation the rights 87 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 88 | copies of the Software, and to permit persons to whom the Software is 89 | furnished to do so, subject to the following conditions: 90 | 91 | The above copyright notice and this permission notice shall be included in 92 | all copies or substantial portions of the Software. 93 | 94 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 95 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 96 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 97 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 98 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 99 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 100 | THE SOFTWARE. 101 | 102 | 103 | ## Masonry 104 | 105 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry 106 | 107 | Permission is hereby granted, free of charge, to any person obtaining a copy 108 | of this software and associated documentation files (the "Software"), to deal 109 | in the Software without restriction, including without limitation the rights 110 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 111 | copies of the Software, and to permit persons to whom the Software is 112 | furnished to do so, subject to the following conditions: 113 | 114 | The above copyright notice and this permission notice shall be included in 115 | all copies or substantial portions of the Software. 116 | 117 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 118 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 119 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 120 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 121 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 122 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 123 | THE SOFTWARE. 124 | Generated by CocoaPods - https://cocoapods.org 125 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-HGPersonalCenter/Pods-HGPersonalCenter-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | The MIT License (MIT) 18 | 19 | Copyright (c) 2015 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | 39 | 40 | License 41 | MIT 42 | Title 43 | FDFullscreenPopGesture 44 | Type 45 | PSGroupSpecifier 46 | 47 | 48 | FooterText 49 | MIT License 50 | 51 | Copyright (c) 2017 高坤 52 | 53 | Permission is hereby granted, free of charge, to any person obtaining a copy 54 | of this software and associated documentation files (the "Software"), to deal 55 | in the Software without restriction, including without limitation the rights 56 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 57 | copies of the Software, and to permit persons to whom the Software is 58 | furnished to do so, subject to the following conditions: 59 | 60 | The above copyright notice and this permission notice shall be included in all 61 | copies or substantial portions of the Software. 62 | 63 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 64 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 65 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 66 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 67 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 68 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 69 | SOFTWARE. 70 | 71 | License 72 | MIT 73 | Title 74 | GKNavigationBarViewController 75 | Type 76 | PSGroupSpecifier 77 | 78 | 79 | FooterText 80 | MIT License 81 | 82 | Copyright (c) 2019 Arch 83 | 84 | Permission is hereby granted, free of charge, to any person obtaining a copy 85 | of this software and associated documentation files (the "Software"), to deal 86 | in the Software without restriction, including without limitation the rights 87 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 88 | copies of the Software, and to permit persons to whom the Software is 89 | furnished to do so, subject to the following conditions: 90 | 91 | The above copyright notice and this permission notice shall be included in all 92 | copies or substantial portions of the Software. 93 | 94 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 95 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 96 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 97 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 98 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 99 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 100 | SOFTWARE. 101 | 102 | License 103 | MIT 104 | Title 105 | HGCategoryView 106 | Type 107 | PSGroupSpecifier 108 | 109 | 110 | FooterText 111 | Copyright (c) 2019 mint_bin@163.com <gaoshuaibin@jianshu.com> 112 | 113 | Permission is hereby granted, free of charge, to any person obtaining a copy 114 | of this software and associated documentation files (the "Software"), to deal 115 | in the Software without restriction, including without limitation the rights 116 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 117 | copies of the Software, and to permit persons to whom the Software is 118 | furnished to do so, subject to the following conditions: 119 | 120 | The above copyright notice and this permission notice shall be included in 121 | all copies or substantial portions of the Software. 122 | 123 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 124 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 125 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 126 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 127 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 128 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 129 | THE SOFTWARE. 130 | 131 | License 132 | MIT 133 | Title 134 | HGPersonalCenterExtend 135 | Type 136 | PSGroupSpecifier 137 | 138 | 139 | FooterText 140 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry 141 | 142 | Permission is hereby granted, free of charge, to any person obtaining a copy 143 | of this software and associated documentation files (the "Software"), to deal 144 | in the Software without restriction, including without limitation the rights 145 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 146 | copies of the Software, and to permit persons to whom the Software is 147 | furnished to do so, subject to the following conditions: 148 | 149 | The above copyright notice and this permission notice shall be included in 150 | all copies or substantial portions of the Software. 151 | 152 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 153 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 154 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 155 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 156 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 157 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 158 | THE SOFTWARE. 159 | License 160 | MIT 161 | Title 162 | Masonry 163 | Type 164 | PSGroupSpecifier 165 | 166 | 167 | FooterText 168 | Generated by CocoaPods - https://cocoapods.org 169 | Title 170 | 171 | Type 172 | PSGroupSpecifier 173 | 174 | 175 | StringsTable 176 | Acknowledgements 177 | Title 178 | Acknowledgements 179 | 180 | 181 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-HGPersonalCenter/Pods-HGPersonalCenter-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_HGPersonalCenter : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_HGPersonalCenter 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-HGPersonalCenter/Pods-HGPersonalCenter-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | function on_error { 7 | echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" 8 | } 9 | trap 'on_error $LINENO' ERR 10 | 11 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then 12 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy 13 | # resources to, so exit 0 (signalling the script phase was successful). 14 | exit 0 15 | fi 16 | 17 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 18 | 19 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 20 | > "$RESOURCES_TO_COPY" 21 | 22 | XCASSET_FILES=() 23 | 24 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 25 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 26 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 27 | 28 | case "${TARGETED_DEVICE_FAMILY:-}" in 29 | 1,2) 30 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 31 | ;; 32 | 1) 33 | TARGET_DEVICE_ARGS="--target-device iphone" 34 | ;; 35 | 2) 36 | TARGET_DEVICE_ARGS="--target-device ipad" 37 | ;; 38 | 3) 39 | TARGET_DEVICE_ARGS="--target-device tv" 40 | ;; 41 | 4) 42 | TARGET_DEVICE_ARGS="--target-device watch" 43 | ;; 44 | *) 45 | TARGET_DEVICE_ARGS="--target-device mac" 46 | ;; 47 | esac 48 | 49 | install_resource() 50 | { 51 | if [[ "$1" = /* ]] ; then 52 | RESOURCE_PATH="$1" 53 | else 54 | RESOURCE_PATH="${PODS_ROOT}/$1" 55 | fi 56 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 57 | cat << EOM 58 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 59 | EOM 60 | exit 1 61 | fi 62 | case $RESOURCE_PATH in 63 | *.storyboard) 64 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 65 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 66 | ;; 67 | *.xib) 68 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 69 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 70 | ;; 71 | *.framework) 72 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 73 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 74 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 75 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 76 | ;; 77 | *.xcdatamodel) 78 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 79 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 80 | ;; 81 | *.xcdatamodeld) 82 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 83 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 84 | ;; 85 | *.xcmappingmodel) 86 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 87 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 88 | ;; 89 | *.xcassets) 90 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 91 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 92 | ;; 93 | *) 94 | echo "$RESOURCE_PATH" || true 95 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 96 | ;; 97 | esac 98 | } 99 | if [[ "$CONFIGURATION" == "Debug" ]]; then 100 | install_resource "${PODS_ROOT}/GKNavigationBarViewController/GKNavigationBarViewController/GKNavigationBarViewController.bundle" 101 | fi 102 | if [[ "$CONFIGURATION" == "Release" ]]; then 103 | install_resource "${PODS_ROOT}/GKNavigationBarViewController/GKNavigationBarViewController/GKNavigationBarViewController.bundle" 104 | fi 105 | 106 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 107 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 108 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 109 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 110 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 111 | fi 112 | rm -f "$RESOURCES_TO_COPY" 113 | 114 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] 115 | then 116 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 117 | OTHER_XCASSETS=$(find -L "$PWD" -iname "*.xcassets" -type d) 118 | while read line; do 119 | if [[ $line != "${PODS_ROOT}*" ]]; then 120 | XCASSET_FILES+=("$line") 121 | fi 122 | done <<<"$OTHER_XCASSETS" 123 | 124 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then 125 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 126 | else 127 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" 128 | fi 129 | fi 130 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-HGPersonalCenter/Pods-HGPersonalCenter.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/FDFullscreenPopGesture" "${PODS_ROOT}/Headers/Public/GKNavigationBarViewController" "${PODS_ROOT}/Headers/Public/HGCategoryView" "${PODS_ROOT}/Headers/Public/HGPersonalCenterExtend" "${PODS_ROOT}/Headers/Public/Masonry" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/FDFullscreenPopGesture" "${PODS_CONFIGURATION_BUILD_DIR}/GKNavigationBarViewController" "${PODS_CONFIGURATION_BUILD_DIR}/HGCategoryView" "${PODS_CONFIGURATION_BUILD_DIR}/HGPersonalCenterExtend" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" 5 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/FDFullscreenPopGesture" -isystem "${PODS_ROOT}/Headers/Public/GKNavigationBarViewController" -isystem "${PODS_ROOT}/Headers/Public/HGCategoryView" -isystem "${PODS_ROOT}/Headers/Public/Masonry" -isystem "${PODS_ROOT}/Headers/Public/HGPersonalCenterExtend" 6 | OTHER_LDFLAGS = $(inherited) -ObjC -l"FDFullscreenPopGesture" -l"GKNavigationBarViewController" -l"HGCategoryView" -l"HGPersonalCenterExtend" -l"Masonry" -framework "Foundation" -framework "UIKit" 7 | PODS_BUILD_DIR = ${BUILD_DIR} 8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-HGPersonalCenter/Pods-HGPersonalCenter.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/FDFullscreenPopGesture" "${PODS_ROOT}/Headers/Public/GKNavigationBarViewController" "${PODS_ROOT}/Headers/Public/HGCategoryView" "${PODS_ROOT}/Headers/Public/HGPersonalCenterExtend" "${PODS_ROOT}/Headers/Public/Masonry" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/FDFullscreenPopGesture" "${PODS_CONFIGURATION_BUILD_DIR}/GKNavigationBarViewController" "${PODS_CONFIGURATION_BUILD_DIR}/HGCategoryView" "${PODS_CONFIGURATION_BUILD_DIR}/HGPersonalCenterExtend" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" 5 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/FDFullscreenPopGesture" -isystem "${PODS_ROOT}/Headers/Public/GKNavigationBarViewController" -isystem "${PODS_ROOT}/Headers/Public/HGCategoryView" -isystem "${PODS_ROOT}/Headers/Public/Masonry" -isystem "${PODS_ROOT}/Headers/Public/HGPersonalCenterExtend" 6 | OTHER_LDFLAGS = $(inherited) -ObjC -l"FDFullscreenPopGesture" -l"GKNavigationBarViewController" -l"HGCategoryView" -l"HGPersonalCenterExtend" -l"Masonry" -framework "Foundation" -framework "UIKit" 7 | PODS_BUILD_DIR = ${BUILD_DIR} 8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HGPersonalCenter 2 | 3 | ## Requirements 4 | 5 | - iOS 9.0+ 6 | - Objective-C 7 | - Xcode 10+ 8 | 9 | ## Installation 10 | 我通过自己另一个支持`CocoaPods`的库快速集成 - [HGPersonalCenterExtend](https://github.com/ArchLL/HGPersonalCenterExtend) 11 | 12 | 13 | ```ruby 14 | pod 'HGPersonalCenterExtend', '~> 1.3.2' 15 | ``` 16 | 17 | ## Blog 18 | [简书](https://www.jianshu.com/p/8b87837d9e3a) 19 | 20 | ## Show 21 | 22 | ![image](https://github.com/ArchLL/HGPersonalCenter/blob/master/show.gif) 23 | 24 | 25 | ## Usage 26 | 主要逻辑已经封装到`HGNestedScrollViewController`中,稍加改动即可将其添加到项目中使用,使用请参照`HGPersonalCenterViewController`; 27 | 28 | ⚠️ 如果你的`pageViewController`下的`scrollView`是`UICollectionView`类型,需要进行如下设置: 29 | ```Objc 30 | // collectionView的内容不满一屏时,为了避免categoryView在吸顶后页面在竖直方向滑动失效,需要进行如下设置: 31 | _collectionView.alwaysBounceVertical = YES; 32 | ``` 33 | 34 | ### 温馨提示 35 | 当时为了实验不同导航栏框架的效果,在该项目中引入了`GKNavigationBarViewController`,但是这个第三方库对代码侵入性较高,还有一些bug未解决(比如:在我这个项目的场景下系统左滑操作失效,不得已我接入了`FDFullscreenPopGesture`来解决这个问题;左滑返回时,导航栏会闪屏). 36 | 37 | 所以不建议大家在自己的项目中使用`GKNavigationBarViewController`,推荐使用`RTRootNavigationController`,可以参考[HGPersonalCenterExtend](https://github.com/ArchLL/HGPersonalCenterExtend)中的使用方法 38 | 39 | ## Author 40 | 41 | Arch, mint_bin@163.com 42 | 43 | ## License 44 | 45 | HGPersonalCenterExtend is available under the MIT license. See the LICENSE file for more info. 46 | -------------------------------------------------------------------------------- /show.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArchLL/HGPersonalCenter/a0cb101f8964a8a5cb323030013b7094c35233a2/show.gif --------------------------------------------------------------------------------