├── .gitignore
├── Example
├── HGPersonalCenterExtend.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ ├── xcshareddata
│ │ └── xcschemes
│ │ │ └── HGPersonalCenterExtend.xcscheme
│ └── xcuserdata
│ │ └── arch.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── HGPersonalCenterExtend.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcshareddata
│ │ └── WorkspaceSettings.xcsettings
│ └── xcuserdata
│ │ └── arch.xcuserdatad
│ │ └── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
├── HGPersonalCenterExtend
│ ├── Base
│ │ └── Controllers
│ │ │ ├── HGBaseViewController.h
│ │ │ ├── HGBaseViewController.m
│ │ │ ├── HGNestedScrollViewController.h
│ │ │ └── HGNestedScrollViewController.m
│ ├── Controllers
│ │ ├── 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
│ ├── Info.plist
│ ├── Modules
│ │ ├── HGAlignmentAdjustButton.h
│ │ └── HGAlignmentAdjustButton.m
│ ├── Tools
│ │ ├── HGDeviceHelper.h
│ │ └── HGDeviceHelper.m
│ └── Views
│ │ ├── HGDoraemonCell.h
│ │ ├── HGDoraemonCell.m
│ │ ├── HGDoraemonCell.xib
│ │ ├── HGDoraemonCollectionViewCell.h
│ │ ├── HGDoraemonCollectionViewCell.m
│ │ ├── HGDoraemonCollectionViewCell.xib
│ │ ├── HGPersonalCenterHeaderView.h
│ │ └── HGPersonalCenterHeaderView.m
├── Podfile
├── Podfile.lock
├── Pods
│ ├── FDFullscreenPopGesture
│ │ ├── FDFullscreenPopGesture
│ │ │ ├── UINavigationController+FDFullscreenPopGesture.h
│ │ │ └── UINavigationController+FDFullscreenPopGesture.m
│ │ ├── LICENSE
│ │ └── README.md
│ ├── HGCategoryView
│ │ ├── HGCategoryView
│ │ │ ├── HGCategoryView.h
│ │ │ └── HGCategoryView.m
│ │ ├── LICENSE
│ │ └── README.md
│ ├── Local Podspecs
│ │ └── HGPersonalCenterExtend.podspec.json
│ ├── 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
│ │ └── xcuserdata
│ │ │ └── arch.xcuserdatad
│ │ │ └── xcschemes
│ │ │ ├── FDFullscreenPopGesture.xcscheme
│ │ │ ├── HGPersonalCenterExtend.xcscheme
│ │ │ ├── Masonry.xcscheme
│ │ │ ├── Pods-HGPersonalCenterExtend.xcscheme
│ │ │ ├── Pods-HGPersonalCenterExtend_Tests.xcscheme
│ │ │ ├── RTRootNavigationController.xcscheme
│ │ │ └── xcschememanagement.plist
│ ├── RTRootNavigationController
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── RTRootNavigationController
│ │ │ └── Classes
│ │ │ ├── RTRootNavigationController.h
│ │ │ ├── RTRootNavigationController.m
│ │ │ ├── UIViewController+RTRootNavigationController.h
│ │ │ └── UIViewController+RTRootNavigationController.m
│ └── Target Support Files
│ │ ├── FDFullscreenPopGesture
│ │ ├── FDFullscreenPopGesture-dummy.m
│ │ ├── FDFullscreenPopGesture-prefix.pch
│ │ ├── FDFullscreenPopGesture.debug.xcconfig
│ │ └── FDFullscreenPopGesture.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-HGPersonalCenterExtend
│ │ ├── Pods-HGPersonalCenterExtend-acknowledgements.markdown
│ │ ├── Pods-HGPersonalCenterExtend-acknowledgements.plist
│ │ ├── Pods-HGPersonalCenterExtend-dummy.m
│ │ ├── Pods-HGPersonalCenterExtend.debug.xcconfig
│ │ └── Pods-HGPersonalCenterExtend.release.xcconfig
│ │ ├── Pods-HGPersonalCenterExtend_Tests
│ │ ├── Pods-HGPersonalCenterExtend_Tests-acknowledgements.markdown
│ │ ├── Pods-HGPersonalCenterExtend_Tests-acknowledgements.plist
│ │ ├── Pods-HGPersonalCenterExtend_Tests-dummy.m
│ │ ├── Pods-HGPersonalCenterExtend_Tests.debug.xcconfig
│ │ └── Pods-HGPersonalCenterExtend_Tests.release.xcconfig
│ │ └── RTRootNavigationController
│ │ ├── RTRootNavigationController-dummy.m
│ │ ├── RTRootNavigationController-prefix.pch
│ │ ├── RTRootNavigationController.debug.xcconfig
│ │ └── RTRootNavigationController.release.xcconfig
├── SupportFiles
│ ├── 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
│ ├── HGMacro.h
│ ├── PrefixHeader.pch
│ └── main.m
└── Tests
│ ├── Tests-Info.plist
│ ├── Tests-Prefix.pch
│ ├── Tests.m
│ └── en.lproj
│ └── InfoPlist.strings
├── HGPersonalCenterExtend.podspec
├── HGPersonalCenterExtend
├── .gitkeep
├── 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
└── 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 | Example/Pods/
33 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend.xcodeproj/xcshareddata/xcschemes/HGPersonalCenterExtend.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
45 |
51 |
52 |
53 |
54 |
60 |
62 |
68 |
69 |
70 |
71 |
73 |
74 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend.xcodeproj/xcuserdata/arch.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | HGPersonalCenterExtend.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 7
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 6003F589195388D20070C39A
16 |
17 | primary
18 |
19 |
20 | 6003F5AD195388D20070C39A
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend.xcworkspace/xcuserdata/arch.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Base/Controllers/HGBaseViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGBaseViewController.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 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface HGBaseViewController : UIViewController
14 | @property (nonatomic) BOOL isHideStatusBar;
15 | @property (nonatomic) BOOL isHiddenNavigationBarBottomBorder;
16 |
17 | - (void)setNavigationBarAlpha:(CGFloat)alpha;
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Base/Controllers/HGBaseViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGBaseViewController.m
3 | // HGPersonalCenterExtend
4 | //
5 | // Created by Arch on 2019/5/15.
6 | // Copyright © 2019 mint_bin@163.com. All rights reserved.
7 | //
8 |
9 | #import "HGBaseViewController.h"
10 |
11 | @interface HGBaseViewController ()
12 | @property (nonatomic, strong) UIImage *navigationBarOriginShadowImage;
13 | @property (nonatomic, strong) HGAlignmentAdjustButton *backButton;
14 | @end
15 |
16 | @implementation HGBaseViewController
17 |
18 | #pragma mark - Life Cycle
19 | - (void)viewDidLoad {
20 | [super viewDidLoad];
21 | self.view.backgroundColor = [UIColor whiteColor];
22 | [self setupBaseNavigationBar];
23 | }
24 |
25 | #pragma mark - Public Methods
26 | - (UIStatusBarStyle)preferredStatusBarStyle {
27 | return UIStatusBarStyleLightContent;
28 | }
29 |
30 | - (BOOL)prefersStatusBarHidden {
31 | return self.isHideStatusBar;
32 | }
33 |
34 | - (void)setIsHideStatusBar:(BOOL)isHideStatusBar {
35 | _isHideStatusBar = isHideStatusBar;
36 | [self setNeedsStatusBarAppearanceUpdate];
37 | //for FringeScreen, more details:https://forums.developer.apple.com/thread/88962
38 | if (IS_EXIST_FRINGE && self.navigationController) {
39 | self.navigationController.navigationBarHidden = self.isHideStatusBar;
40 | }
41 | }
42 |
43 | - (void)setNavigationBarAlpha:(CGFloat)alpha {
44 | if (self.navigationController) {
45 | [self.navigationController.navigationBar setBackgroundImage:[self drawPngImageWithAlpha:alpha] forBarMetrics:(UIBarMetricsDefault)];
46 | }
47 | }
48 |
49 | #pragma mark - Private Methods
50 | - (void)setupBaseNavigationBar {
51 | if (self.navigationController) {
52 | self.navigationBarOriginShadowImage = self.navigationController.navigationBar.shadowImage;
53 | self.navigationController.navigationBar.titleTextAttributes = @{NSFontAttributeName:[UIFont systemFontOfSize:18], NSForegroundColorAttributeName:[UIColor whiteColor]};
54 | self.navigationController.navigationBar.barTintColor = kRGBA(28, 162, 223, 1.0);
55 | self.rt_navigationController.useSystemBackBarButtonItem = NO;
56 | }
57 | }
58 |
59 | - (UIBarButtonItem *)rt_customBackItemWithTarget:(id)target action:(SEL)action {
60 | UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithCustomView:self.backButton];
61 | [self.backButton addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
62 | return backItem;
63 | }
64 |
65 | - (UIImage *)drawPngImageWithAlpha:(CGFloat)alpha {
66 | UIColor *color = kRGBA(28, 162, 223, alpha);
67 | CGSize size = CGSizeMake(1, 1);
68 | UIGraphicsBeginImageContext(size);
69 | CGContextRef content = UIGraphicsGetCurrentContext();
70 | CGContextSetFillColorWithColor(content, color.CGColor);
71 | CGContextFillRect(content, CGRectMake(0, 0, 1, 1));
72 | UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
73 | UIGraphicsEndImageContext();
74 | return image;
75 | }
76 |
77 | #pragma mark - Setters
78 | - (void)setIsHiddenNavigationBarBottomBorder:(BOOL)isHiddenNavigationBarBottomBorder {
79 | _isHiddenNavigationBarBottomBorder = isHiddenNavigationBarBottomBorder;
80 | if (self.isHiddenNavigationBarBottomBorder) {
81 | [self.navigationController.navigationBar setShadowImage:[UIImage new]];
82 | } else {
83 | [self.navigationController.navigationBar setShadowImage:self.navigationBarOriginShadowImage];
84 | }
85 | }
86 |
87 | #pragma mark - Getters
88 | - (HGAlignmentAdjustButton *)backButton {
89 | if (!_backButton) {
90 | _backButton = [HGAlignmentAdjustButton buttonWithType:UIButtonTypeCustom];
91 | [_backButton setImage:[[UIImage imageNamed:@"back"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateNormal];
92 | _backButton.tintColor = [UIColor whiteColor];
93 | [_backButton setImageEdgeInsets:UIEdgeInsetsMake(0, -7, 0, 7)];
94 | [_backButton sizeToFit];
95 | }
96 | return _backButton;
97 | }
98 |
99 | @end
100 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Base/Controllers/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 |
12 | /// ScrollView嵌套控制器
13 | @interface HGNestedScrollViewController : HGBaseViewController
14 | @property (nonatomic, strong, readonly) HGCenterBaseTableView *tableView;
15 | @property (nonatomic, strong) UIView *headerView;
16 | @property (nonatomic, strong, readonly) UIView *footerView;
17 | @property (nonatomic, strong, readonly) HGSegmentedPageViewController *segmentedPageViewController;
18 | @end
19 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Base/Controllers/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.view addSubview:self.tableView];
37 | [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
38 | make.edges.equalTo(self.view);
39 | }];
40 |
41 | [self addChildViewController:self.segmentedPageViewController];
42 | [self.footerView addSubview:self.segmentedPageViewController.view];
43 | [self.segmentedPageViewController didMoveToParentViewController:self];
44 | [self.segmentedPageViewController.view mas_makeConstraints:^(MASConstraintMaker *make) {
45 | make.edges.equalTo(self.footerView);
46 | }];
47 | }
48 |
49 | - (void)changeNavigationBarAlpha {
50 | CGFloat alpha = 0;
51 | CGFloat topBarHeight = HGDeviceHelper.safeAreaInsetsTop + HGDeviceHelper.navigationBarHeight;
52 | if (self.tableView.contentOffset.y - (self.headerView.frame.size.height - topBarHeight) >= FLT_EPSILON) {
53 | alpha = 1;
54 | } else {
55 | if ((self.headerView.frame.size.height == topBarHeight)) {
56 | alpha = 0;
57 | } else {
58 | alpha = self.tableView.contentOffset.y / (self.headerView.frame.size.height - topBarHeight);
59 | }
60 | }
61 | [self setNavigationBarAlpha:alpha];
62 | }
63 |
64 | #pragma mark - UIScrollViewDelegate
65 | - (BOOL)scrollViewShouldScrollToTop:(UIScrollView *)scrollView {
66 | [self.segmentedPageViewController makePageViewControllersScrollToTop];
67 | return YES;
68 | }
69 |
70 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView {
71 | // 第一部分:更改导航栏颜色
72 | [self changeNavigationBarAlpha];
73 |
74 | // 第二部分:处理scrollView滑动冲突
75 | CGFloat contentOffsetY = scrollView.contentOffset.y;
76 | // 吸顶临界点(此时的临界点不是视觉感官上导航栏的底部,而是当前屏幕的顶部相对scrollViewContentView的位置)
77 | // 如果当前控制器底部存在TabBar/ToolBar/自定义的bottomBar, 还需要减去barHeight和SAFE_AREA_INSERTS_BOTTOM的高度
78 | CGFloat criticalPointOffsetY = scrollView.contentSize.height - SCREEN_HEIGHT;
79 | // 利用contentOffset处理内外层scrollView的滑动冲突问题
80 | if (contentOffsetY - criticalPointOffsetY >= FLT_EPSILON) {
81 | /*
82 | * 到达临界点:
83 | * 1.未吸顶状态 -> 吸顶状态
84 | * 2.维持吸顶状态 (pageViewController.scrollView.contentOffsetY > 0)
85 | */
86 | self.cannotScroll = YES;
87 | scrollView.contentOffset = CGPointMake(0, criticalPointOffsetY);
88 | [self.segmentedPageViewController makePageViewControllersScrollState:YES];
89 | } else {
90 | /*
91 | * 未达到临界点:
92 | * 1.维持吸顶状态 (pageViewController.scrollView.contentOffsetY > 0)
93 | * 2.吸顶状态 -> 不吸顶状态
94 | */
95 | if (self.cannotScroll) {
96 | // “维持吸顶状态”
97 | scrollView.contentOffset = CGPointMake(0, criticalPointOffsetY);
98 | } else {
99 | // 吸顶状态 -> 不吸顶状态
100 | [self.segmentedPageViewController makePageViewControllersScrollToTop];
101 | }
102 | }
103 | }
104 |
105 | #pragma mark - HGSegmentedPageViewControllerDelegate
106 | - (void)segmentedPageViewControllerLeaveTop {
107 | self.cannotScroll = NO;
108 | }
109 |
110 | - (void)segmentedPageViewControllerWillBeginDragging {
111 | self.tableView.scrollEnabled = NO;
112 | }
113 |
114 | - (void)segmentedPageViewControllerDidEndDragging {
115 | self.tableView.scrollEnabled = YES;
116 | }
117 |
118 | #pragma mark - Getters
119 | - (UITableView *)tableView {
120 | if (!_tableView) {
121 | _tableView = [[HGCenterBaseTableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
122 | _tableView.tableFooterView = self.footerView;
123 | _tableView.tableHeaderView = self.headerView;
124 | }
125 | return _tableView;
126 | }
127 |
128 | - (UIView *)headerView {
129 | if (!_headerView) {
130 | // 设置默认的headerView
131 | _headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, HGDeviceHelper.safeAreaInsetsTop + HGDeviceHelper.navigationBarHeight)];
132 | }
133 | return _headerView;
134 | }
135 |
136 | - (UIView *)footerView {
137 | if (!_footerView) {
138 | // 如果当前控制器底部存在TabBar/ToolBar/自定义的bottomBar, 还需要减去barHeight和SAFE_AREA_INSERTS_BOTTOM的高度
139 | _footerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT - TOP_BAR_HEIGHT)];
140 | }
141 | return _footerView;
142 | }
143 |
144 | - (HGSegmentedPageViewController *)segmentedPageViewController {
145 | if (!_segmentedPageViewController) {
146 | _segmentedPageViewController = [[HGSegmentedPageViewController alloc] init];
147 | _segmentedPageViewController.delegate = self;
148 | // 设置categoryView的样式,可以自定义分布方式(左、中、右)、高度、背景颜色、字体颜色、字体大小、下划线高度和颜色等
149 | _segmentedPageViewController.categoryView.backgroundColor = [UIColor yellowColor];
150 | _segmentedPageViewController.categoryView.alignment = HGCategoryViewAlignmentLeft;
151 | _segmentedPageViewController.categoryView.itemSpacing = 30;
152 | }
153 | return _segmentedPageViewController;
154 | }
155 |
156 | #pragma mark - Setters
157 | - (void)setHeaderView:(UIView *)headerView {
158 | _headerView = headerView;
159 | _tableView.tableHeaderView = self.headerView;
160 |
161 | }
162 |
163 | @end
164 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Controllers/HGHomeViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGHomeViewController.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 | @interface HGHomeViewController : HGBaseViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Controllers/HGHomeViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGHomeViewController.m
3 | // HGPersonalCenterExtend
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 (nonatomic, strong) UIButton *nextButton;
14 | @end
15 |
16 | @implementation HGHomeViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | self.title = @"首页";
21 | [self setupSubViews];
22 | }
23 |
24 | #pragma mark Private Methods
25 | - (void)setupSubViews {
26 | [self.view addSubview:self.nextButton];
27 | [self.nextButton mas_makeConstraints:^(MASConstraintMaker *make) {
28 | make.center.equalTo(self.view);
29 | make.width.mas_equalTo(200);
30 | }];
31 | }
32 |
33 | - (void)enterCenter {
34 | HGPersonalCenterViewController *vc = [[HGPersonalCenterViewController alloc] init];
35 | vc.selectedIndex = 0;
36 | [self.navigationController pushViewController:vc animated:YES];
37 | }
38 |
39 | #pragma mark Getters
40 | - (UIButton *)nextButton {
41 | if (!_nextButton) {
42 | _nextButton = [UIButton buttonWithType:UIButtonTypeCustom];
43 | _nextButton.backgroundColor = kRGBA(28, 162, 223, 1.0);
44 | [_nextButton setTitle:@"进入个人中心" forState:UIControlStateNormal];
45 | [_nextButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
46 | [_nextButton addTarget:self action:@selector(enterCenter) forControlEvents:UIControlEventTouchUpInside];
47 | }
48 | return _nextButton;
49 | }
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Controllers/HGMessageViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGMessageViewController.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 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface HGMessageViewController : HGBaseViewController
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Controllers/HGMessageViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGMessageViewController.m
3 | // HGPersonalCenterExtend
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 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Controllers/HGPersonalCenterViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGPersonalCenterExtendViewController.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 | #import "HGNestedScrollViewController.h"
11 |
12 | @interface HGPersonalCenterViewController : HGNestedScrollViewController
13 | @property (nonatomic, assign) NSUInteger selectedIndex;
14 | @end
15 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Controllers/HGPersonalCenterViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGPersonalCenterExtendViewController.m
3 | // HGPersonalCenterExtend
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 "HGPersonalCenterHeaderView.h"
11 | #import "HGDoraemonCell.h"
12 | #import "HGFirstViewController.h"
13 | #import "HGSecondViewController.h"
14 | #import "HGThirdViewController.h"
15 | #import "HGMessageViewController.h"
16 |
17 | @interface HGPersonalCenterViewController ()
18 | @property (nonatomic, strong) HGAlignmentAdjustButton *messageButton;
19 | @end
20 |
21 | @implementation HGPersonalCenterViewController
22 |
23 | #pragma mark - Life Cycles
24 | - (void)viewDidLoad {
25 | [super viewDidLoad];
26 | [self setupNavigationBar];
27 | [self setupHeaderView];
28 | [self setupTableView];
29 | // 也可以在请求数据成功后设置pageViewControllers
30 | [self setupPageViewControllers];
31 | /// 支持修改单个title
32 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(6.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
33 | [self.segmentedPageViewController.categoryView updateSelectedTitle:@"哔哩哔哩"];
34 | });
35 | }
36 |
37 | #pragma mark - Private Methods
38 | - (void)setupNavigationBar {
39 | self.isHiddenNavigationBarBottomBorder = YES;
40 | [self setNavigationBarAlpha:0];
41 | UIBarButtonItem *messageItem = [[UIBarButtonItem alloc] initWithCustomView:self.messageButton];
42 | self.navigationItem.rightBarButtonItem = messageItem;
43 | }
44 |
45 | - (void)viewMessage {
46 | HGMessageViewController *vc = [[HGMessageViewController alloc] init];
47 | [self.navigationController pushViewController:vc animated:YES];
48 | }
49 |
50 | - (void)setupHeaderView {
51 | self.headerView = [[HGPersonalCenterHeaderView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 240)];
52 | }
53 |
54 | - (void)setupTableView {
55 | self.tableView.delegate = self;
56 | self.tableView.dataSource = self;
57 | self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
58 | self.tableView.showsVerticalScrollIndicator = NO;
59 | [self.tableView registerNib:[UINib nibWithNibName:NSStringFromClass([HGDoraemonCell class]) bundle:nil] forCellReuseIdentifier:NSStringFromClass([HGDoraemonCell class])];
60 | }
61 |
62 | /**设置segmentedPageViewController的pageViewControllers和categoryView
63 | * 这里用到的pageViewController需要继承自HGPageViewController
64 | */
65 | - (void)setupPageViewControllers {
66 | NSMutableArray *controllers = [NSMutableArray array];
67 | NSArray *titles = @[@"主页", @"动态", @"关注", @"粉丝"];
68 | for (int i = 0; i < titles.count; i++) {
69 | HGPageViewController *controller;
70 | if (i % 3 == 0) {
71 | controller = [[HGThirdViewController alloc] init];
72 | } else if (i % 2 == 0) {
73 | controller = [[HGSecondViewController alloc] init];
74 | } else {
75 | controller = [[HGFirstViewController alloc] init];
76 | }
77 | [controllers addObject:controller];
78 | }
79 | self.segmentedPageViewController.pageViewControllers = controllers;
80 | self.segmentedPageViewController.selectedPage = 2;
81 | self.segmentedPageViewController.categoryView.titles = titles;
82 | self.segmentedPageViewController.categoryView.alignment = HGCategoryViewAlignmentCenter;
83 | }
84 |
85 | #pragma mark - UITableViewDataSource
86 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
87 | return 1;
88 | }
89 |
90 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
91 | HGDoraemonCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([HGDoraemonCell class]) forIndexPath:indexPath];
92 | return cell;
93 | }
94 |
95 | #pragma mark - UITableViewDelegate
96 | - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
97 | UIView *headerView = [[UIView alloc] init];
98 | headerView.backgroundColor = [UIColor yellowColor];
99 | UILabel *label = [[UILabel alloc] init];
100 | label.font = [UIFont systemFontOfSize:18];
101 | label.text = @"哆啦A梦";
102 | label.textColor = [UIColor redColor];
103 | [headerView addSubview:label];
104 | [label mas_makeConstraints:^(MASConstraintMaker *make) {
105 | make.centerY.equalTo(headerView);
106 | make.left.mas_equalTo(15);
107 | }];
108 | return headerView;
109 | }
110 |
111 | - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
112 | return nil;
113 | }
114 |
115 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
116 | return 180;
117 | }
118 |
119 | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
120 | return 40;
121 | }
122 |
123 | - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
124 | return CGFLOAT_MIN;
125 | }
126 |
127 | #pragma mark - Getters
128 | - (HGAlignmentAdjustButton *)messageButton {
129 | if (!_messageButton) {
130 | _messageButton = [HGAlignmentAdjustButton buttonWithType:UIButtonTypeCustom];
131 | [_messageButton setTitle:@"消息" forState:UIControlStateNormal];
132 | [_messageButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
133 | _messageButton.titleLabel.font = [UIFont systemFontOfSize:17];
134 | [_messageButton addTarget:self action:@selector(viewMessage) forControlEvents:UIControlEventTouchUpInside];
135 | [_messageButton sizeToFit];
136 | }
137 | return _messageButton;
138 | }
139 |
140 | @end
141 |
142 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Controllers/PageViewControllers/HGFirstViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGFirstViewController.h
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 |
11 | @interface HGFirstViewController : HGPageViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Controllers/PageViewControllers/HGFirstViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGFirstViewController.m
3 | // HGPersonalCenterExtend
4 | //
5 | // Created by Arch on 2017/6/16.
6 | // Copyright © 2017年 mint_bin. All rights reserved.
7 | //
8 |
9 | #import "HGFirstViewController.h"
10 | #import "HGMessageViewController.h"
11 |
12 | @interface HGFirstViewController ()
13 | @property (nonatomic, strong) UITableView *tableView;
14 | @end
15 |
16 | @implementation HGFirstViewController
17 |
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 50;
29 | }
30 |
31 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
32 | static NSString *const FirstViewControllerTableViewCellIdentifier = @"FirstViewControllerTableViewCell";
33 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:FirstViewControllerTableViewCellIdentifier];
34 | if (cell == nil) {
35 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:FirstViewControllerTableViewCellIdentifier];
36 | }
37 | cell.textLabel.text = [NSString stringWithFormat:@"点击查看消息 %@", @(indexPath.row)];
38 | return cell;
39 | }
40 |
41 | #pragma mark - UITableViewDelegate
42 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
43 | [tableView deselectRowAtIndexPath:indexPath animated:YES];
44 | HGMessageViewController *vc = [[HGMessageViewController alloc] init];
45 | [self.navigationController pushViewController:vc animated:YES];
46 | }
47 |
48 | #pragma mark - Getters
49 | - (UITableView *)tableView {
50 | if (!_tableView) {
51 | _tableView = [[UITableView alloc] init];
52 | _tableView.delegate = self;
53 | _tableView.dataSource = self;
54 | _tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
55 | _tableView.rowHeight = 50;
56 | _tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
57 | }
58 | return _tableView;
59 | }
60 |
61 | @end
62 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Controllers/PageViewControllers/HGSecondViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGSecondViewController.h
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 |
11 | @interface HGSecondViewController : HGPageViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Controllers/PageViewControllers/HGSecondViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGSecondViewController.m
3 | // HGPersonalCenterExtend
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 10;
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: %@", @(indexPath.row)];
34 | cell.imageView.image = [UIImage imageNamed:@"cartoon.jpg"];
35 | return cell;
36 | }
37 |
38 | - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
39 | return nil;
40 | }
41 |
42 | - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
43 | return CGFLOAT_MIN;
44 | }
45 |
46 | #pragma mark - UITableViewDelegate
47 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
48 | [tableView deselectRowAtIndexPath:indexPath animated:YES];
49 | }
50 |
51 | #pragma mark - Getters
52 | - (UITableView *)tableView {
53 | if (!_tableView) {
54 | _tableView = [[UITableView alloc] init];
55 | _tableView.delegate = self;
56 | _tableView.dataSource = self;
57 | _tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
58 | _tableView.rowHeight = 50;
59 | _tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
60 | [_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:SecondViewControllerTableVIewCellIdentifier];
61 | }
62 | return _tableView;
63 | }
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Controllers/PageViewControllers/HGThirdViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGThirdViewController.h
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 |
11 | @interface HGThirdViewController : HGPageViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Controllers/PageViewControllers/HGThirdViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGThirdViewController.m
3 | // HGPersonalCenterExtend
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 | @end
16 |
17 | @implementation HGThirdViewController
18 |
19 | - (void)viewDidLoad {
20 | [super viewDidLoad];
21 | [self.view addSubview:self.collectionView];
22 | [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
23 | make.edges.equalTo(self.view);
24 | }];
25 | }
26 |
27 | #pragma mark - UICollectionViewDataSource
28 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
29 | return 5;
30 | }
31 |
32 | - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
33 | UICollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:ThirdViewControllerCollectionViewCellIdentifier forIndexPath:indexPath];
34 | cell.backgroundColor = kRGBA(28, 162, 223, 1.0);
35 | return cell;
36 | }
37 |
38 | #pragma mark - UICollectionViewDelegate
39 | - (BOOL)collectionView:(UICollectionView *)collectionView shouldSelectItemAtIndexPath:(NSIndexPath *)indexPath {
40 | return YES;
41 | }
42 |
43 | #pragma mark - Getters
44 | - (UICollectionView *)collectionView {
45 | if (!_collectionView) {
46 | UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
47 | flowLayout.minimumInteritemSpacing = 10;
48 | flowLayout.minimumLineSpacing = 10;
49 | flowLayout.sectionInset = UIEdgeInsetsMake(10, 10, 5, 10);
50 | flowLayout.itemSize = CGSizeMake((SCREEN_WIDTH - 30) / 2.0, 200);
51 | flowLayout.scrollDirection = UICollectionViewScrollDirectionVertical;
52 |
53 | _collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:flowLayout];
54 | _collectionView.delegate = self;
55 | _collectionView.dataSource = self;
56 | // 因为当collectionView的内容不满一屏时,会导致竖直方向滑动失效,所以需要设置alwaysBounceVertical为YES
57 | _collectionView.alwaysBounceVertical = YES;
58 | _collectionView.backgroundColor = [UIColor whiteColor];
59 | [_collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:ThirdViewControllerCollectionViewCellIdentifier];
60 | }
61 | return _collectionView;
62 | }
63 | @end
64 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/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 | 2
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 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Modules/HGAlignmentAdjustButton.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGAlignmentAdjustButton.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 | #import
10 |
11 | /// https://www.matrixprojects.net/p/uibarbuttonitem-ios11/
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | @interface HGAlignmentAdjustButton : UIButton
16 |
17 | @end
18 |
19 | NS_ASSUME_NONNULL_END
20 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Modules/HGAlignmentAdjustButton.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGAlignmentAdjustButton.m
3 | // HGPersonalCenterExtend
4 | //
5 | // Created by Arch on 2019/5/15.
6 | // Copyright © 2019 mint_bin@163.com. All rights reserved.
7 | //
8 |
9 | #import "HGAlignmentAdjustButton.h"
10 |
11 | @interface HGAlignmentAdjustButton ()
12 | @property (nonatomic) UIEdgeInsets alignmentRectInsetsOverride;
13 | @end
14 |
15 | @implementation HGAlignmentAdjustButton
16 |
17 | - (UIEdgeInsets)alignmentRectInsets {
18 | if (UIEdgeInsetsEqualToEdgeInsets(self.alignmentRectInsetsOverride, UIEdgeInsetsZero)) {
19 | return [super alignmentRectInsets];
20 | } else {
21 | return self.alignmentRectInsetsOverride;
22 | }
23 | }
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Tools/HGDeviceHelper.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGDeviceHelper.h
3 | // HGPersonalCenterExtend
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 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Tools/HGDeviceHelper.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGDeviceHelper.m
3 | // HGPersonalCenterExtend
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 | @end
67 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Views/HGDoraemonCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGDoraemonCell.h
3 | // HGPersonalCenterExtend
4 | //
5 | // Created by Arch on 2018/5/19.
6 | // Copyright © 2018年 mint_bin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HGDoraemonCell : UITableViewCell
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Views/HGDoraemonCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGDoraemonCell.m
3 | // HGPersonalCenterExtend
4 | //
5 | // Created by Arch on 2018/5/19.
6 | // Copyright © 2018年 mint_bin. All rights reserved.
7 | //
8 |
9 | #import "HGDoraemonCell.h"
10 | #import "HGDoraemonCollectionViewCell.h"
11 |
12 | @interface HGDoraemonCell ()
13 | @property (weak, nonatomic) IBOutlet HGPopGestureCompatibleCollectionView *collectionView;
14 | @end
15 |
16 | @implementation HGDoraemonCell
17 | - (void)awakeFromNib {
18 | [super awakeFromNib];
19 | [self.collectionView registerNib:[UINib nibWithNibName:NSStringFromClass([HGDoraemonCollectionViewCell class]) bundle:nil] forCellWithReuseIdentifier:NSStringFromClass([HGDoraemonCollectionViewCell class])];
20 | }
21 |
22 | - (void)dealloc {
23 | [[NSNotificationCenter defaultCenter] removeObserver:self];
24 | }
25 |
26 | #pragma mark - UIScrollViewDelegate
27 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView {
28 | if (self.collectionView.contentOffset.x <= 0) {
29 | self.collectionView.bounces = NO;
30 | } else {
31 | self.collectionView.bounces = YES;
32 | }
33 | }
34 |
35 | #pragma mark - UICollectionViewDataSource
36 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
37 | return 10;
38 | }
39 |
40 | - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
41 | HGDoraemonCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([HGDoraemonCollectionViewCell class]) forIndexPath:indexPath];
42 | return cell;
43 | }
44 |
45 | #pragma mark FlowLayoutDelegate
46 | - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
47 | return CGSizeMake(150, 180);
48 | }
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Views/HGDoraemonCell.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Views/HGDoraemonCollectionViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGDoraemonCollectionViewCell.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 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface HGDoraemonCollectionViewCell : UICollectionViewCell
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Views/HGDoraemonCollectionViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGDoraemonCollectionViewCell.m
3 | // HGPersonalCenterExtend
4 | //
5 | // Created by Arch on 2019/1/3.
6 | // Copyright © 2019 mint_bin. All rights reserved.
7 | //
8 |
9 | #import "HGDoraemonCollectionViewCell.h"
10 |
11 | @implementation HGDoraemonCollectionViewCell
12 |
13 | - (void)awakeFromNib {
14 | [super awakeFromNib];
15 | // Initialization code
16 | }
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Views/HGDoraemonCollectionViewCell.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Views/HGPersonalCenterHeaderView.h:
--------------------------------------------------------------------------------
1 | //
2 | // HGPersonalCenterHeaderView.h
3 | // HGPersonalCenterExtend
4 | //
5 | // Created by Arch on 2019/4/4.
6 | // Copyright © 2019 mint_bin@163.com. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface HGPersonalCenterHeaderView : UIView
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/Example/HGPersonalCenterExtend/Views/HGPersonalCenterHeaderView.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGPersonalCenterHeaderView.m
3 | // HGPersonalCenterExtend
4 | //
5 | // Created by Arch on 2019/4/4.
6 | // Copyright © 2019 mint_bin@163.com. All rights reserved.
7 | //
8 |
9 | #import "HGPersonalCenterHeaderView.h"
10 |
11 | @interface HGPersonalCenterHeaderView ()
12 | @property (nonatomic, strong) UIImageView *backgroundImageView;
13 | @property (nonatomic, strong) UIImageView *avatarImageView;
14 | @property (nonatomic, strong) UILabel *nickNameLabel;
15 | @end
16 |
17 | @implementation HGPersonalCenterHeaderView
18 |
19 | - (instancetype)initWithFrame:(CGRect)frame {
20 | self = [super initWithFrame:frame];
21 | if (self) {
22 | [self addSubview:self.backgroundImageView];
23 | [self.backgroundImageView addSubview:self.avatarImageView];
24 | [self.backgroundImageView addSubview:self.nickNameLabel];
25 |
26 | [self.backgroundImageView mas_makeConstraints:^(MASConstraintMaker *make) {
27 | make.edges.equalTo(self);
28 | }];
29 | [self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
30 | make.centerX.equalTo(self.backgroundImageView);
31 | make.size.mas_equalTo(CGSizeMake(80, 80));
32 | make.bottom.mas_equalTo(-70);
33 | }];
34 | [self.nickNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
35 | make.centerX.equalTo(self.backgroundImageView);
36 | make.width.mas_lessThanOrEqualTo(200);
37 | make.bottom.mas_equalTo(-40);
38 | }];
39 | }
40 | return self;
41 | }
42 |
43 | - (UIImageView *)backgroundImageView {
44 | if (!_backgroundImageView) {
45 | _backgroundImageView = [[UIImageView alloc] init];
46 | _backgroundImageView.image = [UIImage imageNamed:@"center_bg.jpg"];
47 | }
48 | return _backgroundImageView;
49 | }
50 |
51 | - (UIImageView *)avatarImageView {
52 | if (!_avatarImageView) {
53 | _avatarImageView = [[UIImageView alloc] init];
54 | _avatarImageView.image = [UIImage imageNamed:@"center_avatar.jpeg"];
55 | _avatarImageView.userInteractionEnabled = YES;
56 | _avatarImageView.layer.masksToBounds = YES;
57 | _avatarImageView.layer.borderWidth = 1;
58 | _avatarImageView.layer.borderColor = kRGBA(255, 253, 253, 1).CGColor;
59 | _avatarImageView.layer.cornerRadius = 40;
60 | }
61 | return _avatarImageView;
62 | }
63 |
64 | - (UILabel *)nickNameLabel {
65 | if (!_nickNameLabel) {
66 | _nickNameLabel = [[UILabel alloc] init];
67 | _nickNameLabel.font = [UIFont systemFontOfSize:16];
68 | _nickNameLabel.textColor = [UIColor whiteColor];
69 | _nickNameLabel.textAlignment = NSTextAlignmentCenter;
70 | _nickNameLabel.text = @"下雪天";
71 | }
72 | return _nickNameLabel;
73 | }
74 |
75 | @end
76 |
--------------------------------------------------------------------------------
/Example/Podfile:
--------------------------------------------------------------------------------
1 | source 'https://github.com/CocoaPods/Specs.git'
2 |
3 | platform :ios, '9.0'
4 |
5 | inhibit_all_warnings!
6 |
7 | target 'HGPersonalCenterExtend' do
8 | pod 'HGPersonalCenterExtend', :path => '../'
9 | pod 'RTRootNavigationController', '~> 0.7.2'
10 | pod 'FDFullscreenPopGesture', '~> 1.1'
11 |
12 | target 'HGPersonalCenterExtend_Tests' do
13 | inherit! :search_paths
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/Example/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - FDFullscreenPopGesture (1.1)
3 | - HGCategoryView (1.2.1):
4 | - Masonry (~> 1.1.0)
5 | - HGPersonalCenterExtend (1.3.2):
6 | - HGCategoryView (~> 1.2.1)
7 | - Masonry (~> 1.1.0)
8 | - Masonry (1.1.0)
9 | - RTRootNavigationController (0.7.2):
10 | - RTRootNavigationController/Core (= 0.7.2)
11 | - RTRootNavigationController/Core (0.7.2)
12 |
13 | DEPENDENCIES:
14 | - FDFullscreenPopGesture (~> 1.1)
15 | - HGPersonalCenterExtend (from `../`)
16 | - RTRootNavigationController (~> 0.7.2)
17 |
18 | SPEC REPOS:
19 | https://github.com/CocoaPods/Specs.git:
20 | - FDFullscreenPopGesture
21 | - HGCategoryView
22 | - Masonry
23 | - RTRootNavigationController
24 |
25 | EXTERNAL SOURCES:
26 | HGPersonalCenterExtend:
27 | :path: "../"
28 |
29 | SPEC CHECKSUMS:
30 | FDFullscreenPopGesture: a8a620179e3d9c40e8e00256dcee1c1a27c6d0f0
31 | HGCategoryView: d0aafdb8f6e7d5e46857061928dd1bb4cc17d9fb
32 | HGPersonalCenterExtend: 9c77a16f66947c04d46a8ab4f990f5481476d608
33 | Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
34 | RTRootNavigationController: 8344c2352d6d40fa370d0366efae2c84a945213f
35 |
36 | PODFILE CHECKSUM: 4db45eb6ad8bd7c17a6fa36946486b91a0e937b2
37 |
38 | COCOAPODS: 1.10.1
39 |
--------------------------------------------------------------------------------
/Example/Pods/FDFullscreenPopGesture/FDFullscreenPopGesture/UINavigationController+FDFullscreenPopGesture.h:
--------------------------------------------------------------------------------
1 | // The MIT License (MIT)
2 | //
3 | // Copyright (c) 2015-2016 forkingdog ( https://github.com/forkingdog )
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 |
23 | #import
24 |
25 | /// "UINavigation+FDFullscreenPopGesture" extends UINavigationController's swipe-
26 | /// to-pop behavior in iOS 7+ by supporting fullscreen pan gesture. Instead of
27 | /// screen edge, you can now swipe from any place on the screen and the onboard
28 | /// interactive pop transition works seamlessly.
29 | ///
30 | /// Adding the implementation file of this category to your target will
31 | /// automatically patch UINavigationController with this feature.
32 | @interface UINavigationController (FDFullscreenPopGesture)
33 |
34 | /// The gesture recognizer that actually handles interactive pop.
35 | @property (nonatomic, strong, readonly) UIPanGestureRecognizer *fd_fullscreenPopGestureRecognizer;
36 |
37 | /// A view controller is able to control navigation bar's appearance by itself,
38 | /// rather than a global way, checking "fd_prefersNavigationBarHidden" property.
39 | /// Default to YES, disable it if you don't want so.
40 | @property (nonatomic, assign) BOOL fd_viewControllerBasedNavigationBarAppearanceEnabled;
41 |
42 | @end
43 |
44 | /// Allows any view controller to disable interactive pop gesture, which might
45 | /// be necessary when the view controller itself handles pan gesture in some
46 | /// cases.
47 | @interface UIViewController (FDFullscreenPopGesture)
48 |
49 | /// Whether the interactive pop gesture is disabled when contained in a navigation
50 | /// stack.
51 | @property (nonatomic, assign) BOOL fd_interactivePopDisabled;
52 |
53 | /// Indicate this view controller prefers its navigation bar hidden or not,
54 | /// checked when view controller based navigation bar's appearance is enabled.
55 | /// Default to NO, bars are more likely to show.
56 | @property (nonatomic, assign) BOOL fd_prefersNavigationBarHidden;
57 |
58 | @end
59 |
--------------------------------------------------------------------------------
/Example/Pods/FDFullscreenPopGesture/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015
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 |
23 |
--------------------------------------------------------------------------------
/Example/Pods/FDFullscreenPopGesture/README.md:
--------------------------------------------------------------------------------
1 | # FDFullscreenPopGesture
2 | An UINavigationController's category to enable fullscreen pop gesture in an iOS7+ system style with AOP.
3 |
4 | # Overview
5 |
6 | 
7 |
8 | 这个扩展来自 @J_雨 同学的这个很天才的思路,他的文章地址:[http://www.jianshu.com/p/d39f7d22db6c](http://www.jianshu.com/p/d39f7d22db6c)
9 |
10 | # Usage
11 |
12 | **AOP**, just add 2 files and **no need** for any setups, all navigation controllers will be able to use fullscreen pop gesture automatically.
13 |
14 | To disable this pop gesture of a navigation controller:
15 |
16 | ``` objc
17 | navigationController.fd_fullscreenPopGestureRecognizer.enabled = NO;
18 | ```
19 |
20 | To disable this pop gesture of a view controller:
21 |
22 | ``` objc
23 | viewController.fd_interactivePopDisabled = YES;
24 | ```
25 |
26 | Require at least iOS **7.0**.
27 |
28 | # View Controller Based Navigation Bar Appearance
29 |
30 | It handles navigation bar transition properly when using fullscreen gesture to push or pop a view controller:
31 |
32 | - with bar -> without bar
33 | - without bar -> with bar
34 | - without bar -> without bar
35 |
36 | 
37 |
38 | This opmiziation is enabled by default, from now on you don't need to call **UINavigationController**'s `-setNavigationBarHidden:animated:` method, instead, use view controller's specific API to hide its bar:
39 |
40 | ``` objc
41 | - (void)viewDidLoad {
42 | [super viewDidLoad];
43 | self.fd_prefersNavigationBarHidden = NO;
44 | }
45 | ```
46 |
47 | And this property is **YES** by default.
48 |
49 | # Installation
50 |
51 | Use cocoapods
52 |
53 | ``` ruby
54 | pod 'FDFullscreenPopGesture', '1.1'
55 | ```
56 | # Release Notes
57 |
58 | **1.1** - View controller based navigation bar appearance and transition.
59 | **1.0** - Fullscreen pop gesture.
60 |
61 | # License
62 | MIT
63 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/Pods/Local Podspecs/HGPersonalCenterExtend.podspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "HGPersonalCenterExtend",
3 | "version": "1.3.2",
4 | "license": "MIT",
5 | "summary": "Resolve scrollView nested sliding conflicts.",
6 | "description": "Resolve scrollView nested sliding conflicts.\nHGPersonalCenterExtend supports iOS.",
7 | "homepage": "https://github.com/ArchLL/HGPersonalCenterExtend",
8 | "authors": {
9 | "Arch": "mint_bin@163.com"
10 | },
11 | "source": {
12 | "git": "https://github.com/ArchLL/HGPersonalCenterExtend.git",
13 | "tag": "1.3.2"
14 | },
15 | "source_files": "HGPersonalCenterExtend/*.{h,m}",
16 | "ios": {
17 | "frameworks": [
18 | "Foundation",
19 | "UIKit"
20 | ]
21 | },
22 | "platforms": {
23 | "ios": "9.0"
24 | },
25 | "dependencies": {
26 | "Masonry": [
27 | "~> 1.1.0"
28 | ],
29 | "HGCategoryView": [
30 | "~> 1.2.1"
31 | ]
32 | },
33 | "requires_arc": true
34 | }
35 |
--------------------------------------------------------------------------------
/Example/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - FDFullscreenPopGesture (1.1)
3 | - HGCategoryView (1.2.1):
4 | - Masonry (~> 1.1.0)
5 | - HGPersonalCenterExtend (1.3.2):
6 | - HGCategoryView (~> 1.2.1)
7 | - Masonry (~> 1.1.0)
8 | - Masonry (1.1.0)
9 | - RTRootNavigationController (0.7.2):
10 | - RTRootNavigationController/Core (= 0.7.2)
11 | - RTRootNavigationController/Core (0.7.2)
12 |
13 | DEPENDENCIES:
14 | - FDFullscreenPopGesture (~> 1.1)
15 | - HGPersonalCenterExtend (from `../`)
16 | - RTRootNavigationController (~> 0.7.2)
17 |
18 | SPEC REPOS:
19 | https://github.com/CocoaPods/Specs.git:
20 | - FDFullscreenPopGesture
21 | - HGCategoryView
22 | - Masonry
23 | - RTRootNavigationController
24 |
25 | EXTERNAL SOURCES:
26 | HGPersonalCenterExtend:
27 | :path: "../"
28 |
29 | SPEC CHECKSUMS:
30 | FDFullscreenPopGesture: a8a620179e3d9c40e8e00256dcee1c1a27c6d0f0
31 | HGCategoryView: d0aafdb8f6e7d5e46857061928dd1bb4cc17d9fb
32 | HGPersonalCenterExtend: 9c77a16f66947c04d46a8ab4f990f5481476d608
33 | Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
34 | RTRootNavigationController: 8344c2352d6d40fa370d0366efae2c84a945213f
35 |
36 | PODFILE CHECKSUM: 4db45eb6ad8bd7c17a6fa36946486b91a0e937b2
37 |
38 | COCOAPODS: 1.10.1
39 |
--------------------------------------------------------------------------------
/Example/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.
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/arch.xcuserdatad/xcschemes/FDFullscreenPopGesture.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
45 |
46 |
52 |
53 |
55 |
56 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/arch.xcuserdatad/xcschemes/HGPersonalCenterExtend.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
45 |
46 |
52 |
53 |
55 |
56 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/arch.xcuserdatad/xcschemes/Masonry.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
45 |
46 |
52 |
53 |
55 |
56 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/arch.xcuserdatad/xcschemes/Pods-HGPersonalCenterExtend.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
45 |
46 |
52 |
53 |
55 |
56 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/arch.xcuserdatad/xcschemes/Pods-HGPersonalCenterExtend_Tests.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
45 |
46 |
52 |
53 |
55 |
56 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/arch.xcuserdatad/xcschemes/RTRootNavigationController.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
45 |
46 |
52 |
53 |
55 |
56 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcuserdata/arch.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | FDFullscreenPopGesture.xcscheme
8 |
9 | isShown
10 |
11 |
12 | HGCategoryView.xcscheme
13 |
14 | isShown
15 |
16 |
17 | HGPersonalCenterExtend.xcscheme
18 |
19 | isShown
20 |
21 |
22 | Masonry.xcscheme
23 |
24 | isShown
25 |
26 |
27 | Pods-HGPersonalCenterExtend.xcscheme
28 |
29 | isShown
30 |
31 |
32 | Pods-HGPersonalCenterExtend_Tests.xcscheme
33 |
34 | isShown
35 |
36 |
37 | RTRootNavigationController.xcscheme
38 |
39 | isShown
40 |
41 |
42 |
43 | SuppressBuildableAutocreation
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/Example/Pods/RTRootNavigationController/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2016 rickytan
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 |
--------------------------------------------------------------------------------
/Example/Pods/RTRootNavigationController/README.md:
--------------------------------------------------------------------------------
1 | # RTRootNavigationController
2 |
3 | [](https://travis-ci.org/rickytan/RTRootNavigationController)
4 | [](http://cocoapods.org/pods/RTRootNavigationController)
5 | [](http://cocoapods.org/pods/RTRootNavigationController)
6 | [](http://cocoapods.org/pods/RTRootNavigationController)
7 |
8 | ## iPhone X
9 | How many lines of code should I write to fit in iPhone X? Zero.
10 |
11 | 我需要写多少代码来适配 **iPhone X**?0。
12 |
13 | 
14 |
15 | ## Introduction
16 | More and more apps use custom navigation bar for each different view controller, instead of one common, global navigation bar.
17 |
18 | This project just help develops to solve this problem in a tricky way, develops use this navigation controller in a farmilar way just like you used to be, and you can have each view controller a individual navigation bar.
19 |
20 | 越来越多的应用为每一个 **VC** 设置单独的导航条,而不是之前那样使用一个全局统一的导航条,因为不同的 **VC** 有不同的视觉样式,前一个是蓝色的,后一个也许要做成红色、透明,或者干脆没有导航条。
21 |
22 | 虽然开发者可以在每个 **VC** 的 `- (void)viewWillAppear` (想想为什么不是 `- (void)viewDidLoad`) 方法中设置自己所需的样式,但是在同一个导航条上来回修改,稍不注意就会导致样式混乱。另一种实现方式,是隐藏全局那个导航条,每个 **VC** 自己通过 `addSubview:(UIView *)view` 的方式自己设置导航条。这种实现是可行的,但是使用不方便了,如:
23 | - 无法使用 `self.navigationItem.rightBarButtonItem` 等来设置导航按钮,而必须自己手动往 `navigationBar` 上加;
24 | - 无法使用 `self.title` 来修改导航标题,而必须自己添加监听;
25 | - 无法方便地设置 `navigationBarHidden`;
26 | - 无法方便地自动调整 `contentInsets`。
27 |
28 | 等等。
29 |
30 | 本项目提供一种透明的方式,让开发者像以前一样使用导航器,同时,每个 `push` 进来的 **VC** 有自己独立的导航条。
31 |
32 | ## Features
33 |
34 | * Custom navigation bar class support
35 | * Unwind support
36 | * Rotation support
37 | * Interactive pop enable and disable support
38 | * `Interface Builder` support
39 |
40 | * 每个 **VC** 支持自定义的 `navigationBarClass`
41 | * 支持 `unwind`(不知道什么是 `unwind`?请参考:[这里](https://developer.apple.com/library/ios/technotes/tn2298/_index.html))
42 | * 支持转屏
43 | * 支持禁用交互式返回
44 | * 支持 `Interface Builder`
45 |
46 | 
47 |
48 | 
49 |
50 | ## Usage
51 |
52 | As an advise, please set `RTRootNavigationController` as your rootViewController:
53 |
54 | ```objective-c
55 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
56 | {
57 |
58 | UIViewController *yourController = ...;
59 | self.window.rootViewController = [[RTRootNavigationController alloc] initWithRootViewController:yourController];
60 | return YES;
61 | }
62 | ```
63 |
64 | you can implement following method to customize back bar button item (**Recommended**):
65 |
66 | ```objective-c
67 | - (UIBarButtonItem *)rt_customBackItemWithTarget:(id)target
68 | action:(SEL)action
69 | {
70 | return [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Back", nil)
71 | style:UIBarButtonItemStylePlain
72 | target:target
73 | action:action];
74 | }
75 | ```
76 |
77 | or just set `useSystemBackBarButtonItem` to **YES** and use the default one.
78 |
79 | To run the example project, clone the repo, and run `pod install` from the Example directory first.
80 |
81 | ## __Notice__(Only for below v0.6)
82 |
83 | Your **ViewController** hierarchy will change to:
84 | ```
85 | RTRootNavigationController
86 | `- RTContainerViewController
87 | | `- RTContainerNavigationController
88 | | `- YourViewController1
89 | `- RTContainerViewController
90 | `- RTContainerNavigationController
91 | `- YourViewController2
92 | ```
93 | So, if you access `self.navigationController` it returns a container navigation controller, and its `viewControllers` will always be **1**, i.e. `self`. Instead, your have to use `self.rt_navigationController.rt_viewController` to get all siblings, as metioned **[Here](https://github.com/rickytan/RTRootNavigationController/blob/master/RTRootNavigationController/Classes/UIViewController%2BRTRootNavigationController.h#L36)** and **[Here](https://github.com/rickytan/RTRootNavigationController/blob/master/RTRootNavigationController/Classes/RTRootNavigationController.h#L81)**.
94 |
95 | ## Requirements
96 |
97 | * **iOS 7** and up
98 | * **Xcode 7** and up
99 |
100 | ## Installation
101 |
102 | RTRootNavigationController is available through [CocoaPods](http://cocoapods.org). To install
103 | it, simply add the following line to your Podfile:
104 |
105 | ```ruby
106 | pod "RTRootNavigationController"
107 | ```
108 |
109 | ## Author
110 |
111 | rickytan, ricky.tan.xin@gmail.com
112 |
113 | ## Alternatives
114 |
115 | - [**JTNavigationController**](https://github.com/JNTian/JTNavigationController)
116 | - 支持全屏返回
117 | - [**FDFullscreenPopGesture**](https://github.com/forkingdog/FDFullscreenPopGesture)
118 | - 使用原生的 *UINavigationController*,在 `- (void)viewWillAppear` 中做处理
119 | - 支持全屏返回
120 |
121 | ## Apps Integrated
122 |
123 | * [网易美学](https://itunes.apple.com/cn/app/%E7%BD%91%E6%98%93%E7%BE%8E%E5%AD%A6-%E9%A2%9C%E5%80%BC%E6%9C%80%E9%AB%98%E7%9A%84%E7%BE%8E%E5%A6%86%E7%A4%BE%E5%8C%BA/id1147533466?mt=8)
124 |
125 | ## License
126 |
127 | RTRootNavigationController is available under the MIT license. See the LICENSE file for more info.
128 |
--------------------------------------------------------------------------------
/Example/Pods/RTRootNavigationController/RTRootNavigationController/Classes/RTRootNavigationController.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2016 rickytan
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 |
21 |
22 | #import
23 | #if RT_INTERACTIVE_PUSH
24 | #import
25 | #endif
26 |
27 | #import "UIViewController+RTRootNavigationController.h"
28 |
29 |
30 | @interface RTContainerController : UIViewController
31 | @property (nonatomic, readonly, strong) __kindof UIViewController *contentViewController;
32 | @end
33 |
34 |
35 | /**
36 | * @class RTContainerNavigationController
37 | * @brief This Controller will forward all @a Navigation actions to its containing navigation controller, i.e. @b RTRootNavigationController.
38 | * If you are using UITabBarController in your project, it's recommand to wrap it in @b RTRootNavigationController as follows:
39 | * @code
40 | tabController.viewControllers = @[[[RTContainerNavigationController alloc] initWithRootViewController:vc1],
41 | [[RTContainerNavigationController alloc] initWithRootViewController:vc2],
42 | [[RTContainerNavigationController alloc] initWithRootViewController:vc3],
43 | [[RTContainerNavigationController alloc] initWithRootViewController:vc4]];
44 | self.window.rootViewController = [[RTRootNavigationController alloc] initWithRootViewControllerNoWrapping:tabController];
45 | * @endcode
46 | */
47 | @interface RTContainerNavigationController : UINavigationController
48 | @end
49 |
50 |
51 |
52 | /*!
53 | * @class RTRootNavigationController
54 | * @superclass UINavigationController
55 | * @coclass RTContainerController
56 | * @coclass RTContainerNavigationController
57 | */
58 | IB_DESIGNABLE
59 | @interface RTRootNavigationController : UINavigationController
60 |
61 | /*!
62 | * @brief use system original back bar item or custom back bar item returned by
63 | * @c -(UIBarButtonItem*)customBackItemWithTarget:action: , default is NO
64 | * @warning Set this to @b YES will @b INCREASE memory usage!
65 | */
66 | @property (nonatomic, assign) IBInspectable BOOL useSystemBackBarButtonItem;
67 |
68 | /// Weather each individual navigation bar uses the visual style of root navigation bar. Default is @b NO
69 | @property (nonatomic, assign) IBInspectable BOOL transferNavigationBarAttributes;
70 |
71 | /*!
72 | * @brief use this property instead of @c visibleViewController to get the current visiable content view controller
73 | */
74 | @property (nonatomic, readonly, strong) UIViewController *rt_visibleViewController;
75 |
76 | /*!
77 | * @brief use this property instead of @c topViewController to get the content view controller on the stack top
78 | */
79 | @property (nonatomic, readonly, strong) UIViewController *rt_topViewController;
80 |
81 | /*!
82 | * @brief use this property to get all the content view controllers;
83 | */
84 | @property (nonatomic, readonly, strong) NSArray <__kindof UIViewController *> *rt_viewControllers;
85 |
86 | /**
87 | * Init with a root view controller without wrapping into a navigation controller
88 | *
89 | * @param rootViewController The root view controller
90 | *
91 | * @return new instance
92 | */
93 | - (instancetype)initWithRootViewControllerNoWrapping:(UIViewController *)rootViewController;
94 |
95 | /*!
96 | * @brief Remove a content view controller from the stack
97 | *
98 | * @param controller the content view controller
99 | */
100 | - (void)removeViewController:(UIViewController *)controller NS_REQUIRES_SUPER;
101 | - (void)removeViewController:(UIViewController *)controller animated:(BOOL)flag NS_REQUIRES_SUPER;
102 |
103 | /*!
104 | * @brief Push a view controller and do sth. when animation is done
105 | *
106 | * @param viewController new view controller
107 | * @param animated use animation or not
108 | * @param block animation complete callback block
109 | */
110 | - (void)pushViewController:(UIViewController *)viewController
111 | animated:(BOOL)animated
112 | complete:(void(^)(BOOL finished))block;
113 |
114 | /*!
115 | * @brief Pop current view controller on top with a complete handler
116 | *
117 | * @param animated use animation or not
118 | * @param block complete handler
119 | *
120 | * @return The current UIViewControllers(content controller) poped from the stack
121 | */
122 | - (UIViewController *)popViewControllerAnimated:(BOOL)animated complete:(void(^)(BOOL finished))block;
123 |
124 | /*!
125 | * @brief Pop to a specific view controller with a complete handler
126 | *
127 | * @param viewController The view controller to pop to
128 | * @param animated use animation or not
129 | * @param block complete handler
130 | *
131 | * @return A array of UIViewControllers(content controller) poped from the stack
132 | */
133 | - (NSArray <__kindof UIViewController *> *)popToViewController:(UIViewController *)viewController
134 | animated:(BOOL)animated
135 | complete:(void(^)(BOOL finished))block;
136 |
137 | /*!
138 | * @brief Pop to root view controller with a complete handler
139 | *
140 | * @param animated use animation or not
141 | * @param block complete handler
142 | *
143 | * @return A array of UIViewControllers(content controller) poped from the stack
144 | */
145 | - (NSArray <__kindof UIViewController *> *)popToRootViewControllerAnimated:(BOOL)animated
146 | complete:(void(^)(BOOL finished))block;
147 | @end
148 |
--------------------------------------------------------------------------------
/Example/Pods/RTRootNavigationController/RTRootNavigationController/Classes/UIViewController+RTRootNavigationController.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2016 rickytan
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 |
21 | #import
22 |
23 | @class RTRootNavigationController;
24 |
25 | @protocol RTNavigationItemCustomizable
26 |
27 | @optional
28 |
29 | /*!
30 | * @brief Override this method to provide a custom back bar item, default is a normal @c UIBarButtonItem with title @b "Back"
31 | *
32 | * @param target the action target
33 | * @param action the pop back action
34 | *
35 | * @return a custom UIBarButtonItem
36 | */
37 | - (UIBarButtonItem *)customBackItemWithTarget:(id)target action:(SEL)action DEPRECATED_MSG_ATTRIBUTE("use rt_customBackItemWithTarget:action: instead!");
38 | - (UIBarButtonItem *)rt_customBackItemWithTarget:(id)target action:(SEL)action;
39 |
40 | @end
41 |
42 | IB_DESIGNABLE
43 | @interface UIViewController (RTRootNavigationController)
44 |
45 | /*!
46 | * @brief set this property to @b YES to disable interactive pop
47 | */
48 | @property (nonatomic, assign) IBInspectable BOOL rt_disableInteractivePop;
49 |
50 | /*!
51 | * @brief @c self\.navigationControlle will get a wrapping @c UINavigationController, use this property to get the real navigation controller
52 | */
53 | @property (nonatomic, readonly, strong) RTRootNavigationController *rt_navigationController;
54 |
55 | /*!
56 | * @brief Override this method to provide a custom subclass of @c UINavigationBar, defaults return nil
57 | *
58 | * @return new UINavigationBar class
59 | */
60 | - (Class)rt_navigationBarClass;
61 |
62 | @end
63 |
--------------------------------------------------------------------------------
/Example/Pods/RTRootNavigationController/RTRootNavigationController/Classes/UIViewController+RTRootNavigationController.m:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2016 rickytan
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 |
21 | #import
22 |
23 | #import "UIViewController+RTRootNavigationController.h"
24 | #import "RTRootNavigationController.h"
25 |
26 | @implementation UIViewController (RTRootNavigationController)
27 | @dynamic rt_disableInteractivePop;
28 |
29 | - (void)setRt_disableInteractivePop:(BOOL)rt_disableInteractivePop
30 | {
31 | objc_setAssociatedObject(self, @selector(rt_disableInteractivePop), @(rt_disableInteractivePop), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
32 | }
33 |
34 | - (BOOL)rt_disableInteractivePop
35 | {
36 | return [objc_getAssociatedObject(self, @selector(rt_disableInteractivePop)) boolValue];
37 | }
38 |
39 | - (Class)rt_navigationBarClass
40 | {
41 | return nil;
42 | }
43 |
44 | - (RTRootNavigationController *)rt_navigationController
45 | {
46 | UIViewController *vc = self;
47 | while (vc && ![vc isKindOfClass:[RTRootNavigationController class]]) {
48 | vc = vc.navigationController;
49 | }
50 | return (RTRootNavigationController *)vc;
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/FDFullscreenPopGesture/FDFullscreenPopGesture-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_FDFullscreenPopGesture : NSObject
3 | @end
4 | @implementation PodsDummy_FDFullscreenPopGesture
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/FDFullscreenPopGesture/FDFullscreenPopGesture-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 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/FDFullscreenPopGesture/FDFullscreenPopGesture.debug.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/FDFullscreenPopGesture
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/FDFullscreenPopGesture" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/FDFullscreenPopGesture"
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}/FDFullscreenPopGesture
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 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/FDFullscreenPopGesture/FDFullscreenPopGesture.release.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/FDFullscreenPopGesture
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/FDFullscreenPopGesture" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/FDFullscreenPopGesture"
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}/FDFullscreenPopGesture
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 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/HGCategoryView/HGCategoryView-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_HGCategoryView : NSObject
3 | @end
4 | @implementation PodsDummy_HGCategoryView
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/HGPersonalCenterExtend/HGPersonalCenterExtend-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_HGPersonalCenterExtend : NSObject
3 | @end
4 | @implementation PodsDummy_HGPersonalCenterExtend
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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}/../..
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 |
--------------------------------------------------------------------------------
/Example/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}/../..
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 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Masonry/Masonry-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Masonry : NSObject
3 | @end
4 | @implementation PodsDummy_Masonry
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-HGPersonalCenterExtend/Pods-HGPersonalCenterExtend-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 | ## HGCategoryView
31 |
32 | MIT License
33 |
34 | Copyright (c) 2019 Arch
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 | ## HGPersonalCenterExtend
56 |
57 | Copyright (c) 2019 mint_bin@163.com
58 |
59 | Permission is hereby granted, free of charge, to any person obtaining a copy
60 | of this software and associated documentation files (the "Software"), to deal
61 | in the Software without restriction, including without limitation the rights
62 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
63 | copies of the Software, and to permit persons to whom the Software is
64 | furnished to do so, subject to the following conditions:
65 |
66 | The above copyright notice and this permission notice shall be included in
67 | all copies or substantial portions of the Software.
68 |
69 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
70 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
71 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
72 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
73 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
74 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
75 | THE SOFTWARE.
76 |
77 |
78 | ## Masonry
79 |
80 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry
81 |
82 | Permission is hereby granted, free of charge, to any person obtaining a copy
83 | of this software and associated documentation files (the "Software"), to deal
84 | in the Software without restriction, including without limitation the rights
85 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
86 | copies of the Software, and to permit persons to whom the Software is
87 | furnished to do so, subject to the following conditions:
88 |
89 | The above copyright notice and this permission notice shall be included in
90 | all copies or substantial portions of the Software.
91 |
92 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
93 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
94 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
95 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
96 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
97 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
98 | THE SOFTWARE.
99 |
100 | ## RTRootNavigationController
101 |
102 | Copyright (c) 2016 rickytan
103 |
104 | Permission is hereby granted, free of charge, to any person obtaining a copy
105 | of this software and associated documentation files (the "Software"), to deal
106 | in the Software without restriction, including without limitation the rights
107 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
108 | copies of the Software, and to permit persons to whom the Software is
109 | furnished to do so, subject to the following conditions:
110 |
111 | The above copyright notice and this permission notice shall be included in
112 | all copies or substantial portions of the Software.
113 |
114 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
115 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
116 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
117 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
118 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
119 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
120 | THE SOFTWARE.
121 |
122 | Generated by CocoaPods - https://cocoapods.org
123 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-HGPersonalCenterExtend/Pods-HGPersonalCenterExtend-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_HGPersonalCenterExtend : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_HGPersonalCenterExtend
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-HGPersonalCenterExtend/Pods-HGPersonalCenterExtend.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/HGCategoryView" "${PODS_ROOT}/Headers/Public/HGPersonalCenterExtend" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/RTRootNavigationController"
4 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/FDFullscreenPopGesture" "${PODS_CONFIGURATION_BUILD_DIR}/HGCategoryView" "${PODS_CONFIGURATION_BUILD_DIR}/HGPersonalCenterExtend" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/RTRootNavigationController"
5 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/FDFullscreenPopGesture" -isystem "${PODS_ROOT}/Headers/Public/HGCategoryView" -isystem "${PODS_ROOT}/Headers/Public/Masonry" -isystem "${PODS_ROOT}/Headers/Public/HGPersonalCenterExtend" -isystem "${PODS_ROOT}/Headers/Public/RTRootNavigationController"
6 | OTHER_LDFLAGS = $(inherited) -ObjC -l"FDFullscreenPopGesture" -l"HGCategoryView" -l"HGPersonalCenterExtend" -l"Masonry" -l"RTRootNavigationController" -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 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-HGPersonalCenterExtend/Pods-HGPersonalCenterExtend.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/HGCategoryView" "${PODS_ROOT}/Headers/Public/HGPersonalCenterExtend" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/RTRootNavigationController"
4 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/FDFullscreenPopGesture" "${PODS_CONFIGURATION_BUILD_DIR}/HGCategoryView" "${PODS_CONFIGURATION_BUILD_DIR}/HGPersonalCenterExtend" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/RTRootNavigationController"
5 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/FDFullscreenPopGesture" -isystem "${PODS_ROOT}/Headers/Public/HGCategoryView" -isystem "${PODS_ROOT}/Headers/Public/Masonry" -isystem "${PODS_ROOT}/Headers/Public/HGPersonalCenterExtend" -isystem "${PODS_ROOT}/Headers/Public/RTRootNavigationController"
6 | OTHER_LDFLAGS = $(inherited) -ObjC -l"FDFullscreenPopGesture" -l"HGCategoryView" -l"HGPersonalCenterExtend" -l"Masonry" -l"RTRootNavigationController" -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 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-HGPersonalCenterExtend_Tests/Pods-HGPersonalCenterExtend_Tests-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 | Generated by CocoaPods - https://cocoapods.org
4 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-HGPersonalCenterExtend_Tests/Pods-HGPersonalCenterExtend_Tests-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 | Generated by CocoaPods - https://cocoapods.org
18 | Title
19 |
20 | Type
21 | PSGroupSpecifier
22 |
23 |
24 | StringsTable
25 | Acknowledgements
26 | Title
27 | Acknowledgements
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-HGPersonalCenterExtend_Tests/Pods-HGPersonalCenterExtend_Tests-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_HGPersonalCenterExtend_Tests : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_HGPersonalCenterExtend_Tests
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-HGPersonalCenterExtend_Tests/Pods-HGPersonalCenterExtend_Tests.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/HGCategoryView" "${PODS_ROOT}/Headers/Public/HGPersonalCenterExtend" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/RTRootNavigationController"
4 | OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "UIKit"
5 | PODS_BUILD_DIR = ${BUILD_DIR}
6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
8 | PODS_ROOT = ${SRCROOT}/Pods
9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
11 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-HGPersonalCenterExtend_Tests/Pods-HGPersonalCenterExtend_Tests.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/HGCategoryView" "${PODS_ROOT}/Headers/Public/HGPersonalCenterExtend" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/RTRootNavigationController"
4 | OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "UIKit"
5 | PODS_BUILD_DIR = ${BUILD_DIR}
6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
8 | PODS_ROOT = ${SRCROOT}/Pods
9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
11 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/RTRootNavigationController/RTRootNavigationController-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_RTRootNavigationController : NSObject
3 | @end
4 | @implementation PodsDummy_RTRootNavigationController
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/RTRootNavigationController/RTRootNavigationController-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 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/RTRootNavigationController/RTRootNavigationController.debug.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RTRootNavigationController
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/RTRootNavigationController" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/RTRootNavigationController"
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}/RTRootNavigationController
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 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/RTRootNavigationController/RTRootNavigationController.release.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RTRootNavigationController
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/RTRootNavigationController" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/RTRootNavigationController"
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}/RTRootNavigationController
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 |
--------------------------------------------------------------------------------
/Example/SupportFiles/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.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 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
17 |
--------------------------------------------------------------------------------
/Example/SupportFiles/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // HGPersonalCenterExtend
4 | //
5 | // Created by Arch on 2017/6/16.
6 | // Copyright © 2017年 mint_bin. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "HGHomeViewController.h"
11 |
12 | @interface AppDelegate ()
13 |
14 | @end
15 |
16 | @implementation AppDelegate
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
20 | HGHomeViewController *homeViewController = [[HGHomeViewController alloc] init];
21 | RTRootNavigationController *rootNavigationController = [[RTRootNavigationController alloc] initWithRootViewController:homeViewController];
22 | self.window.rootViewController = rootNavigationController;
23 | [self.window makeKeyAndVisible];
24 | self.window.backgroundColor = [UIColor whiteColor];
25 | return YES;
26 | }
27 |
28 | - (void)applicationWillResignActive:(UIApplication *)application {
29 | // 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.
30 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
31 | }
32 |
33 |
34 | - (void)applicationDidEnterBackground:(UIApplication *)application {
35 | // 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.
36 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
37 | }
38 |
39 |
40 | - (void)applicationWillEnterForeground:(UIApplication *)application {
41 | // 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.
42 | }
43 |
44 |
45 | - (void)applicationDidBecomeActive:(UIApplication *)application {
46 | // 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.
47 | }
48 |
49 |
50 | - (void)applicationWillTerminate:(UIApplication *)application {
51 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
52 | }
53 |
54 |
55 | @end
56 |
--------------------------------------------------------------------------------
/Example/SupportFiles/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 | }
--------------------------------------------------------------------------------
/Example/SupportFiles/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Example/SupportFiles/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 | }
--------------------------------------------------------------------------------
/Example/SupportFiles/Assets.xcassets/back.imageset/back.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ArchLL/HGPersonalCenterExtend/997ddbb0c4aedaf251bf8b1b86700b9ea56f0ad8/Example/SupportFiles/Assets.xcassets/back.imageset/back.pdf
--------------------------------------------------------------------------------
/Example/SupportFiles/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 | }
--------------------------------------------------------------------------------
/Example/SupportFiles/Assets.xcassets/cartoon.imageset/cartoon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ArchLL/HGPersonalCenterExtend/997ddbb0c4aedaf251bf8b1b86700b9ea56f0ad8/Example/SupportFiles/Assets.xcassets/cartoon.imageset/cartoon.jpg
--------------------------------------------------------------------------------
/Example/SupportFiles/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 | }
--------------------------------------------------------------------------------
/Example/SupportFiles/Assets.xcassets/center_avatar.imageset/center_avatar.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ArchLL/HGPersonalCenterExtend/997ddbb0c4aedaf251bf8b1b86700b9ea56f0ad8/Example/SupportFiles/Assets.xcassets/center_avatar.imageset/center_avatar.jpeg
--------------------------------------------------------------------------------
/Example/SupportFiles/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 | }
--------------------------------------------------------------------------------
/Example/SupportFiles/Assets.xcassets/center_bg.imageset/center_bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ArchLL/HGPersonalCenterExtend/997ddbb0c4aedaf251bf8b1b86700b9ea56f0ad8/Example/SupportFiles/Assets.xcassets/center_bg.imageset/center_bg.jpg
--------------------------------------------------------------------------------
/Example/SupportFiles/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 |
--------------------------------------------------------------------------------
/Example/SupportFiles/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Example/SupportFiles/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 |
--------------------------------------------------------------------------------
/Example/SupportFiles/PrefixHeader.pch:
--------------------------------------------------------------------------------
1 | //
2 | // PrefixHeader.pch
3 | // HGPersonalCenterExtend
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 "RTRootNavigationController.h"
18 | #import "UINavigationController+FDFullscreenPopGesture.h"
19 |
20 | // 工程
21 | #import "HGBaseViewController.h"
22 | #import "HGAlignmentAdjustButton.h"
23 | #import "HGDeviceHelper.h"
24 | #import "HGMacro.h"
25 | #import "HGPopGestureCompatibleCollectionView.h"
26 |
27 | #endif /* PrefixHeader_pch */
28 |
--------------------------------------------------------------------------------
/Example/SupportFiles/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // HGPersonalCenterExtend
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 |
--------------------------------------------------------------------------------
/Example/Tests/Tests-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 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Example/Tests/Tests-Prefix.pch:
--------------------------------------------------------------------------------
1 | // The contents of this file are implicitly included at the beginning of every test case source file.
2 |
3 | #ifdef __OBJC__
4 |
5 |
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/Example/Tests/Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // HGPersonalCenterExtendTests.m
3 | // HGPersonalCenterExtendTests
4 | //
5 | // Created by mint_bin@163.com on 01/21/2019.
6 | // Copyright (c) 2019 mint_bin@163.com. All rights reserved.
7 | //
8 |
9 | @import XCTest;
10 |
11 | @interface Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation Tests
16 |
17 | - (void)setUp
18 | {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown
24 | {
25 | // Put teardown code here. This method is called after the invocation of each test method in the class.
26 | [super tearDown];
27 | }
28 |
29 | - (void)testExample
30 | {
31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
32 | }
33 |
34 | @end
35 |
36 |
--------------------------------------------------------------------------------
/Example/Tests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/HGPersonalCenterExtend.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # Be sure to run `pod lib lint HGPersonalCenterExtend.podspec' to ensure this is a
3 | # valid spec before submitting.
4 | #
5 | # Any lines starting with a # are optional, but their use is encouraged
6 | # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
7 | #
8 |
9 | Pod::Spec.new do |s|
10 | s.name = 'HGPersonalCenterExtend'
11 | s.version = '1.3.2'
12 | s.license = 'MIT'
13 | s.summary = 'Resolve scrollView nested sliding conflicts.'
14 | s.description = %{
15 | Resolve scrollView nested sliding conflicts.
16 | HGPersonalCenterExtend supports iOS.
17 | }
18 | s.homepage = 'https://github.com/ArchLL/HGPersonalCenterExtend'
19 | s.author = { 'Arch' => 'mint_bin@163.com' }
20 | s.source = { :git => 'https://github.com/ArchLL/HGPersonalCenterExtend.git', :tag => s.version.to_s }
21 | s.source_files = 'HGPersonalCenterExtend/*.{h,m}'
22 | s.ios.frameworks = 'Foundation', 'UIKit'
23 | s.ios.deployment_target = '9.0'
24 | s.dependency 'Masonry', '~> 1.1.0'
25 | s.dependency 'HGCategoryView', '~> 1.2.1'
26 | s.requires_arc = true
27 | end
28 |
--------------------------------------------------------------------------------
/HGPersonalCenterExtend/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ArchLL/HGPersonalCenterExtend/997ddbb0c4aedaf251bf8b1b86700b9ea56f0ad8/HGPersonalCenterExtend/.gitkeep
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # HGPersonalCenterExtend
2 |
3 | 
4 | [](http://cocoapods.org/pods/HGPersonalCenterExtend)
5 | 
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 | 
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 |
--------------------------------------------------------------------------------
/show.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ArchLL/HGPersonalCenterExtend/997ddbb0c4aedaf251bf8b1b86700b9ea56f0ad8/show.gif
--------------------------------------------------------------------------------