Repository: ArchLL/HGPersonalCenter
Branch: master
Commit: a0cb101f8964
Files: 41
Total size: 74.1 KB
Directory structure:
gitextract_30ifs8jp/
├── .gitignore
├── HGPersonalCenter/
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets/
│ │ ├── AppIcon.appiconset/
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ ├── back.imageset/
│ │ │ └── Contents.json
│ │ ├── cartoon.imageset/
│ │ │ └── Contents.json
│ │ ├── center_avatar.imageset/
│ │ │ └── Contents.json
│ │ └── center_bg.imageset/
│ │ └── Contents.json
│ ├── Base.lproj/
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Controllers/
│ │ ├── BaseControllers/
│ │ │ ├── HGBaseViewController.h
│ │ │ ├── HGBaseViewController.m
│ │ │ ├── HGNestedScrollViewController.h
│ │ │ └── HGNestedScrollViewController.m
│ │ ├── HGHomeViewController.h
│ │ ├── HGHomeViewController.m
│ │ ├── HGMessageViewController.h
│ │ ├── HGMessageViewController.m
│ │ ├── HGPersonalCenterViewController.h
│ │ ├── HGPersonalCenterViewController.m
│ │ └── PageViewControllers/
│ │ ├── HGFirstViewController.h
│ │ ├── HGFirstViewController.m
│ │ ├── HGSecondViewController.h
│ │ ├── HGSecondViewController.m
│ │ ├── HGThirdViewController.h
│ │ └── HGThirdViewController.m
│ ├── HGMacro.h
│ ├── Info.plist
│ ├── PrefixHeader.pch
│ ├── Tools/
│ │ ├── HGDeviceHelper.h
│ │ └── HGDeviceHelper.m
│ ├── Views/
│ │ ├── HGHeaderImageView.h
│ │ └── HGHeaderImageView.m
│ └── main.m
├── HGPersonalCenter.xcodeproj/
│ ├── project.pbxproj
│ └── project.xcworkspace/
│ └── contents.xcworkspacedata
├── HGPersonalCenter.xcworkspace/
│ └── contents.xcworkspacedata
├── LICENSE
├── Podfile
└── README.md
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
build/
DerivedData/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint
## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM
# CocoaPods
Pods/
================================================
FILE: HGPersonalCenter/AppDelegate.h
================================================
//
// AppDelegate.h
// HGPersonalCenter
//
// Created by Arch on 2017/6/16.
// Copyright © 2017年 mint_bin. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
================================================
FILE: HGPersonalCenter/AppDelegate.m
================================================
//
// AppDelegate.m
// PersonalCenter
//
// Created by Arch on 2017/6/16.
// Copyright © 2017年 mint_bin. All rights reserved.
//
#import "AppDelegate.h"
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
[[GKNavigationBarConfigure sharedInstance] setupCustomConfigure:^(GKNavigationBarConfigure *configure) {
configure.gk_translationX = 15;
configure.gk_translationY = 20;
configure.gk_scaleX = 0.90;
configure.gk_scaleY = 0.92;
}];
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
- (void)applicationWillTerminate:(UIApplication *)application {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
@end
================================================
FILE: HGPersonalCenter/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: HGPersonalCenter/Assets.xcassets/Contents.json
================================================
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: HGPersonalCenter/Assets.xcassets/back.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"filename" : "back.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: HGPersonalCenter/Assets.xcassets/cartoon.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"filename" : "cartoon.jpg"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: HGPersonalCenter/Assets.xcassets/center_avatar.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"filename" : "center_avatar.jpeg"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: HGPersonalCenter/Assets.xcassets/center_bg.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"filename" : "center_bg.jpg"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: HGPersonalCenter/Base.lproj/LaunchScreen.storyboard
================================================
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="HGPersonalCenter" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MFr-dp-TxJ">
<rect key="frame" x="0.0" y="200" width="375" height="60"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="eTg-Iq-3Xh"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="heavy" pointSize="32"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="MFr-dp-TxJ" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="6mM-dk-noh"/>
<constraint firstAttribute="trailing" relation="lessThanOrEqual" secondItem="MFr-dp-TxJ" secondAttribute="trailing" id="FDL-Sr-L1X"/>
<constraint firstItem="MFr-dp-TxJ" firstAttribute="top" secondItem="Llm-lL-Icb" secondAttribute="bottom" constant="200" id="Ujg-3o-l7i"/>
<constraint firstItem="MFr-dp-TxJ" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="t7z-tv-XJ8"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="209" y="364"/>
</scene>
</scenes>
</document>
================================================
FILE: HGPersonalCenter/Base.lproj/Main.storyboard
================================================
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="A7g-Mb-0eg">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Home View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="HGHomeViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Azb-T1-7gh">
<rect key="frame" x="57.5" y="324" width="260" height="40"/>
<color key="backgroundColor" red="0.11152013391256332" green="0.63509315252304077" blue="0.87644559144973755" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="SPA-ea-HyD"/>
<constraint firstAttribute="width" constant="260" id="pBL-2L-YSR"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<state key="normal" title="进入个人中心">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="enterCenterAction:" destination="BYZ-38-t0r" eventType="touchUpInside" id="F3C-XP-r51"/>
</connections>
</button>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="NJE-2E-NpG">
<rect key="frame" x="57.5" y="259" width="51" height="31"/>
</switch>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="头部背景放大" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EYB-Zo-o9R">
<rect key="frame" x="131.5" y="264" width="104" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="Azb-T1-7gh" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" constant="260" id="4NF-mc-8Ps"/>
<constraint firstItem="NJE-2E-NpG" firstAttribute="leading" secondItem="Azb-T1-7gh" secondAttribute="leading" id="4oI-GZ-xKK"/>
<constraint firstItem="Azb-T1-7gh" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="SsD-33-YRo"/>
<constraint firstItem="Azb-T1-7gh" firstAttribute="top" secondItem="NJE-2E-NpG" secondAttribute="bottom" constant="34" id="TRp-Ps-M45"/>
<constraint firstItem="EYB-Zo-o9R" firstAttribute="centerY" secondItem="NJE-2E-NpG" secondAttribute="centerY" id="U8Z-y4-dDZ"/>
<constraint firstItem="EYB-Zo-o9R" firstAttribute="leading" secondItem="NJE-2E-NpG" secondAttribute="trailing" constant="25" id="kkT-dm-EWt"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="iNy-EN-fAM"/>
<connections>
<outlet property="enlargeSwitch" destination="NJE-2E-NpG" id="dFT-6w-dhH"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1116" y="106"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="glE-pJ-ifC">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="A7g-Mb-0eg" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="YXl-jM-wLD">
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="wPb-Pj-ajo"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="UlJ-S8-FvM" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="116" y="-560.86956521739137"/>
</scene>
</scenes>
</document>
================================================
FILE: HGPersonalCenter/Controllers/BaseControllers/HGBaseViewController.h
================================================
//
// HGBaseViewController.h
// HGPersonalCenter
//
// Created by Arch on 2017/6/19.
// Copyright © 2017年 mint_bin. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface HGBaseViewController : GKNavigationBarViewController
@end
================================================
FILE: HGPersonalCenter/Controllers/BaseControllers/HGBaseViewController.m
================================================
//
// HGBaseViewController.m
// HGPersonalCenter
//
// Created by Arch on 2017/6/19.
// Copyright © 2017年 mint_bin. All rights reserved.
//
#import "HGBaseViewController.h"
@interface HGBaseViewController ()
@property (nonatomic, strong) UIButton *backButton;
@end
@implementation HGBaseViewController
#pragma mark - Life Cycle
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor whiteColor];
[self setBaseNavigationbar];
}
#pragma mark - Private Methods
- (void)setBaseNavigationbar {
if (self.navigationController) {
self.gk_navBackgroundColor = kRGBA(28, 162, 223, 1.0);
self.gk_navTitleFont = [UIFont systemFontOfSize:18];
self.gk_navTitleColor = [UIColor whiteColor];
UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithCustomView:self.backButton];
self.gk_navItemLeftSpace = 8;
self.gk_navItemRightSpace = 12;
if (self.navigationController.childViewControllers.count > 1) {
self.gk_navLeftBarButtonItem = backItem;
}
}
}
- (void)back {
[self.navigationController popViewControllerAnimated:YES];
}
#pragma mark - Getters
- (UIButton *)backButton {
if (!_backButton) {
_backButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_backButton setImage:[[UIImage imageNamed:@"back"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateNormal];
_backButton.tintColor = [UIColor whiteColor];
_backButton.contentEdgeInsets = UIEdgeInsetsMake(0, 12, 0, 12);
[_backButton addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside];
}
return _backButton;
}
@end
================================================
FILE: HGPersonalCenter/Controllers/BaseControllers/HGNestedScrollViewController.h
================================================
//
// HGNestedScrollViewController.h
// HGPersonalCenterExtend
//
// Created by Arch on 2020/1/16.
// Copyright © 2020 mint_bin@163.com. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "HGPersonalCenterExtend.h"
#import "HGHeaderImageView.h"
@interface HGNestedScrollViewController : HGBaseViewController
@property (nonatomic, strong, readonly) HGCenterBaseTableView *tableView;
@property (nonatomic, strong) HGHeaderImageView *headerImageView;
@property (nonatomic, strong) UIView *headerView;
@property (nonatomic, strong, readonly) UIView *footerView;
@property (nonatomic, strong, readonly) HGSegmentedPageViewController *segmentedPageViewController;
@property (nonatomic, assign) BOOL isEnlarge;
@end
================================================
FILE: HGPersonalCenter/Controllers/BaseControllers/HGNestedScrollViewController.m
================================================
//
// HGNestedScrollViewController.m
// HGPersonalCenterExtend
//
// Created by Arch on 2020/1/16.
// Copyright © 2020 mint_bin@163.com. All rights reserved.
//
#import "HGNestedScrollViewController.h"
@interface HGNestedScrollViewController () <HGSegmentedPageViewControllerDelegate>
@property (nonatomic, strong) HGCenterBaseTableView *tableView;
@property (nonatomic, strong) UIView *footerView;
@property (nonatomic, strong) HGSegmentedPageViewController *segmentedPageViewController;
@property (nonatomic) BOOL cannotScroll;
@end
@implementation HGNestedScrollViewController
@synthesize headerView = _headerView;
#pragma mark - Life Cycle
- (void)viewDidLoad {
[super viewDidLoad];
if (@available(iOS 11.0, *)) {
[[UIScrollView appearance] setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever];
} else {
self.automaticallyAdjustsScrollViewInsets = NO;
}
// 解决pop手势中断后tableView偏移问题
self.extendedLayoutIncludesOpaqueBars = YES;
[self setupSubViews];
}
#pragma mark - Private Methods
- (void)setupSubViews {
[self.tableView addSubview:self.headerImageView];
[self.view addSubview:self.tableView];
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.view);
}];
[self addChildViewController:self.segmentedPageViewController];
[self.footerView addSubview:self.segmentedPageViewController.view];
[self.segmentedPageViewController didMoveToParentViewController:self];
[self.segmentedPageViewController.view mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.footerView);
}];
}
- (void)changeNavigationBarAlpha {
CGFloat alpha = 0;
CGFloat currentOffsetY = self.tableView.contentOffset.y;
if (-currentOffsetY - HGDeviceHelper.topBarHeight <= FLT_EPSILON) {
alpha = 1;
} else if (self.headerImageView.initialHeight > HGDeviceHelper.topBarHeight) {
alpha = (self.headerImageView.initialHeight + currentOffsetY) / (self.headerImageView.initialHeight - HGDeviceHelper.topBarHeight);
}
self.gk_navBarAlpha = alpha;
}
#pragma mark - UIScrollViewDelegate
- (BOOL)scrollViewShouldScrollToTop:(UIScrollView *)scrollView {
[self.segmentedPageViewController makePageViewControllersScrollToTop];
return YES;
}
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
// 第一部分:处理导航栏
[self changeNavigationBarAlpha];
// 第二部分:处理手势冲突
CGFloat contentOffsetY = scrollView.contentOffset.y;
// 吸顶临界点(此时的临界点不是视觉感官上导航栏的底部,而是当前屏幕的顶部相对scrollViewContentView的位置)
CGFloat criticalPointOffsetY = [self.tableView rectForSection:0].origin.y - HGDeviceHelper.topBarHeight;
// 利用contentOffset处理内外层scrollView的滑动冲突问题
if (contentOffsetY >= criticalPointOffsetY) {
/*
* 到达临界点:
* 1.未吸顶状态 -> 吸顶状态
* 2.维持吸顶状态(pageViewController.scrollView.contentOffsetY > 0)
*/
self.cannotScroll = YES;
scrollView.contentOffset = CGPointMake(0, criticalPointOffsetY);
[self.segmentedPageViewController makePageViewControllersScrollState:YES];
} else {
/*
* 未达到临界点:
* 1.吸顶状态 -> 不吸顶状态
* 2.维持吸顶状态(pageViewController.scrollView.contentOffsetY > 0)
*/
if (self.cannotScroll) {
// “维持吸顶状态”
scrollView.contentOffset = CGPointMake(0, criticalPointOffsetY);
} else {
// 吸顶状态 -> 不吸顶状态
[self.segmentedPageViewController makePageViewControllersScrollToTop];
}
}
// 第三部分:
/**
* 处理头部自定义背景视图 (如: 下拉放大)
* 图片会被拉伸多出状态栏的高度
*/
if (contentOffsetY <= -self.headerImageView.initialHeight) {
if (self.isEnlarge) {
CGRect frame = self.headerImageView.frame;
// 改变HeadImageView的frame
// 上下放大
frame.origin.y = contentOffsetY;
frame.size.height = -contentOffsetY;
// 左右放大
frame.origin.x = (contentOffsetY * SCREEN_WIDTH / self.headerImageView.initialHeight + SCREEN_WIDTH) / 2;
frame.size.width = -contentOffsetY * SCREEN_WIDTH / self.headerImageView.initialHeight;
// 改变头部视图的frame
self.headerImageView.frame = frame;
} else{
scrollView.bounces = NO;
}
} else {
scrollView.bounces = YES;
}
}
#pragma mark - HGSegmentedPageViewControllerDelegate
- (void)segmentedPageViewControllerLeaveTop {
self.cannotScroll = NO;
}
- (void)segmentedPageViewControllerWillBeginDragging {
self.tableView.scrollEnabled = NO;
}
- (void)segmentedPageViewControllerDidEndDragging {
self.tableView.scrollEnabled = YES;
}
#pragma mark - Getters
- (UITableView *)tableView {
if (!_tableView) {
_tableView = [[HGCenterBaseTableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
_tableView.tableHeaderView = self.headerView;
_tableView.tableFooterView = self.footerView;
_tableView.contentInset = UIEdgeInsetsMake(self.headerImageView.initialHeight, 0, 0, 0);
[_tableView setContentOffset:CGPointMake(0, -self.headerImageView.initialHeight)];
}
return _tableView;
}
- (HGHeaderImageView *)headerImageView {
if (!_headerImageView) {
_headerImageView = [[HGHeaderImageView alloc] initWithFrame:CGRectMake(0, -240, SCREEN_WIDTH, 240)];
}
return _headerImageView;
}
- (UIView *)headerView {
if (!_headerView) {
// 这里的height不能设置为0,否则系统会给tableHeaderView设置一个默认的高度
_headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, CGFLOAT_MIN)];
}
return _headerView;
}
- (UIView *)footerView {
if (!_footerView) {
// 如果当前控制器底部存在TabBar/ToolBar/自定义的bottomBar, 还需要减去barHeight和SAFE_AREA_INSERTS_BOTTOM的高度
_footerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT - HGDeviceHelper.topBarHeight)];
}
return _footerView;
}
- (HGSegmentedPageViewController *)segmentedPageViewController {
if (!_segmentedPageViewController) {
_segmentedPageViewController = [[HGSegmentedPageViewController alloc] init];
_segmentedPageViewController.delegate = self;
_segmentedPageViewController.categoryView.alignment = HGCategoryViewAlignmentLeft;
_segmentedPageViewController.categoryView.itemSpacing = 25;
_segmentedPageViewController.categoryView.backgroundColor = [UIColor yellowColor];
_segmentedPageViewController.categoryView.isEqualParts = YES;
}
return _segmentedPageViewController;
}
#pragma mark - Setters
- (void)setHeaderView:(UIView *)headerView {
_headerView = headerView;
self.tableView.tableHeaderView = headerView;
}
@end
================================================
FILE: HGPersonalCenter/Controllers/HGHomeViewController.h
================================================
//
// HGHomeViewController.h
// HGPersonalCenter
//
// Created by Arch on 2017/6/16.
// Copyright © 2017年 mint_bin. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface HGHomeViewController : HGBaseViewController
@end
================================================
FILE: HGPersonalCenter/Controllers/HGHomeViewController.m
================================================
//
// HGHomeViewController.m
// HGPersonalCenter
//
// Created by Arch on 2017/6/16.
// Copyright © 2017年 mint_bin. All rights reserved.
//
#import "HGHomeViewController.h"
#import "HGPersonalCenterViewController.h"
@interface HGHomeViewController ()
@property (weak, nonatomic) IBOutlet UISwitch *enlargeSwitch;
@end
@implementation HGHomeViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.gk_navTitle = @"主页";
}
// 进入个人中心
- (IBAction)enterCenterAction:(UIButton *)sender {
HGPersonalCenterViewController *vc = [[HGPersonalCenterViewController alloc] init];
vc.isEnlarge = self.enlargeSwitch.on;
vc.selectedIndex = 0;
[self.navigationController pushViewController:vc animated:YES];
}
@end
================================================
FILE: HGPersonalCenter/Controllers/HGMessageViewController.h
================================================
//
// HGMessageViewController.h
// HGPersonalCenter
//
// Created by Arch on 2019/5/15.
// Copyright © 2019 mint_bin@163.com. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface HGMessageViewController : HGBaseViewController
@end
================================================
FILE: HGPersonalCenter/Controllers/HGMessageViewController.m
================================================
//
// HGMessageViewController.m
// HGPersonalCenter
//
// Created by Arch on 2019/5/15.
// Copyright © 2019 mint_bin@163.com. All rights reserved.
//
#import "HGMessageViewController.h"
@interface HGMessageViewController ()
@end
@implementation HGMessageViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"消息";
}
@end
================================================
FILE: HGPersonalCenter/Controllers/HGPersonalCenterViewController.h
================================================
//
// HGPersonalCenterViewController.h
// HGPersonalCenter
//
// Created by Arch on 2017/6/16.
// Copyright © 2017年 mint_bin. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "HGNestedScrollViewController.h"
@interface HGPersonalCenterViewController : HGNestedScrollViewController
@property (nonatomic, assign) NSUInteger selectedIndex;
@end
================================================
FILE: HGPersonalCenter/Controllers/HGPersonalCenterViewController.m
================================================
//
// HGPersonalCenterViewController.m
// HGPersonalCenter
//
// Created by Arch on 2017/6/16.
// Copyright © 2017年 mint_bin. All rights reserved.
//
#import "HGPersonalCenterViewController.h"
#import "HGFirstViewController.h"
#import "HGSecondViewController.h"
#import "HGThirdViewController.h"
#import "HGCenterBaseTableView.h"
#import "HGHeaderImageView.h"
#import "HGMessageViewController.h"
@interface HGPersonalCenterViewController () <UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, strong) UIButton *messageButton;
@end
@implementation HGPersonalCenterViewController
#pragma mark - Life Cycle
- (void)viewDidLoad {
[super viewDidLoad];
[self setupNavigationBar];
[self setupTableView];
// 可以在请求数据成功后设置/改变pageViewControllers, 但是要保证titles.count = pageViewControllers.count
[self setupPageViewControllers];
/// 支持修改单个title
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(6.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.segmentedPageViewController.categoryView updateSelectedTitle:@"哔哩哔哩"];
});
}
#pragma mark - Private Methods
- (void)setupNavigationBar {
self.gk_navBarAlpha = 0;
UIBarButtonItem *messageItem = [[UIBarButtonItem alloc] initWithCustomView:self.messageButton];
self.gk_navRightBarButtonItem = messageItem;
}
- (void)setupTableView {
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
self.tableView.showsVerticalScrollIndicator = NO;
}
#pragma mark - Private Methods
- (void)setupPageViewControllers {
NSMutableArray *controllers = [NSMutableArray array];
NSArray *titles = @[@"主页", @"动态", @"关注", @"粉丝"];
for (int i = 0; i < titles.count; i++) {
HGPageViewController *controller;
if (i % 3 == 0) {
controller = [[HGThirdViewController alloc] init];
} else if (i % 2 == 0) {
controller = [[HGSecondViewController alloc] init];
} else {
controller = [[HGFirstViewController alloc] init];
}
[controllers addObject:controller];
}
self.segmentedPageViewController.pageViewControllers = controllers;
self.segmentedPageViewController.selectedPage = self.selectedIndex;
self.segmentedPageViewController.categoryView.titles = titles;
}
- (void)viewMessage {
HGMessageViewController *vc = [[HGMessageViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
}
#pragma mark - UITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 1;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
return [UITableViewCell new];
}
#pragma mark - UITableViewDelegate
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
return CGFLOAT_MIN;
}
// 解决tableView在group类型下tableView头部和底部多余空白的问题
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
return nil;
}
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
return nil;
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
return CGFLOAT_MIN;
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
return CGFLOAT_MIN;
}
#pragma mark - Getters
- (UIButton *)messageButton {
if (!_messageButton) {
_messageButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_messageButton setTitle:@"消息" forState:UIControlStateNormal];
[_messageButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
_messageButton.titleLabel.font = [UIFont systemFontOfSize:17];
_messageButton.contentEdgeInsets = UIEdgeInsetsMake(0, 12, 0, 12);
[_messageButton addTarget:self action:@selector(viewMessage) forControlEvents:UIControlEventTouchUpInside];
}
return _messageButton;
}
@end
================================================
FILE: HGPersonalCenter/Controllers/PageViewControllers/HGFirstViewController.h
================================================
//
// HGFirstViewController.h
// HGPersonalCenter
//
// Created by Arch on 2017/6/16.
// Copyright © 2017年 mint_bin. All rights reserved.
//
#import "HGPageViewController.h"
@interface HGFirstViewController : HGPageViewController
@end
================================================
FILE: HGPersonalCenter/Controllers/PageViewControllers/HGFirstViewController.m
================================================
//
// HGFirstViewController.m
// HGPersonalCenter
//
// Created by Arch on 2017/6/16.
// Copyright © 2017年 mint_bin. All rights reserved.
//
#import "HGFirstViewController.h"
@interface HGFirstViewController () < UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, strong) UITableView *tableView;
@end
@implementation HGFirstViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self.view addSubview:self.tableView];
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.view);
}];
}
#pragma mark - UITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 30;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *const FirstViewControllerTableViewCellIdentifier = @"FirstViewControllerTableViewCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:FirstViewControllerTableViewCellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:FirstViewControllerTableViewCellIdentifier];
}
cell.textLabel.text = @"我要这天,再遮不住我眼";
return cell;
}
#pragma mark - Getters
- (UITableView *)tableView {
if (!_tableView) {
_tableView = [[UITableView alloc] init];
_tableView.delegate = self;
_tableView.dataSource = self;
_tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
_tableView.rowHeight = 50;
_tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
}
return _tableView;
}
@end
================================================
FILE: HGPersonalCenter/Controllers/PageViewControllers/HGSecondViewController.h
================================================
//
// HGSecondViewController.h
// HGPersonalCenter
//
// Created by Arch on 2017/6/16.
// Copyright © 2017年 mint_bin. All rights reserved.
//
#import "HGPageViewController.h"
@interface HGSecondViewController : HGPageViewController
@end
================================================
FILE: HGPersonalCenter/Controllers/PageViewControllers/HGSecondViewController.m
================================================
//
// HGSecondViewController.m
// HGPersonalCenter
//
// Created by Arch on 2017/6/16.
// Copyright © 2017年 mint_bin. All rights reserved.
//
#import "HGSecondViewController.h"
static NSString *const SecondViewControllerTableVIewCellIdentifier = @"SecondViewControllerTableVIewCell";
@interface HGSecondViewController () <UITableViewDelegate, UITableViewDataSource>
@property(nonatomic, strong) UITableView *tableView;
@end
@implementation HGSecondViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self.view addSubview:self.tableView];
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.view);
}];
}
#pragma mark - UITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 6;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SecondViewControllerTableVIewCellIdentifier forIndexPath:indexPath];
cell.textLabel.text = [NSString stringWithFormat:@"爱晚起,也爱工作到深夜 Row: %ld", indexPath.row];
cell.imageView.image = [UIImage imageNamed:@"cartoon.jpg"];
return cell;
}
#pragma mark - UITableViewDelegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
#pragma mark - Getters
- (UITableView *)tableView {
if (!_tableView) {
_tableView = [[UITableView alloc] init];
_tableView.delegate = self;
_tableView.dataSource = self;
_tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
_tableView.rowHeight = 50;
_tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
[_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:SecondViewControllerTableVIewCellIdentifier];
}
return _tableView;
}
@end
================================================
FILE: HGPersonalCenter/Controllers/PageViewControllers/HGThirdViewController.h
================================================
//
// HGThirdViewController.h
// HGPersonalCenter
//
// Created by Arch on 2017/6/16.
// Copyright © 2017年 mint_bin. All rights reserved.
//
#import "HGPageViewController.h"
@interface HGThirdViewController : HGPageViewController
@end
================================================
FILE: HGPersonalCenter/Controllers/PageViewControllers/HGThirdViewController.m
================================================
//
// HGThirdViewController.m
// HGPersonalCenter
//
// Created by Arch on 2017/6/16.
// Copyright © 2017年 mint_bin. All rights reserved.
//
#import "HGThirdViewController.h"
static NSString *const ThirdViewControllerCollectionViewCellIdentifier = @"ThirdViewControllerCollectionViewCell";
@interface HGThirdViewController () <UICollectionViewDelegate, UICollectionViewDataSource>
@property (nonatomic, strong) UICollectionView *collectionView;
@end
@implementation HGThirdViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self.view addSubview:self.collectionView];
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.view);
}];
}
#pragma mark - UICollectionViewDataSource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
return 5;
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
UICollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:ThirdViewControllerCollectionViewCellIdentifier forIndexPath:indexPath];
cell.backgroundColor = kRGBA(28, 162, 223, 1.0);;
return cell;
}
#pragma mark - UICollectionViewDelegate
- (BOOL)collectionView:(UICollectionView *)collectionView shouldSelectItemAtIndexPath:(NSIndexPath *)indexPath {
return YES;
}
#pragma mark - Getters
- (UICollectionView *)collectionView {
if (!_collectionView) {
UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
flowLayout.minimumInteritemSpacing = 10;
flowLayout.minimumLineSpacing = 10;
flowLayout.sectionInset = UIEdgeInsetsMake(10, 10, 5, 10);
flowLayout.itemSize = CGSizeMake((SCREEN_WIDTH - 30) / 2.0, 200);
flowLayout.scrollDirection = UICollectionViewScrollDirectionVertical;
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:flowLayout];
_collectionView.delegate = self;
_collectionView.dataSource = self;
// 因为当collectionView的内容不满一屏时,会导致竖直方向滑动失效,所以需要设置alwaysBounceVertical为YES
_collectionView.alwaysBounceVertical = YES;
_collectionView.backgroundColor = [UIColor whiteColor];
[_collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:ThirdViewControllerCollectionViewCellIdentifier];
}
return _collectionView;
}
@end
================================================
FILE: HGPersonalCenter/HGMacro.h
================================================
//
// HGMacro.h
// HGPersonalCenterExtend
//
// Created by Arch on 2019/5/15.
// Copyright © 2019 mint_bin@163.com. All rights reserved.
//
#ifndef HGMacro_h
#define HGMacro_h
// device
#define SCREEN_HEIGHT [[UIScreen mainScreen] bounds].size.height
#define SCREEN_WIDTH [[UIScreen mainScreen] bounds].size.width
#define STATUS_BAR_HEIGHT [UIApplication sharedApplication].statusBarFrame.size.height
#define NAVIGATION_BAR_HEIGHT (IS_IPAD ? 50 : 44)
#define IS_EXIST_FRINGE [HGDeviceHelper isExistFringe]
#define IS_EXIST_JAW [HGDeviceHelper isExistJaw]
#define SAFE_AREA_INSERTS_BOTTOM [HGDeviceHelper safeAreaInsetsBottom]
#define SAFE_AREA_INSERTS_TOP [HGDeviceHelper safeAreaInsetsTop]
#define TOP_BAR_HEIGHT (SAFE_AREA_INSERTS_TOP + NAVIGATION_BAR_HEIGHT)
#define IS_IPAD ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad)
// color
#define kRGBA(r, g, b, a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]
#endif /* HGMacro_h */
================================================
FILE: HGPersonalCenter/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
================================================
FILE: HGPersonalCenter/PrefixHeader.pch
================================================
//
// PrefixHeader.pch
// HGPersonalCenter
//
// Created by Arch on 2017/9/15.
// Copyright © 2017年 mint_bin. All rights reserved.
//
#ifndef PrefixHeader_pch
#define PrefixHeader_pch
// Include any system framework and library headers here that should be included in all compilation units.
// You will also need to set the Prefix Header build setting of moveLine or more of your targets to reference this file.
// 第三方
#import "Masonry.h"
#import "GKNavigationBarViewController.h"
// 工程
#import "HGBaseViewController.h"
#import "HGDeviceHelper.h"
#import "HGMacro.h"
#endif /* PrefixHeader_pch */
================================================
FILE: HGPersonalCenter/Tools/HGDeviceHelper.h
================================================
//
// HGDeviceHelper.h
// HGPersonalCenter
//
// Created by Arch on 2018/9/17.
// Copyright © 2019 mint_bin@163.com. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface HGDeviceHelper : NSObject
+ (BOOL)isIpad;
+ (BOOL)isExistFringe;
+ (BOOL)isExistJaw;
+ (CGFloat)safeAreaInsetsTop;
+ (CGFloat)safeAreaInsetsBottom;
+ (CGFloat)navigationBarHeight;
+ (CGFloat)topBarHeight;
@end
================================================
FILE: HGPersonalCenter/Tools/HGDeviceHelper.m
================================================
//
// HGDeviceHelper.m
// HGPersonalCenter
//
// Created by Arch on 2018/9/17.
// Copyright © 2019 mint_bin@163.com. All rights reserved.
//
#import "HGDeviceHelper.h"
@implementation HGDeviceHelper
+ (BOOL)isIpad {
return [UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad;
}
+ (BOOL)isExistFringe {
BOOL isExistFringe = NO;
if (@available(iOS 11.0, *)) {
UIWindow *mainWindow = [UIApplication sharedApplication].delegate.window;
if (mainWindow.safeAreaInsets.top > 20.0) {
isExistFringe = YES;
}
}
return isExistFringe;
}
+ (BOOL)isExistJaw {
BOOL isExistJaw = NO;
if (@available(iOS 11.0, *)) {
UIWindow *mainWindow = [UIApplication sharedApplication].delegate.window;
if (mainWindow.safeAreaInsets.bottom > 0.0) {
isExistJaw = YES;
}
}
return isExistJaw;
}
+ (CGFloat)safeAreaInsetsBottom {
if (@available(iOS 11.0, *)) {
UIWindow *mainWindow = [UIApplication sharedApplication].delegate.window;
return mainWindow.safeAreaInsets.bottom;
} else {
return 0;
}
}
+ (CGFloat)safeAreaInsetsTop {
if (@available(iOS 11.0, *)) {
UIWindow *mainWindow = [UIApplication sharedApplication].delegate.window;
return mainWindow.safeAreaInsets.top;
} else {
return 20;
}
}
+ (CGFloat)navigationBarHeight {
if (@available(iOS 12.0, *)) {
if ([self isIpad]) {
return 50;
}
}
return 44;
}
+ (CGFloat)topBarHeight {
return [self safeAreaInsetsTop] + [self navigationBarHeight];
}
@end
================================================
FILE: HGPersonalCenter/Views/HGHeaderImageView.h
================================================
//
// HGHeaderImageView.h
// HGPersonalCenter
//
// Created by Arch on 2019/5/17.
// Copyright © 2019 mint_bin. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface HGHeaderImageView : UIView
@property (nonatomic) CGFloat initialHeight;
@end
================================================
FILE: HGPersonalCenter/Views/HGHeaderImageView.m
================================================
//
// HGHeaderImageView.m
// HGPersonalCenter
//
// Created by 黑色幽默 on 2019/5/17.
// Copyright © 2019 mint_bin. All rights reserved.
//
#import "HGHeaderImageView.h"
@interface HGHeaderImageView ()
@property (nonatomic, strong) UIImageView *backgroundImageView;
@property (nonatomic, strong) UIImageView *avatarImageView;
@property (nonatomic, strong) UILabel *nickNameLabel;
@end
@implementation HGHeaderImageView
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
_initialHeight = frame.size.height;
[self setupViews];
}
return self;
}
- (void)setupViews {
[self addSubview:self.backgroundImageView];
[self addSubview:self.avatarImageView];
[self addSubview:self.nickNameLabel];
[self.backgroundImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self);
}];
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.backgroundImageView);
make.size.mas_equalTo(CGSizeMake(80, 80));
make.bottom.mas_equalTo(-70);
}];
[self.nickNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.backgroundImageView);
make.width.mas_lessThanOrEqualTo(200);
make.bottom.mas_equalTo(-40);
}];
}
- (UIImageView *)avatarImageView {
if (!_avatarImageView) {
_avatarImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"center_avatar.jpeg"]];
_avatarImageView.layer.borderWidth = 1;
_avatarImageView.layer.borderColor = kRGBA(255, 253, 253, 1).CGColor;
_avatarImageView.layer.cornerRadius = 40;
_avatarImageView.layer.masksToBounds = YES;
}
return _avatarImageView;
}
- (UILabel *)nickNameLabel {
if (!_nickNameLabel) {
_nickNameLabel = [[UILabel alloc] init];
_nickNameLabel.font = [UIFont systemFontOfSize:16];
_nickNameLabel.textColor = [UIColor whiteColor];
_nickNameLabel.textAlignment = NSTextAlignmentCenter;
_nickNameLabel.text = @"下雪天";
}
return _nickNameLabel;
}
- (UIImageView *)backgroundImageView {
if (!_backgroundImageView) {
_backgroundImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"center_bg.jpg"]];
}
return _backgroundImageView;
}
@end
================================================
FILE: HGPersonalCenter/main.m
================================================
//
// main.m
// HGPersonalCenter
//
// Created by Arch on 2017/6/16.
// Copyright © 2017年 mint_bin. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
================================================
FILE: HGPersonalCenter.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
3E4C03C4CA0E5F97CD522012 /* libPods-HGPersonalCenter.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3379ED4F74FC9D400EBAF696 /* libPods-HGPersonalCenter.a */; };
5313760F1F6A7FCA00D646AF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5313760E1F6A7FCA00D646AF /* Foundation.framework */; };
531376111F6A7FD300D646AF /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 531376101F6A7FD300D646AF /* UIKit.framework */; };
A9E72A6D21E5CE4F008F7ACA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A9E72A6B21E5CE4F008F7ACA /* Main.storyboard */; };
A9F80B8321DF0113000334BE /* HGBaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9F80B6421DF0113000334BE /* HGBaseViewController.m */; };
A9F80B8521DF0113000334BE /* HGPersonalCenterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9F80B6921DF0113000334BE /* HGPersonalCenterViewController.m */; };
A9F80B8721DF0113000334BE /* HGFirstViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9F80B6C21DF0113000334BE /* HGFirstViewController.m */; };
A9F80B8821DF0113000334BE /* HGThirdViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9F80B6E21DF0113000334BE /* HGThirdViewController.m */; };
A9F80B8921DF0113000334BE /* HGSecondViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9F80B7021DF0113000334BE /* HGSecondViewController.m */; };
A9F80B9121DF0113000334BE /* HGHomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9F80B8221DF0113000334BE /* HGHomeViewController.m */; };
A9FB4F3B228EB92500525B36 /* HGMessageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9FB4F3A228EB92500525B36 /* HGMessageViewController.m */; };
A9FB4F3F228EBB2800525B36 /* HGHeaderImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = A9FB4F3E228EBB2800525B36 /* HGHeaderImageView.m */; };
A9FFE91623EBEB4C0062398C /* HGDeviceHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = A9FFE91423EBEB4C0062398C /* HGDeviceHelper.m */; };
A9FFE91923EC09800062398C /* HGNestedScrollViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9FFE91723EC097F0062398C /* HGNestedScrollViewController.m */; };
D24F5E2D1EF3D9CD0011AB07 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D24F5E2C1EF3D9CD0011AB07 /* main.m */; };
D24F5E301EF3D9CD0011AB07 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D24F5E2F1EF3D9CD0011AB07 /* AppDelegate.m */; };
D24F5E381EF3D9CD0011AB07 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D24F5E371EF3D9CD0011AB07 /* Assets.xcassets */; };
D24F5E3B1EF3D9CD0011AB07 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D24F5E391EF3D9CD0011AB07 /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
3379ED4F74FC9D400EBAF696 /* libPods-HGPersonalCenter.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HGPersonalCenter.a"; sourceTree = BUILT_PRODUCTS_DIR; };
5313760E1F6A7FCA00D646AF /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
531376101F6A7FD300D646AF /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
53F1415C1F6BB05F00AB9BEF /* PrefixHeader.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrefixHeader.pch; sourceTree = "<group>"; };
A9E72A6C21E5CE4F008F7ACA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
A9F80B6221DF0113000334BE /* HGHomeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HGHomeViewController.h; sourceTree = "<group>"; };
A9F80B6321DF0113000334BE /* HGBaseViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HGBaseViewController.h; sourceTree = "<group>"; };
A9F80B6421DF0113000334BE /* HGBaseViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HGBaseViewController.m; sourceTree = "<group>"; };
A9F80B6921DF0113000334BE /* HGPersonalCenterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HGPersonalCenterViewController.m; sourceTree = "<group>"; };
A9F80B6C21DF0113000334BE /* HGFirstViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HGFirstViewController.m; sourceTree = "<group>"; };
A9F80B6D21DF0113000334BE /* HGSecondViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HGSecondViewController.h; sourceTree = "<group>"; };
A9F80B6E21DF0113000334BE /* HGThirdViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HGThirdViewController.m; sourceTree = "<group>"; };
A9F80B7021DF0113000334BE /* HGSecondViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HGSecondViewController.m; sourceTree = "<group>"; };
A9F80B7121DF0113000334BE /* HGFirstViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HGFirstViewController.h; sourceTree = "<group>"; };
A9F80B7221DF0113000334BE /* HGThirdViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HGThirdViewController.h; sourceTree = "<group>"; };
A9F80B7421DF0113000334BE /* HGPersonalCenterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HGPersonalCenterViewController.h; sourceTree = "<group>"; };
A9F80B8221DF0113000334BE /* HGHomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HGHomeViewController.m; sourceTree = "<group>"; };
A9FB4F2D228E9BE400525B36 /* HGMacro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HGMacro.h; sourceTree = "<group>"; };
A9FB4F39228EB92500525B36 /* HGMessageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HGMessageViewController.h; sourceTree = "<group>"; };
A9FB4F3A228EB92500525B36 /* HGMessageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HGMessageViewController.m; sourceTree = "<group>"; };
A9FB4F3D228EBB2800525B36 /* HGHeaderImageView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HGHeaderImageView.h; sourceTree = "<group>"; };
A9FB4F3E228EBB2800525B36 /* HGHeaderImageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HGHeaderImageView.m; sourceTree = "<group>"; };
A9FFE91423EBEB4C0062398C /* HGDeviceHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HGDeviceHelper.m; sourceTree = "<group>"; };
A9FFE91523EBEB4C0062398C /* HGDeviceHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HGDeviceHelper.h; sourceTree = "<group>"; };
A9FFE91723EC097F0062398C /* HGNestedScrollViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HGNestedScrollViewController.m; sourceTree = "<group>"; };
A9FFE91823EC09800062398C /* HGNestedScrollViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HGNestedScrollViewController.h; sourceTree = "<group>"; };
D24F5E281EF3D9CD0011AB07 /* HGPersonalCenter.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HGPersonalCenter.app; sourceTree = BUILT_PRODUCTS_DIR; };
D24F5E2C1EF3D9CD0011AB07 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
D24F5E2E1EF3D9CD0011AB07 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
D24F5E2F1EF3D9CD0011AB07 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
D24F5E371EF3D9CD0011AB07 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
D24F5E3A1EF3D9CD0011AB07 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
D24F5E3C1EF3D9CD0011AB07 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
D8C0A4C5A30C82D2D3EF880E /* Pods-HGPersonalCenter.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HGPersonalCenter.release.xcconfig"; path = "Pods/Target Support Files/Pods-HGPersonalCenter/Pods-HGPersonalCenter.release.xcconfig"; sourceTree = "<group>"; };
EEC61715961AFF357FFAE7F5 /* Pods-HGPersonalCenter.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HGPersonalCenter.debug.xcconfig"; path = "Pods/Target Support Files/Pods-HGPersonalCenter/Pods-HGPersonalCenter.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
D24F5E251EF3D9CD0011AB07 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
531376111F6A7FD300D646AF /* UIKit.framework in Frameworks */,
5313760F1F6A7FCA00D646AF /* Foundation.framework in Frameworks */,
3E4C03C4CA0E5F97CD522012 /* libPods-HGPersonalCenter.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
145BFB7591872D7542A16C6F /* Pods */ = {
isa = PBXGroup;
children = (
EEC61715961AFF357FFAE7F5 /* Pods-HGPersonalCenter.debug.xcconfig */,
D8C0A4C5A30C82D2D3EF880E /* Pods-HGPersonalCenter.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
5DAD1D0165BB0A2CAF75501A /* Frameworks */ = {
isa = PBXGroup;
children = (
531376101F6A7FD300D646AF /* UIKit.framework */,
5313760E1F6A7FCA00D646AF /* Foundation.framework */,
3379ED4F74FC9D400EBAF696 /* libPods-HGPersonalCenter.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
A9F80B6A21DF0113000334BE /* PageViewControllers */ = {
isa = PBXGroup;
children = (
A9F80B7121DF0113000334BE /* HGFirstViewController.h */,
A9F80B6C21DF0113000334BE /* HGFirstViewController.m */,
A9F80B6D21DF0113000334BE /* HGSecondViewController.h */,
A9F80B7021DF0113000334BE /* HGSecondViewController.m */,
A9F80B7221DF0113000334BE /* HGThirdViewController.h */,
A9F80B6E21DF0113000334BE /* HGThirdViewController.m */,
);
path = PageViewControllers;
sourceTree = "<group>";
};
A9FB4F27228E980500525B36 /* Controllers */ = {
isa = PBXGroup;
children = (
A9FB4F28228E982F00525B36 /* BaseControllers */,
A9F80B6A21DF0113000334BE /* PageViewControllers */,
A9F80B6221DF0113000334BE /* HGHomeViewController.h */,
A9F80B8221DF0113000334BE /* HGHomeViewController.m */,
A9F80B7421DF0113000334BE /* HGPersonalCenterViewController.h */,
A9F80B6921DF0113000334BE /* HGPersonalCenterViewController.m */,
A9FB4F39228EB92500525B36 /* HGMessageViewController.h */,
A9FB4F3A228EB92500525B36 /* HGMessageViewController.m */,
);
path = Controllers;
sourceTree = "<group>";
};
A9FB4F28228E982F00525B36 /* BaseControllers */ = {
isa = PBXGroup;
children = (
A9F80B6321DF0113000334BE /* HGBaseViewController.h */,
A9F80B6421DF0113000334BE /* HGBaseViewController.m */,
A9FFE91823EC09800062398C /* HGNestedScrollViewController.h */,
A9FFE91723EC097F0062398C /* HGNestedScrollViewController.m */,
);
path = BaseControllers;
sourceTree = "<group>";
};
A9FB4F29228E9B1200525B36 /* Tools */ = {
isa = PBXGroup;
children = (
A9FFE91523EBEB4C0062398C /* HGDeviceHelper.h */,
A9FFE91423EBEB4C0062398C /* HGDeviceHelper.m */,
);
path = Tools;
sourceTree = "<group>";
};
A9FB4F3C228EBAF000525B36 /* Views */ = {
isa = PBXGroup;
children = (
A9FB4F3D228EBB2800525B36 /* HGHeaderImageView.h */,
A9FB4F3E228EBB2800525B36 /* HGHeaderImageView.m */,
);
path = Views;
sourceTree = "<group>";
};
D24F5E1F1EF3D9CD0011AB07 = {
isa = PBXGroup;
children = (
D24F5E2A1EF3D9CD0011AB07 /* HGPersonalCenter */,
D24F5E291EF3D9CD0011AB07 /* Products */,
145BFB7591872D7542A16C6F /* Pods */,
5DAD1D0165BB0A2CAF75501A /* Frameworks */,
);
sourceTree = "<group>";
};
D24F5E291EF3D9CD0011AB07 /* Products */ = {
isa = PBXGroup;
children = (
D24F5E281EF3D9CD0011AB07 /* HGPersonalCenter.app */,
);
name = Products;
sourceTree = "<group>";
};
D24F5E2A1EF3D9CD0011AB07 /* HGPersonalCenter */ = {
isa = PBXGroup;
children = (
A9FB4F29228E9B1200525B36 /* Tools */,
A9FB4F27228E980500525B36 /* Controllers */,
A9FB4F3C228EBAF000525B36 /* Views */,
D24F5E2B1EF3D9CD0011AB07 /* Supporting Files */,
);
path = HGPersonalCenter;
sourceTree = "<group>";
};
D24F5E2B1EF3D9CD0011AB07 /* Supporting Files */ = {
isa = PBXGroup;
children = (
D24F5E2C1EF3D9CD0011AB07 /* main.m */,
D24F5E3C1EF3D9CD0011AB07 /* Info.plist */,
D24F5E2E1EF3D9CD0011AB07 /* AppDelegate.h */,
D24F5E2F1EF3D9CD0011AB07 /* AppDelegate.m */,
A9FB4F2D228E9BE400525B36 /* HGMacro.h */,
53F1415C1F6BB05F00AB9BEF /* PrefixHeader.pch */,
A9E72A6B21E5CE4F008F7ACA /* Main.storyboard */,
D24F5E391EF3D9CD0011AB07 /* LaunchScreen.storyboard */,
D24F5E371EF3D9CD0011AB07 /* Assets.xcassets */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
D24F5E271EF3D9CD0011AB07 /* HGPersonalCenter */ = {
isa = PBXNativeTarget;
buildConfigurationList = D24F5E3F1EF3D9CD0011AB07 /* Build configuration list for PBXNativeTarget "HGPersonalCenter" */;
buildPhases = (
D925C69D94FFF40FCB2D437E /* [CP] Check Pods Manifest.lock */,
D24F5E241EF3D9CD0011AB07 /* Sources */,
D24F5E251EF3D9CD0011AB07 /* Frameworks */,
D24F5E261EF3D9CD0011AB07 /* Resources */,
A30EAEF5BE177E55011AF215 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
dependencies = (
);
name = HGPersonalCenter;
productName = HGPersonalCenter;
productReference = D24F5E281EF3D9CD0011AB07 /* HGPersonalCenter.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
D24F5E201EF3D9CD0011AB07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = mint_bin;
TargetAttributes = {
D24F5E271EF3D9CD0011AB07 = {
CreatedOnToolsVersion = 8.3.2;
ProvisioningStyle = Manual;
};
};
};
buildConfigurationList = D24F5E231EF3D9CD0011AB07 /* Build configuration list for PBXProject "HGPersonalCenter" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
mainGroup = D24F5E1F1EF3D9CD0011AB07;
productRefGroup = D24F5E291EF3D9CD0011AB07 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
D24F5E271EF3D9CD0011AB07 /* HGPersonalCenter */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
D24F5E261EF3D9CD0011AB07 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D24F5E3B1EF3D9CD0011AB07 /* LaunchScreen.storyboard in Resources */,
A9E72A6D21E5CE4F008F7ACA /* Main.storyboard in Resources */,
D24F5E381EF3D9CD0011AB07 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
A30EAEF5BE177E55011AF215 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-HGPersonalCenter/Pods-HGPersonalCenter-resources.sh",
"${PODS_ROOT}/GKNavigationBarViewController/GKNavigationBarViewController/GKNavigationBarViewController.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GKNavigationBarViewController.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HGPersonalCenter/Pods-HGPersonalCenter-resources.sh\"\n";
showEnvVarsInLog = 0;
};
D925C69D94FFF40FCB2D437E /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-HGPersonalCenter-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
D24F5E241EF3D9CD0011AB07 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
A9FFE91623EBEB4C0062398C /* HGDeviceHelper.m in Sources */,
A9FB4F3F228EBB2800525B36 /* HGHeaderImageView.m in Sources */,
D24F5E301EF3D9CD0011AB07 /* AppDelegate.m in Sources */,
A9F80B8321DF0113000334BE /* HGBaseViewController.m in Sources */,
A9FB4F3B228EB92500525B36 /* HGMessageViewController.m in Sources */,
A9FFE91923EC09800062398C /* HGNestedScrollViewController.m in Sources */,
A9F80B8721DF0113000334BE /* HGFirstViewController.m in Sources */,
A9F80B8921DF0113000334BE /* HGSecondViewController.m in Sources */,
A9F80B8821DF0113000334BE /* HGThirdViewController.m in Sources */,
A9F80B9121DF0113000334BE /* HGHomeViewController.m in Sources */,
D24F5E2D1EF3D9CD0011AB07 /* main.m in Sources */,
A9F80B8521DF0113000334BE /* HGPersonalCenterViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
A9E72A6B21E5CE4F008F7ACA /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
A9E72A6C21E5CE4F008F7ACA /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
D24F5E391EF3D9CD0011AB07 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
D24F5E3A1EF3D9CD0011AB07 /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
D24F5E3D1EF3D9CD0011AB07 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
D24F5E3E1EF3D9CD0011AB07 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
D24F5E401EF3D9CD0011AB07 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = EEC61715961AFF357FFAE7F5 /* Pods-HGPersonalCenter.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
GCC_PREFIX_HEADER = "$(SRCROOT)/HGPersonalCenter/PrefixHeader.pch";
INFOPLIST_FILE = HGPersonalCenter/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.mint.HGPersonalCenter;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
};
name = Debug;
};
D24F5E411EF3D9CD0011AB07 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = D8C0A4C5A30C82D2D3EF880E /* Pods-HGPersonalCenter.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
GCC_PREFIX_HEADER = "$(SRCROOT)/HGPersonalCenter/PrefixHeader.pch";
INFOPLIST_FILE = HGPersonalCenter/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.mint.HGPersonalCenter;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
D24F5E231EF3D9CD0011AB07 /* Build configuration list for PBXProject "HGPersonalCenter" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D24F5E3D1EF3D9CD0011AB07 /* Debug */,
D24F5E3E1EF3D9CD0011AB07 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D24F5E3F1EF3D9CD0011AB07 /* Build configuration list for PBXNativeTarget "HGPersonalCenter" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D24F5E401EF3D9CD0011AB07 /* Debug */,
D24F5E411EF3D9CD0011AB07 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = D24F5E201EF3D9CD0011AB07 /* Project object */;
}
================================================
FILE: HGPersonalCenter.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:PersonalCenter.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: HGPersonalCenter.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:HGPersonalCenter.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2017 mint_bin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: Podfile
================================================
# Uncomment the next line to define a global platform for your project
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
inhibit_all_warnings!
target 'HGPersonalCenter' do
pod 'HGPersonalCenterExtend', '~> 1.3.2'
pod 'GKNavigationBarViewController', '~> 3.0.0'
pod 'FDFullscreenPopGesture', '~> 1.1'
end
================================================
FILE: README.md
================================================
# HGPersonalCenter
## Requirements
- iOS 9.0+
- Objective-C
- Xcode 10+
## Installation
我通过自己另一个支持`CocoaPods`的库快速集成 - [HGPersonalCenterExtend](https://github.com/ArchLL/HGPersonalCenterExtend)
```ruby
pod 'HGPersonalCenterExtend', '~> 1.3.2'
```
## Blog
[简书](https://www.jianshu.com/p/8b87837d9e3a)
## Show

## Usage
主要逻辑已经封装到`HGNestedScrollViewController`中,稍加改动即可将其添加到项目中使用,使用请参照`HGPersonalCenterViewController`;
⚠️ 如果你的`pageViewController`下的`scrollView`是`UICollectionView`类型,需要进行如下设置:
```Objc
// collectionView的内容不满一屏时,为了避免categoryView在吸顶后页面在竖直方向滑动失效,需要进行如下设置:
_collectionView.alwaysBounceVertical = YES;
```
### 温馨提示
当时为了实验不同导航栏框架的效果,在该项目中引入了`GKNavigationBarViewController`,但是这个第三方库对代码侵入性较高,还有一些bug未解决(比如:在我这个项目的场景下系统左滑操作失效,不得已我接入了`FDFullscreenPopGesture`来解决这个问题;左滑返回时,导航栏会闪屏).
所以不建议大家在自己的项目中使用`GKNavigationBarViewController`,推荐使用`RTRootNavigationController`,可以参考[HGPersonalCenterExtend](https://github.com/ArchLL/HGPersonalCenterExtend)中的使用方法
## Author
Arch, mint_bin@163.com
## License
HGPersonalCenterExtend is available under the MIT license. See the LICENSE file for more info.
gitextract_30ifs8jp/ ├── .gitignore ├── HGPersonalCenter/ │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets/ │ │ ├── AppIcon.appiconset/ │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── back.imageset/ │ │ │ └── Contents.json │ │ ├── cartoon.imageset/ │ │ │ └── Contents.json │ │ ├── center_avatar.imageset/ │ │ │ └── Contents.json │ │ └── center_bg.imageset/ │ │ └── Contents.json │ ├── Base.lproj/ │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Controllers/ │ │ ├── BaseControllers/ │ │ │ ├── HGBaseViewController.h │ │ │ ├── HGBaseViewController.m │ │ │ ├── HGNestedScrollViewController.h │ │ │ └── HGNestedScrollViewController.m │ │ ├── HGHomeViewController.h │ │ ├── HGHomeViewController.m │ │ ├── HGMessageViewController.h │ │ ├── HGMessageViewController.m │ │ ├── HGPersonalCenterViewController.h │ │ ├── HGPersonalCenterViewController.m │ │ └── PageViewControllers/ │ │ ├── HGFirstViewController.h │ │ ├── HGFirstViewController.m │ │ ├── HGSecondViewController.h │ │ ├── HGSecondViewController.m │ │ ├── HGThirdViewController.h │ │ └── HGThirdViewController.m │ ├── HGMacro.h │ ├── Info.plist │ ├── PrefixHeader.pch │ ├── Tools/ │ │ ├── HGDeviceHelper.h │ │ └── HGDeviceHelper.m │ ├── Views/ │ │ ├── HGHeaderImageView.h │ │ └── HGHeaderImageView.m │ └── main.m ├── HGPersonalCenter.xcodeproj/ │ ├── project.pbxproj │ └── project.xcworkspace/ │ └── contents.xcworkspacedata ├── HGPersonalCenter.xcworkspace/ │ └── contents.xcworkspacedata ├── LICENSE ├── Podfile └── README.md
Condensed preview — 41 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (84K chars).
[
{
"path": ".gitignore",
"chars": 441,
"preview": "# Xcode\n#\n# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore..."
},
{
"path": "HGPersonalCenter/AppDelegate.h",
"chars": 278,
"preview": "//\n// AppDelegate.h\n// HGPersonalCenter\n//\n// Created by Arch on 2017/6/16.\n// Copyright © 2017年 mint_bin. All right..."
},
{
"path": "HGPersonalCenter/AppDelegate.m",
"chars": 2312,
"preview": "//\n// AppDelegate.m\n// PersonalCenter\n//\n// Created by Arch on 2017/6/16.\n// Copyright © 2017年 mint_bin. All rights..."
},
{
"path": "HGPersonalCenter/Assets.xcassets/AppIcon.appiconset/Contents.json",
"chars": 1590,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"iphone\",\n \"size\" : \"20x20\",\n \"scale\" : \"2x\"\n },\n {\n \"idiom\"..."
},
{
"path": "HGPersonalCenter/Assets.xcassets/Contents.json",
"chars": 62,
"preview": "{\n \"info\" : {\n \"version\" : 1,\n \"author\" : \"xcode\"\n }\n}"
},
{
"path": "HGPersonalCenter/Assets.xcassets/back.imageset/Contents.json",
"chars": 153,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"back.pdf\"\n }\n ],\n \"info\" : {\n \"version\"..."
},
{
"path": "HGPersonalCenter/Assets.xcassets/cartoon.imageset/Contents.json",
"chars": 156,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"cartoon.jpg\"\n }\n ],\n \"info\" : {\n \"versio..."
},
{
"path": "HGPersonalCenter/Assets.xcassets/center_avatar.imageset/Contents.json",
"chars": 163,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"center_avatar.jpeg\"\n }\n ],\n \"info\" : {..."
},
{
"path": "HGPersonalCenter/Assets.xcassets/center_bg.imageset/Contents.json",
"chars": 158,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"center_bg.jpg\"\n }\n ],\n \"info\" : {\n \"vers..."
},
{
"path": "HGPersonalCenter/Base.lproj/LaunchScreen.storyboard",
"chars": 3551,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3..."
},
{
"path": "HGPersonalCenter/Base.lproj/Main.storyboard",
"chars": 6896,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3..."
},
{
"path": "HGPersonalCenter/Controllers/BaseControllers/HGBaseViewController.h",
"chars": 240,
"preview": "//\n// HGBaseViewController.h\n// HGPersonalCenter\n//\n// Created by Arch on 2017/6/19.\n// Copyright © 2017年 mint_bin...."
},
{
"path": "HGPersonalCenter/Controllers/BaseControllers/HGBaseViewController.m",
"chars": 1714,
"preview": "//\n// HGBaseViewController.m\n// HGPersonalCenter\n//\n// Created by Arch on 2017/6/19.\n// Copyright © 2017年 mint_bin...."
},
{
"path": "HGPersonalCenter/Controllers/BaseControllers/HGNestedScrollViewController.h",
"chars": 720,
"preview": "//\n// HGNestedScrollViewController.h\n// HGPersonalCenterExtend\n//\n// Created by Arch on 2020/1/16.\n// Copyright © 20..."
},
{
"path": "HGPersonalCenter/Controllers/BaseControllers/HGNestedScrollViewController.m",
"chars": 6752,
"preview": "//\n// HGNestedScrollViewController.m\n// HGPersonalCenterExtend\n//\n// Created by Arch on 2020/1/16.\n// Copyright © 20..."
},
{
"path": "HGPersonalCenter/Controllers/HGHomeViewController.h",
"chars": 231,
"preview": "//\n// HGHomeViewController.h\n// HGPersonalCenter\n//\n// Created by Arch on 2017/6/16.\n// Copyright © 2017年 mint_bin...."
},
{
"path": "HGPersonalCenter/Controllers/HGHomeViewController.m",
"chars": 736,
"preview": "//\n// HGHomeViewController.m\n// HGPersonalCenter\n//\n// Created by Arch on 2017/6/16.\n// Copyright © 2017年 mint_bin...."
},
{
"path": "HGPersonalCenter/Controllers/HGMessageViewController.h",
"chars": 243,
"preview": "//\n// HGMessageViewController.h\n// HGPersonalCenter\n//\n// Created by Arch on 2019/5/15.\n// Copyright © 2019 mint_bin..."
},
{
"path": "HGPersonalCenter/Controllers/HGMessageViewController.m",
"chars": 357,
"preview": "//\n// HGMessageViewController.m\n// HGPersonalCenter\n//\n// Created by Arch on 2019/5/15.\n// Copyright © 2019 mint_bin..."
},
{
"path": "HGPersonalCenter/Controllers/HGPersonalCenterViewController.h",
"chars": 355,
"preview": "//\n// HGPersonalCenterViewController.h\n// HGPersonalCenter\n//\n// Created by Arch on 2017/6/16.\n// Copyright © 2017年..."
},
{
"path": "HGPersonalCenter/Controllers/HGPersonalCenterViewController.m",
"chars": 4093,
"preview": "//\n// HGPersonalCenterViewController.m\n// HGPersonalCenter\n//\n// Created by Arch on 2017/6/16.\n// Copyright © 2017年..."
},
{
"path": "HGPersonalCenter/Controllers/PageViewControllers/HGFirstViewController.h",
"chars": 242,
"preview": "//\n// HGFirstViewController.h\n// HGPersonalCenter\n//\n// Created by Arch on 2017/6/16.\n// Copyright © 2017年 mint_bin...."
},
{
"path": "HGPersonalCenter/Controllers/PageViewControllers/HGFirstViewController.m",
"chars": 1711,
"preview": "//\n// HGFirstViewController.m\n// HGPersonalCenter\n//\n// Created by Arch on 2017/6/16.\n// Copyright © 2017年 mint_bin...."
},
{
"path": "HGPersonalCenter/Controllers/PageViewControllers/HGSecondViewController.h",
"chars": 244,
"preview": "//\n// HGSecondViewController.h\n// HGPersonalCenter\n//\n// Created by Arch on 2017/6/16.\n// Copyright © 2017年 mint_bin..."
},
{
"path": "HGPersonalCenter/Controllers/PageViewControllers/HGSecondViewController.m",
"chars": 2000,
"preview": "//\n// HGSecondViewController.m\n// HGPersonalCenter\n//\n// Created by Arch on 2017/6/16.\n// Copyright © 2017年 mint_bin..."
},
{
"path": "HGPersonalCenter/Controllers/PageViewControllers/HGThirdViewController.h",
"chars": 242,
"preview": "//\n// HGThirdViewController.h\n// HGPersonalCenter\n//\n// Created by Arch on 2017/6/16.\n// Copyright © 2017年 mint_bin...."
},
{
"path": "HGPersonalCenter/Controllers/PageViewControllers/HGThirdViewController.m",
"chars": 2498,
"preview": "//\n// HGThirdViewController.m\n// HGPersonalCenter\n//\n// Created by Arch on 2017/6/16.\n// Copyright © 2017年 mint_bin...."
},
{
"path": "HGPersonalCenter/HGMacro.h",
"chars": 982,
"preview": "//\n// HGMacro.h\n// HGPersonalCenterExtend\n//\n// Created by Arch on 2019/5/15.\n// Copyright © 2019 mint_bin@163.com...."
},
{
"path": "HGPersonalCenter/Info.plist",
"chars": 1470,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P..."
},
{
"path": "HGPersonalCenter/PrefixHeader.pch",
"chars": 606,
"preview": "//\n// PrefixHeader.pch\n// HGPersonalCenter\n//\n// Created by Arch on 2017/9/15.\n// Copyright © 2017年 mint_bin. All ri..."
},
{
"path": "HGPersonalCenter/Tools/HGDeviceHelper.h",
"chars": 403,
"preview": "//\n// HGDeviceHelper.h\n// HGPersonalCenter\n//\n// Created by Arch on 2018/9/17.\n// Copyright © 2019 mint_bin@163.com...."
},
{
"path": "HGPersonalCenter/Tools/HGDeviceHelper.m",
"chars": 1628,
"preview": "//\n// HGDeviceHelper.m\n// HGPersonalCenter\n//\n// Created by Arch on 2018/9/17.\n// Copyright © 2019 mint_bin@163.com...."
},
{
"path": "HGPersonalCenter/Views/HGHeaderImageView.h",
"chars": 255,
"preview": "//\n// HGHeaderImageView.h\n// HGPersonalCenter\n//\n// Created by Arch on 2019/5/17.\n// Copyright © 2019 mint_bin. All..."
},
{
"path": "HGPersonalCenter/Views/HGHeaderImageView.m",
"chars": 2379,
"preview": "//\n// HGHeaderImageView.m\n// HGPersonalCenter\n//\n// Created by 黑色幽默 on 2019/5/17.\n// Copyright © 2019 mint_bin. All..."
},
{
"path": "HGPersonalCenter/main.m",
"chars": 336,
"preview": "//\n// main.m\n// HGPersonalCenter\n//\n// Created by Arch on 2017/6/16.\n// Copyright © 2017年 mint_bin. All rights reser..."
},
{
"path": "HGPersonalCenter.xcodeproj/project.pbxproj",
"chars": 26738,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *..."
},
{
"path": "HGPersonalCenter.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 159,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:PersonalCenter...."
},
{
"path": "HGPersonalCenter.xcworkspace/contents.xcworkspacedata",
"chars": 234,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"group:HGPersonalCent..."
},
{
"path": "LICENSE",
"chars": 1065,
"preview": "MIT License\n\nCopyright (c) 2017 mint_bin\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\no..."
},
{
"path": "Podfile",
"chars": 334,
"preview": "# Uncomment the next line to define a global platform for your project\nsource 'https://github.com/CocoaPods/Specs.git'..."
},
{
"path": "README.md",
"chars": 1184,
"preview": "# HGPersonalCenter\n\n## Requirements\n\n- iOS 9.0+ \n- Objective-C\n- Xcode 10+\n\n## Installation\n我通过自己另一个支持`CocoaPods`的库快速集成..."
}
]
About this extraction
This page contains the full source code of the ArchLL/HGPersonalCenter GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 41 files (74.1 KB), approximately 22.8k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.