├── .gitignore ├── Cartfile ├── Cartfile.resolved ├── Carthage └── Checkouts │ ├── ElegantTableView │ ├── .gitignore │ ├── Carthage │ │ └── Build │ ├── ElegantTableView │ │ ├── ElegantTableViewGenerator.h │ │ └── ElegantTableViewGenerator.m │ ├── ElegantTableViewDemo.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── ElegantTableViewFramework.xcscheme │ ├── ElegantTableViewDemo │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── ViewController.h │ │ ├── ViewController.m │ │ └── main.m │ ├── ElegantTableViewFramework │ │ ├── ElegantTableViewFramework.h │ │ └── Info.plist │ ├── LICENSE │ └── README.md │ └── YJCommonMacro │ ├── .gitignore │ ├── LICENSE │ ├── OCCommonMacroFramework │ ├── Info.plist │ └── OCCommonMacroFramework.h │ ├── README.md │ ├── YJCommonMacro.podspec │ ├── YJCommonMacro │ └── OCCommonMacro.h │ ├── YJCommonMacroGather.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── OCCommonMacroFramework.xcscheme │ └── YJCommonMacroGather │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── LICENSE ├── README.md ├── iOS11Adaptation.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata └── iOS11Adaptation ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets └── AppIcon.appiconset │ └── Contents.json ├── Base.lproj ├── LaunchScreen.storyboard └── Main.storyboard ├── Info.plist ├── MainViewController.h ├── MainViewController.m ├── PrefixHeader.pch ├── Resources └── images │ └── 01.png ├── SubTableViewController.h ├── SubTableViewController.m ├── YJNavigationBar.h ├── YJNavigationBar.m ├── YJNavigationController.h ├── YJNavigationController.m └── main.m /.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 | .DS_Store 25 | 26 | ## Obj-C/Swift specific 27 | *.hmap 28 | *.ipa 29 | *.dSYM.zip 30 | *.dSYM 31 | 32 | # CocoaPods 33 | # 34 | # We recommend against adding the Pods directory to your .gitignore. However 35 | # you should judge for yourself, the pros and cons are mentioned at: 36 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 37 | # 38 | # Pods/ 39 | 40 | # Carthage 41 | # 42 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 43 | # Carthage/Checkouts 44 | 45 | Carthage/Build 46 | 47 | # fastlane 48 | # 49 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 50 | # screenshots whenever they are needed. 51 | # For more information about the recommended setup visit: 52 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 53 | 54 | fastlane/report.xml 55 | fastlane/Preview.html 56 | fastlane/screenshots 57 | fastlane/test_output 58 | 59 | # Code Injection 60 | # 61 | # After new code Injection tools there's a generated folder /iOSInjectionProject 62 | # https://github.com/johnno1962/injectionforxcode 63 | 64 | iOSInjectionProject/ 65 | -------------------------------------------------------------------------------- /Cartfile: -------------------------------------------------------------------------------- 1 | github "stackhou/ElegantTableView" 2 | github "YJManager/YJCommonMacro" -------------------------------------------------------------------------------- /Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "YJManager/YJCommonMacro" "0.0.5" 2 | github "stackhou/ElegantTableView" "0.0.1" 3 | -------------------------------------------------------------------------------- /Carthage/Checkouts/ElegantTableView/.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 | *.xcuserstate 23 | *.DS_Store 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | # CocoaPods 32 | # 33 | # We recommend against adding the Pods directory to your .gitignore. However 34 | # you should judge for yourself, the pros and cons are mentioned at: 35 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 36 | # 37 | # Pods/ 38 | 39 | # Carthage 40 | # 41 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 42 | # Carthage/Checkouts 43 | 44 | Carthage/Build 45 | 46 | # fastlane 47 | # 48 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 49 | # screenshots whenever they are needed. 50 | # For more information about the recommended setup visit: 51 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 52 | 53 | fastlane/report.xml 54 | fastlane/screenshots 55 | 56 | #Code Injection 57 | # 58 | # After new code Injection tools there's a generated folder /iOSInjectionProject 59 | # https://github.com/johnno1962/injectionforxcode 60 | 61 | iOSInjectionProject/ 62 | -------------------------------------------------------------------------------- /Carthage/Checkouts/ElegantTableView/Carthage/Build: -------------------------------------------------------------------------------- 1 | ../../../../Carthage/Build -------------------------------------------------------------------------------- /Carthage/Checkouts/ElegantTableView/ElegantTableView/ElegantTableViewGenerator.h: -------------------------------------------------------------------------------- 1 | // 2 | // ElegantTableViewGenerator.h 3 | // ElegantTableViewDemo 4 | // 5 | // Created by YJHou on 2017/7/3. 6 | // Copyright © 2017年 侯跃军. All rights reserved. 7 | // 一个实例方法 创建简单的 TableView 8 | 9 | /** 10 | 版本号: 0.0.1 11 | */ 12 | 13 | #import 14 | 15 | typedef void(^didSelectRowHandleBlock)(UITableView *tableView, NSIndexPath *indexPath); 16 | typedef void(^didScrollHandleBlock)(UIScrollView *tableView, CGPoint contentOffset); 17 | 18 | @interface ElegantTableViewGenerator : NSObject 19 | 20 | /** 单例 */ 21 | + (ElegantTableViewGenerator *)shareInstance; 22 | 23 | /** 创建tableView */ 24 | - (UITableView *)createTableViewWithTitles:(NSArray *)titles 25 | subTitles:(NSArray *)subTitles 26 | rowHeight:(CGFloat)rowHeight 27 | superView:(UIView *)superView 28 | didSelectRowBlock:(didSelectRowHandleBlock)didSelectRowBlock 29 | didScrollBlock:(didScrollHandleBlock)didScrollBlock; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Carthage/Checkouts/ElegantTableView/ElegantTableView/ElegantTableViewGenerator.m: -------------------------------------------------------------------------------- 1 | // 2 | // ElegantTableViewGenerator.m 3 | // ElegantTableViewDemo 4 | // 5 | // Created by YJHou on 2017/7/3. 6 | // Copyright © 2017年 侯跃军. All rights reserved. 7 | // 8 | 9 | #import "ElegantTableViewGenerator.h" 10 | 11 | @interface ElegantTableViewGenerator () 12 | 13 | @property (nonatomic, strong) NSMutableArray *titles; /**< 主数据源 */ 14 | @property (nonatomic, strong) NSMutableArray *subTitles; /**< 主数据源 */ 15 | @property (nonatomic, copy) didSelectRowHandleBlock didselectRowBlock; /**< 点击row */ 16 | @property (nonatomic, copy) didScrollHandleBlock didScrollBlock; /**< 滚动block */ 17 | 18 | @end 19 | 20 | @implementation ElegantTableViewGenerator 21 | 22 | + (ElegantTableViewGenerator *)shareInstance{ 23 | static ElegantTableViewGenerator *_instance = nil; 24 | static dispatch_once_t onceToken; 25 | dispatch_once(&onceToken, ^{ 26 | _instance = [[ElegantTableViewGenerator alloc] init]; 27 | }); 28 | return _instance; 29 | } 30 | 31 | - (UITableView *)createTableViewWithTitles:(NSArray *)titles 32 | subTitles:(NSArray *)subTitles 33 | rowHeight:(CGFloat)rowHeight 34 | superView:(UIView *)superView 35 | didSelectRowBlock:(didSelectRowHandleBlock)didSelectRowBlock 36 | didScrollBlock:(didScrollHandleBlock)didScrollBlock{ 37 | 38 | self.titles = [NSMutableArray arrayWithArray:titles]; 39 | self.subTitles = [NSMutableArray arrayWithArray:subTitles]; 40 | self.didselectRowBlock = didSelectRowBlock; 41 | self.didScrollBlock = didScrollBlock; 42 | 43 | UITableView *tableView = [[UITableView alloc] initWithFrame:superView.bounds style:UITableViewStylePlain]; 44 | tableView.delegate = self; 45 | tableView.dataSource = self; 46 | tableView.rowHeight = rowHeight; 47 | tableView.tableFooterView = [UIView new]; 48 | [superView addSubview:tableView]; 49 | return tableView; 50 | } 51 | 52 | #pragma mark - UITableViewDataSource 53 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 54 | return self.titles.count; 55 | } 56 | 57 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 58 | 59 | NSString * cellId = @"ElegantTableViewGeneratorCellId"; 60 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId]; 61 | if (cell == nil) { 62 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellId]; 63 | cell.selectionStyle = UITableViewCellSelectionStyleNone; 64 | } 65 | 66 | cell.textLabel.text = [self.titles objectAtIndex:indexPath.row]; 67 | 68 | if (self.subTitles.count > 0) { 69 | if (indexPath.row > self.subTitles.count) { 70 | cell.detailTextLabel.text = @""; 71 | }else{ 72 | cell.detailTextLabel.text = [self.subTitles objectAtIndex:indexPath.row]; 73 | } 74 | } 75 | 76 | return cell; 77 | } 78 | 79 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 80 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 81 | if (self.didselectRowBlock) { 82 | self.didselectRowBlock(tableView, indexPath); 83 | } 84 | } 85 | 86 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView { 87 | if (self.didScrollBlock) { 88 | self.didScrollBlock(scrollView, scrollView.contentOffset); 89 | } 90 | } 91 | 92 | #pragma mark - Lazy 93 | - (NSMutableArray *)titles{ 94 | if (!_titles) { 95 | _titles = [NSMutableArray array]; 96 | } 97 | return _titles; 98 | } 99 | 100 | - (NSMutableArray *)subTitles{ 101 | if (!_subTitles) { 102 | _subTitles = [NSMutableArray array]; 103 | } 104 | return _subTitles; 105 | } 106 | 107 | 108 | @end 109 | -------------------------------------------------------------------------------- /Carthage/Checkouts/ElegantTableView/ElegantTableViewDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 6307D6FB1F09F55200CF1EAD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6307D6FA1F09F55200CF1EAD /* main.m */; }; 11 | 6307D6FE1F09F55200CF1EAD /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6307D6FD1F09F55200CF1EAD /* AppDelegate.m */; }; 12 | 6307D7011F09F55200CF1EAD /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6307D7001F09F55200CF1EAD /* ViewController.m */; }; 13 | 6307D7041F09F55200CF1EAD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6307D7021F09F55200CF1EAD /* Main.storyboard */; }; 14 | 6307D7061F09F55200CF1EAD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6307D7051F09F55200CF1EAD /* Assets.xcassets */; }; 15 | 6307D7091F09F55200CF1EAD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6307D7071F09F55200CF1EAD /* LaunchScreen.storyboard */; }; 16 | 6307D7131F09F63C00CF1EAD /* ElegantTableViewGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 6307D7121F09F63C00CF1EAD /* ElegantTableViewGenerator.m */; }; 17 | 6307D7201F0A0BF100CF1EAD /* ElegantTableView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6307D7191F0A0BF100CF1EAD /* ElegantTableView.framework */; }; 18 | 6307D7211F0A0BF100CF1EAD /* ElegantTableView.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 6307D7191F0A0BF100CF1EAD /* ElegantTableView.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 19 | 6307D7261F0A0C1600CF1EAD /* ElegantTableViewGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 6307D7111F09F63C00CF1EAD /* ElegantTableViewGenerator.h */; settings = {ATTRIBUTES = (Public, ); }; }; 20 | 6307D7271F0A0C1D00CF1EAD /* ElegantTableViewGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 6307D7121F09F63C00CF1EAD /* ElegantTableViewGenerator.m */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXContainerItemProxy section */ 24 | 6307D71E1F0A0BF100CF1EAD /* PBXContainerItemProxy */ = { 25 | isa = PBXContainerItemProxy; 26 | containerPortal = 6307D6EE1F09F55200CF1EAD /* Project object */; 27 | proxyType = 1; 28 | remoteGlobalIDString = 6307D7181F0A0BF100CF1EAD; 29 | remoteInfo = ElegantTableViewFramework; 30 | }; 31 | /* End PBXContainerItemProxy section */ 32 | 33 | /* Begin PBXCopyFilesBuildPhase section */ 34 | 6307D7251F0A0BF100CF1EAD /* Embed Frameworks */ = { 35 | isa = PBXCopyFilesBuildPhase; 36 | buildActionMask = 2147483647; 37 | dstPath = ""; 38 | dstSubfolderSpec = 10; 39 | files = ( 40 | 6307D7211F0A0BF100CF1EAD /* ElegantTableView.framework in Embed Frameworks */, 41 | ); 42 | name = "Embed Frameworks"; 43 | runOnlyForDeploymentPostprocessing = 0; 44 | }; 45 | /* End PBXCopyFilesBuildPhase section */ 46 | 47 | /* Begin PBXFileReference section */ 48 | 6307D6F61F09F55200CF1EAD /* ElegantTableViewDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ElegantTableViewDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 6307D6FA1F09F55200CF1EAD /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 50 | 6307D6FC1F09F55200CF1EAD /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 51 | 6307D6FD1F09F55200CF1EAD /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 52 | 6307D6FF1F09F55200CF1EAD /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 53 | 6307D7001F09F55200CF1EAD /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 54 | 6307D7031F09F55200CF1EAD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 55 | 6307D7051F09F55200CF1EAD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 56 | 6307D7081F09F55200CF1EAD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 57 | 6307D70A1F09F55200CF1EAD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | 6307D7111F09F63C00CF1EAD /* ElegantTableViewGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ElegantTableViewGenerator.h; sourceTree = ""; }; 59 | 6307D7121F09F63C00CF1EAD /* ElegantTableViewGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ElegantTableViewGenerator.m; sourceTree = ""; }; 60 | 6307D7191F0A0BF100CF1EAD /* ElegantTableView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ElegantTableView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 61 | 6307D71B1F0A0BF100CF1EAD /* ElegantTableViewFramework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ElegantTableViewFramework.h; sourceTree = ""; }; 62 | 6307D71C1F0A0BF100CF1EAD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 63 | /* End PBXFileReference section */ 64 | 65 | /* Begin PBXFrameworksBuildPhase section */ 66 | 6307D6F31F09F55200CF1EAD /* Frameworks */ = { 67 | isa = PBXFrameworksBuildPhase; 68 | buildActionMask = 2147483647; 69 | files = ( 70 | 6307D7201F0A0BF100CF1EAD /* ElegantTableView.framework in Frameworks */, 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | 6307D7151F0A0BF100CF1EAD /* Frameworks */ = { 75 | isa = PBXFrameworksBuildPhase; 76 | buildActionMask = 2147483647; 77 | files = ( 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | /* End PBXFrameworksBuildPhase section */ 82 | 83 | /* Begin PBXGroup section */ 84 | 6307D6ED1F09F55200CF1EAD = { 85 | isa = PBXGroup; 86 | children = ( 87 | 6307D7101F09F5EA00CF1EAD /* ElegantTableView */, 88 | 6307D6F81F09F55200CF1EAD /* ElegantTableViewDemo */, 89 | 6307D71A1F0A0BF100CF1EAD /* ElegantTableViewFramework */, 90 | 6307D6F71F09F55200CF1EAD /* Products */, 91 | ); 92 | sourceTree = ""; 93 | }; 94 | 6307D6F71F09F55200CF1EAD /* Products */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 6307D6F61F09F55200CF1EAD /* ElegantTableViewDemo.app */, 98 | 6307D7191F0A0BF100CF1EAD /* ElegantTableView.framework */, 99 | ); 100 | name = Products; 101 | sourceTree = ""; 102 | }; 103 | 6307D6F81F09F55200CF1EAD /* ElegantTableViewDemo */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 6307D6FC1F09F55200CF1EAD /* AppDelegate.h */, 107 | 6307D6FD1F09F55200CF1EAD /* AppDelegate.m */, 108 | 6307D6FF1F09F55200CF1EAD /* ViewController.h */, 109 | 6307D7001F09F55200CF1EAD /* ViewController.m */, 110 | 6307D7021F09F55200CF1EAD /* Main.storyboard */, 111 | 6307D7051F09F55200CF1EAD /* Assets.xcassets */, 112 | 6307D7071F09F55200CF1EAD /* LaunchScreen.storyboard */, 113 | 6307D70A1F09F55200CF1EAD /* Info.plist */, 114 | 6307D6F91F09F55200CF1EAD /* Supporting Files */, 115 | ); 116 | path = ElegantTableViewDemo; 117 | sourceTree = ""; 118 | }; 119 | 6307D6F91F09F55200CF1EAD /* Supporting Files */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 6307D6FA1F09F55200CF1EAD /* main.m */, 123 | ); 124 | name = "Supporting Files"; 125 | sourceTree = ""; 126 | }; 127 | 6307D7101F09F5EA00CF1EAD /* ElegantTableView */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | 6307D7111F09F63C00CF1EAD /* ElegantTableViewGenerator.h */, 131 | 6307D7121F09F63C00CF1EAD /* ElegantTableViewGenerator.m */, 132 | ); 133 | path = ElegantTableView; 134 | sourceTree = ""; 135 | }; 136 | 6307D71A1F0A0BF100CF1EAD /* ElegantTableViewFramework */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 6307D71B1F0A0BF100CF1EAD /* ElegantTableViewFramework.h */, 140 | 6307D71C1F0A0BF100CF1EAD /* Info.plist */, 141 | ); 142 | path = ElegantTableViewFramework; 143 | sourceTree = ""; 144 | }; 145 | /* End PBXGroup section */ 146 | 147 | /* Begin PBXHeadersBuildPhase section */ 148 | 6307D7161F0A0BF100CF1EAD /* Headers */ = { 149 | isa = PBXHeadersBuildPhase; 150 | buildActionMask = 2147483647; 151 | files = ( 152 | 6307D7261F0A0C1600CF1EAD /* ElegantTableViewGenerator.h in Headers */, 153 | ); 154 | runOnlyForDeploymentPostprocessing = 0; 155 | }; 156 | /* End PBXHeadersBuildPhase section */ 157 | 158 | /* Begin PBXNativeTarget section */ 159 | 6307D6F51F09F55200CF1EAD /* ElegantTableViewDemo */ = { 160 | isa = PBXNativeTarget; 161 | buildConfigurationList = 6307D70D1F09F55200CF1EAD /* Build configuration list for PBXNativeTarget "ElegantTableViewDemo" */; 162 | buildPhases = ( 163 | 6307D6F21F09F55200CF1EAD /* Sources */, 164 | 6307D6F31F09F55200CF1EAD /* Frameworks */, 165 | 6307D6F41F09F55200CF1EAD /* Resources */, 166 | 6307D7251F0A0BF100CF1EAD /* Embed Frameworks */, 167 | ); 168 | buildRules = ( 169 | ); 170 | dependencies = ( 171 | 6307D71F1F0A0BF100CF1EAD /* PBXTargetDependency */, 172 | ); 173 | name = ElegantTableViewDemo; 174 | productName = ElegantTableViewDemo; 175 | productReference = 6307D6F61F09F55200CF1EAD /* ElegantTableViewDemo.app */; 176 | productType = "com.apple.product-type.application"; 177 | }; 178 | 6307D7181F0A0BF100CF1EAD /* ElegantTableViewFramework */ = { 179 | isa = PBXNativeTarget; 180 | buildConfigurationList = 6307D7221F0A0BF100CF1EAD /* Build configuration list for PBXNativeTarget "ElegantTableViewFramework" */; 181 | buildPhases = ( 182 | 6307D7141F0A0BF100CF1EAD /* Sources */, 183 | 6307D7151F0A0BF100CF1EAD /* Frameworks */, 184 | 6307D7161F0A0BF100CF1EAD /* Headers */, 185 | 6307D7171F0A0BF100CF1EAD /* Resources */, 186 | ); 187 | buildRules = ( 188 | ); 189 | dependencies = ( 190 | ); 191 | name = ElegantTableViewFramework; 192 | productName = ElegantTableViewFramework; 193 | productReference = 6307D7191F0A0BF100CF1EAD /* ElegantTableView.framework */; 194 | productType = "com.apple.product-type.framework"; 195 | }; 196 | /* End PBXNativeTarget section */ 197 | 198 | /* Begin PBXProject section */ 199 | 6307D6EE1F09F55200CF1EAD /* Project object */ = { 200 | isa = PBXProject; 201 | attributes = { 202 | LastUpgradeCheck = 0830; 203 | ORGANIZATIONNAME = "侯跃军"; 204 | TargetAttributes = { 205 | 6307D6F51F09F55200CF1EAD = { 206 | CreatedOnToolsVersion = 8.3.3; 207 | DevelopmentTeam = 33K3DU6932; 208 | ProvisioningStyle = Automatic; 209 | }; 210 | 6307D7181F0A0BF100CF1EAD = { 211 | CreatedOnToolsVersion = 8.3.3; 212 | DevelopmentTeam = 33K3DU6932; 213 | ProvisioningStyle = Automatic; 214 | }; 215 | }; 216 | }; 217 | buildConfigurationList = 6307D6F11F09F55200CF1EAD /* Build configuration list for PBXProject "ElegantTableViewDemo" */; 218 | compatibilityVersion = "Xcode 3.2"; 219 | developmentRegion = English; 220 | hasScannedForEncodings = 0; 221 | knownRegions = ( 222 | en, 223 | Base, 224 | ); 225 | mainGroup = 6307D6ED1F09F55200CF1EAD; 226 | productRefGroup = 6307D6F71F09F55200CF1EAD /* Products */; 227 | projectDirPath = ""; 228 | projectRoot = ""; 229 | targets = ( 230 | 6307D6F51F09F55200CF1EAD /* ElegantTableViewDemo */, 231 | 6307D7181F0A0BF100CF1EAD /* ElegantTableViewFramework */, 232 | ); 233 | }; 234 | /* End PBXProject section */ 235 | 236 | /* Begin PBXResourcesBuildPhase section */ 237 | 6307D6F41F09F55200CF1EAD /* Resources */ = { 238 | isa = PBXResourcesBuildPhase; 239 | buildActionMask = 2147483647; 240 | files = ( 241 | 6307D7091F09F55200CF1EAD /* LaunchScreen.storyboard in Resources */, 242 | 6307D7061F09F55200CF1EAD /* Assets.xcassets in Resources */, 243 | 6307D7041F09F55200CF1EAD /* Main.storyboard in Resources */, 244 | ); 245 | runOnlyForDeploymentPostprocessing = 0; 246 | }; 247 | 6307D7171F0A0BF100CF1EAD /* Resources */ = { 248 | isa = PBXResourcesBuildPhase; 249 | buildActionMask = 2147483647; 250 | files = ( 251 | ); 252 | runOnlyForDeploymentPostprocessing = 0; 253 | }; 254 | /* End PBXResourcesBuildPhase section */ 255 | 256 | /* Begin PBXSourcesBuildPhase section */ 257 | 6307D6F21F09F55200CF1EAD /* Sources */ = { 258 | isa = PBXSourcesBuildPhase; 259 | buildActionMask = 2147483647; 260 | files = ( 261 | 6307D7131F09F63C00CF1EAD /* ElegantTableViewGenerator.m in Sources */, 262 | 6307D7011F09F55200CF1EAD /* ViewController.m in Sources */, 263 | 6307D6FE1F09F55200CF1EAD /* AppDelegate.m in Sources */, 264 | 6307D6FB1F09F55200CF1EAD /* main.m in Sources */, 265 | ); 266 | runOnlyForDeploymentPostprocessing = 0; 267 | }; 268 | 6307D7141F0A0BF100CF1EAD /* Sources */ = { 269 | isa = PBXSourcesBuildPhase; 270 | buildActionMask = 2147483647; 271 | files = ( 272 | 6307D7271F0A0C1D00CF1EAD /* ElegantTableViewGenerator.m in Sources */, 273 | ); 274 | runOnlyForDeploymentPostprocessing = 0; 275 | }; 276 | /* End PBXSourcesBuildPhase section */ 277 | 278 | /* Begin PBXTargetDependency section */ 279 | 6307D71F1F0A0BF100CF1EAD /* PBXTargetDependency */ = { 280 | isa = PBXTargetDependency; 281 | target = 6307D7181F0A0BF100CF1EAD /* ElegantTableViewFramework */; 282 | targetProxy = 6307D71E1F0A0BF100CF1EAD /* PBXContainerItemProxy */; 283 | }; 284 | /* End PBXTargetDependency section */ 285 | 286 | /* Begin PBXVariantGroup section */ 287 | 6307D7021F09F55200CF1EAD /* Main.storyboard */ = { 288 | isa = PBXVariantGroup; 289 | children = ( 290 | 6307D7031F09F55200CF1EAD /* Base */, 291 | ); 292 | name = Main.storyboard; 293 | sourceTree = ""; 294 | }; 295 | 6307D7071F09F55200CF1EAD /* LaunchScreen.storyboard */ = { 296 | isa = PBXVariantGroup; 297 | children = ( 298 | 6307D7081F09F55200CF1EAD /* Base */, 299 | ); 300 | name = LaunchScreen.storyboard; 301 | sourceTree = ""; 302 | }; 303 | /* End PBXVariantGroup section */ 304 | 305 | /* Begin XCBuildConfiguration section */ 306 | 6307D70B1F09F55200CF1EAD /* Debug */ = { 307 | isa = XCBuildConfiguration; 308 | buildSettings = { 309 | ALWAYS_SEARCH_USER_PATHS = NO; 310 | CLANG_ANALYZER_NONNULL = YES; 311 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 312 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 313 | CLANG_CXX_LIBRARY = "libc++"; 314 | CLANG_ENABLE_MODULES = YES; 315 | CLANG_ENABLE_OBJC_ARC = YES; 316 | CLANG_WARN_BOOL_CONVERSION = YES; 317 | CLANG_WARN_CONSTANT_CONVERSION = YES; 318 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 319 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 320 | CLANG_WARN_EMPTY_BODY = YES; 321 | CLANG_WARN_ENUM_CONVERSION = YES; 322 | CLANG_WARN_INFINITE_RECURSION = YES; 323 | CLANG_WARN_INT_CONVERSION = YES; 324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 325 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 326 | CLANG_WARN_UNREACHABLE_CODE = YES; 327 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 328 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 329 | COPY_PHASE_STRIP = NO; 330 | DEBUG_INFORMATION_FORMAT = dwarf; 331 | ENABLE_STRICT_OBJC_MSGSEND = YES; 332 | ENABLE_TESTABILITY = YES; 333 | GCC_C_LANGUAGE_STANDARD = gnu99; 334 | GCC_DYNAMIC_NO_PIC = NO; 335 | GCC_NO_COMMON_BLOCKS = YES; 336 | GCC_OPTIMIZATION_LEVEL = 0; 337 | GCC_PREPROCESSOR_DEFINITIONS = ( 338 | "DEBUG=1", 339 | "$(inherited)", 340 | ); 341 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 342 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 343 | GCC_WARN_UNDECLARED_SELECTOR = YES; 344 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 345 | GCC_WARN_UNUSED_FUNCTION = YES; 346 | GCC_WARN_UNUSED_VARIABLE = YES; 347 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 348 | MTL_ENABLE_DEBUG_INFO = YES; 349 | ONLY_ACTIVE_ARCH = YES; 350 | SDKROOT = iphoneos; 351 | }; 352 | name = Debug; 353 | }; 354 | 6307D70C1F09F55200CF1EAD /* Release */ = { 355 | isa = XCBuildConfiguration; 356 | buildSettings = { 357 | ALWAYS_SEARCH_USER_PATHS = NO; 358 | CLANG_ANALYZER_NONNULL = YES; 359 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 360 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 361 | CLANG_CXX_LIBRARY = "libc++"; 362 | CLANG_ENABLE_MODULES = YES; 363 | CLANG_ENABLE_OBJC_ARC = YES; 364 | CLANG_WARN_BOOL_CONVERSION = YES; 365 | CLANG_WARN_CONSTANT_CONVERSION = YES; 366 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 367 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 368 | CLANG_WARN_EMPTY_BODY = YES; 369 | CLANG_WARN_ENUM_CONVERSION = YES; 370 | CLANG_WARN_INFINITE_RECURSION = YES; 371 | CLANG_WARN_INT_CONVERSION = YES; 372 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 373 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 374 | CLANG_WARN_UNREACHABLE_CODE = YES; 375 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 376 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 377 | COPY_PHASE_STRIP = NO; 378 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 379 | ENABLE_NS_ASSERTIONS = NO; 380 | ENABLE_STRICT_OBJC_MSGSEND = YES; 381 | GCC_C_LANGUAGE_STANDARD = gnu99; 382 | GCC_NO_COMMON_BLOCKS = YES; 383 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 384 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 385 | GCC_WARN_UNDECLARED_SELECTOR = YES; 386 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 387 | GCC_WARN_UNUSED_FUNCTION = YES; 388 | GCC_WARN_UNUSED_VARIABLE = YES; 389 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 390 | MTL_ENABLE_DEBUG_INFO = NO; 391 | SDKROOT = iphoneos; 392 | VALIDATE_PRODUCT = YES; 393 | }; 394 | name = Release; 395 | }; 396 | 6307D70E1F09F55200CF1EAD /* Debug */ = { 397 | isa = XCBuildConfiguration; 398 | buildSettings = { 399 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 400 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 401 | DEVELOPMENT_TEAM = 33K3DU6932; 402 | INFOPLIST_FILE = ElegantTableViewDemo/Info.plist; 403 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 404 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 405 | PRODUCT_BUNDLE_IDENTIFIER = com.houmanager.de; 406 | PRODUCT_NAME = "$(TARGET_NAME)"; 407 | PROVISIONING_PROFILE_SPECIFIER = ""; 408 | }; 409 | name = Debug; 410 | }; 411 | 6307D70F1F09F55200CF1EAD /* Release */ = { 412 | isa = XCBuildConfiguration; 413 | buildSettings = { 414 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 415 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 416 | DEVELOPMENT_TEAM = 33K3DU6932; 417 | INFOPLIST_FILE = ElegantTableViewDemo/Info.plist; 418 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 419 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 420 | PRODUCT_BUNDLE_IDENTIFIER = com.houmanager.de; 421 | PRODUCT_NAME = "$(TARGET_NAME)"; 422 | PROVISIONING_PROFILE_SPECIFIER = ""; 423 | }; 424 | name = Release; 425 | }; 426 | 6307D7231F0A0BF100CF1EAD /* Debug */ = { 427 | isa = XCBuildConfiguration; 428 | buildSettings = { 429 | CODE_SIGN_IDENTITY = ""; 430 | CURRENT_PROJECT_VERSION = 1; 431 | DEFINES_MODULE = YES; 432 | DEVELOPMENT_TEAM = 33K3DU6932; 433 | DYLIB_COMPATIBILITY_VERSION = 1; 434 | DYLIB_CURRENT_VERSION = 1; 435 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 436 | INFOPLIST_FILE = ElegantTableViewFramework/Info.plist; 437 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 438 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 439 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 440 | OTHER_CFLAGS = "-fembed-bitcode"; 441 | PRODUCT_BUNDLE_IDENTIFIER = com.houmanager.ElegantTableViewFramework; 442 | PRODUCT_MODULE_NAME = ElegantTableView; 443 | PRODUCT_NAME = ElegantTableView; 444 | SKIP_INSTALL = YES; 445 | TARGETED_DEVICE_FAMILY = "1,2"; 446 | VERSIONING_SYSTEM = "apple-generic"; 447 | VERSION_INFO_PREFIX = ""; 448 | }; 449 | name = Debug; 450 | }; 451 | 6307D7241F0A0BF100CF1EAD /* Release */ = { 452 | isa = XCBuildConfiguration; 453 | buildSettings = { 454 | CODE_SIGN_IDENTITY = ""; 455 | CURRENT_PROJECT_VERSION = 1; 456 | DEFINES_MODULE = YES; 457 | DEVELOPMENT_TEAM = 33K3DU6932; 458 | DYLIB_COMPATIBILITY_VERSION = 1; 459 | DYLIB_CURRENT_VERSION = 1; 460 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 461 | INFOPLIST_FILE = ElegantTableViewFramework/Info.plist; 462 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 463 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 464 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 465 | OTHER_CFLAGS = "-fembed-bitcode"; 466 | PRODUCT_BUNDLE_IDENTIFIER = com.houmanager.ElegantTableViewFramework; 467 | PRODUCT_MODULE_NAME = ElegantTableView; 468 | PRODUCT_NAME = ElegantTableView; 469 | SKIP_INSTALL = YES; 470 | TARGETED_DEVICE_FAMILY = "1,2"; 471 | VERSIONING_SYSTEM = "apple-generic"; 472 | VERSION_INFO_PREFIX = ""; 473 | }; 474 | name = Release; 475 | }; 476 | /* End XCBuildConfiguration section */ 477 | 478 | /* Begin XCConfigurationList section */ 479 | 6307D6F11F09F55200CF1EAD /* Build configuration list for PBXProject "ElegantTableViewDemo" */ = { 480 | isa = XCConfigurationList; 481 | buildConfigurations = ( 482 | 6307D70B1F09F55200CF1EAD /* Debug */, 483 | 6307D70C1F09F55200CF1EAD /* Release */, 484 | ); 485 | defaultConfigurationIsVisible = 0; 486 | defaultConfigurationName = Release; 487 | }; 488 | 6307D70D1F09F55200CF1EAD /* Build configuration list for PBXNativeTarget "ElegantTableViewDemo" */ = { 489 | isa = XCConfigurationList; 490 | buildConfigurations = ( 491 | 6307D70E1F09F55200CF1EAD /* Debug */, 492 | 6307D70F1F09F55200CF1EAD /* Release */, 493 | ); 494 | defaultConfigurationIsVisible = 0; 495 | defaultConfigurationName = Release; 496 | }; 497 | 6307D7221F0A0BF100CF1EAD /* Build configuration list for PBXNativeTarget "ElegantTableViewFramework" */ = { 498 | isa = XCConfigurationList; 499 | buildConfigurations = ( 500 | 6307D7231F0A0BF100CF1EAD /* Debug */, 501 | 6307D7241F0A0BF100CF1EAD /* Release */, 502 | ); 503 | defaultConfigurationIsVisible = 0; 504 | }; 505 | /* End XCConfigurationList section */ 506 | }; 507 | rootObject = 6307D6EE1F09F55200CF1EAD /* Project object */; 508 | } 509 | -------------------------------------------------------------------------------- /Carthage/Checkouts/ElegantTableView/ElegantTableViewDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Carthage/Checkouts/ElegantTableView/ElegantTableViewDemo.xcodeproj/xcshareddata/xcschemes/ElegantTableViewFramework.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /Carthage/Checkouts/ElegantTableView/ElegantTableViewDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // ElegantTableViewDemo 4 | // 5 | // Created by YJHou on 2017/7/3. 6 | // Copyright © 2017年 侯跃军. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /Carthage/Checkouts/ElegantTableView/ElegantTableViewDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // ElegantTableViewDemo 4 | // 5 | // Created by YJHou on 2017/7/3. 6 | // Copyright © 2017年 侯跃军. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // 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. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // 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. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // 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. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // 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. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Carthage/Checkouts/ElegantTableView/ElegantTableViewDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /Carthage/Checkouts/ElegantTableView/ElegantTableViewDemo/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Carthage/Checkouts/ElegantTableView/ElegantTableViewDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Carthage/Checkouts/ElegantTableView/ElegantTableViewDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Carthage/Checkouts/ElegantTableView/ElegantTableViewDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // ElegantTableViewDemo 4 | // 5 | // Created by YJHou on 2017/7/3. 6 | // Copyright © 2017年 侯跃军. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /Carthage/Checkouts/ElegantTableView/ElegantTableViewDemo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // ElegantTableViewDemo 4 | // 5 | // Created by YJHou on 2017/7/3. 6 | // Copyright © 2017年 侯跃军. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "ElegantTableViewGenerator.h" 11 | 12 | @interface ViewController () 13 | 14 | @end 15 | 16 | @implementation ViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | 21 | 22 | NSArray *dataSources = @[@"我的", @"你的", @"大家的"]; 23 | 24 | [[ElegantTableViewGenerator shareInstance] createTableViewWithTitles:dataSources subTitles:nil rowHeight:44 superView:self.view didSelectRowBlock:^(UITableView *tableView, NSIndexPath *indexPath) { 25 | NSLog(@"-->%ld", (long)indexPath.row); 26 | } didScrollBlock:^(UIScrollView *tableView, CGPoint contentOffset) { 27 | NSLog(@"-->%@", NSStringFromCGPoint(contentOffset)); 28 | }]; 29 | 30 | } 31 | 32 | 33 | - (void)didReceiveMemoryWarning { 34 | [super didReceiveMemoryWarning]; 35 | // Dispose of any resources that can be recreated. 36 | } 37 | 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Carthage/Checkouts/ElegantTableView/ElegantTableViewDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ElegantTableViewDemo 4 | // 5 | // Created by YJHou on 2017/7/3. 6 | // Copyright © 2017年 侯跃军. 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 | -------------------------------------------------------------------------------- /Carthage/Checkouts/ElegantTableView/ElegantTableViewFramework/ElegantTableViewFramework.h: -------------------------------------------------------------------------------- 1 | // 2 | // ElegantTableViewFramework.h 3 | // ElegantTableViewFramework 4 | // 5 | // Created by YJHou on 2017/7/3. 6 | // Copyright © 2017年 侯跃军. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for ElegantTableViewFramework. 12 | FOUNDATION_EXPORT double ElegantTableViewFrameworkVersionNumber; 13 | 14 | //! Project version string for ElegantTableViewFramework. 15 | FOUNDATION_EXPORT const unsigned char ElegantTableViewFrameworkVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Carthage/Checkouts/ElegantTableView/ElegantTableViewFramework/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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Carthage/Checkouts/ElegantTableView/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 houmanager 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 | -------------------------------------------------------------------------------- /Carthage/Checkouts/ElegantTableView/README.md: -------------------------------------------------------------------------------- 1 | # ElegantTableView 2 | ElegantTableView 3 | 4 | ### Carthage 5 | 6 | 1. Add ElegantTableView to your Cartfile.
7 | ```bash 8 | github "YJManager/ElegantTableView" 9 | ``` 10 | 2. Run 11 | ```bash 12 | carthage update 13 | ``` 14 | 3. Follow the rest of the [standard Carthage installation instructions](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application) to add ElegantTableView to your project. 15 | -------------------------------------------------------------------------------- /Carthage/Checkouts/YJCommonMacro/.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 | *.DS_Store 25 | 26 | ## Obj-C/Swift specific 27 | *.hmap 28 | *.ipa 29 | *.dSYM.zip 30 | *.dSYM 31 | 32 | # CocoaPods 33 | # 34 | # We recommend against adding the Pods directory to your .gitignore. However 35 | # you should judge for yourself, the pros and cons are mentioned at: 36 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 37 | # 38 | # Pods/ 39 | 40 | # Carthage 41 | # 42 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 43 | # Carthage/Checkouts 44 | 45 | Carthage/Build 46 | 47 | # fastlane 48 | # 49 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 50 | # screenshots whenever they are needed. 51 | # For more information about the recommended setup visit: 52 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 53 | 54 | fastlane/report.xml 55 | fastlane/Preview.html 56 | fastlane/screenshots 57 | fastlane/test_output 58 | 59 | # Code Injection 60 | # 61 | # After new code Injection tools there's a generated folder /iOSInjectionProject 62 | # https://github.com/johnno1962/injectionforxcode 63 | 64 | iOSInjectionProject/ 65 | -------------------------------------------------------------------------------- /Carthage/Checkouts/YJCommonMacro/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 YJManager 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 | -------------------------------------------------------------------------------- /Carthage/Checkouts/YJCommonMacro/OCCommonMacroFramework/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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Carthage/Checkouts/YJCommonMacro/OCCommonMacroFramework/OCCommonMacroFramework.h: -------------------------------------------------------------------------------- 1 | // 2 | // OCCommonMacroFramework.h 3 | // OCCommonMacroFramework 4 | // 5 | // Created by YJHou on 2017/7/4. 6 | // Copyright © 2017年 YJHou. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for OCCommonMacroFramework. 12 | FOUNDATION_EXPORT double OCCommonMacroFrameworkVersionNumber; 13 | 14 | //! Project version string for OCCommonMacroFramework. 15 | FOUNDATION_EXPORT const unsigned char OCCommonMacroFrameworkVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Carthage/Checkouts/YJCommonMacro/README.md: -------------------------------------------------------------------------------- 1 | # YJCommonMacro 2 | 3 | [![Language](https://img.shields.io/badge/Language-Objective--C-00EE00.svg?style=flat)](https://github.com/YJManager/YJCommonMacro.git) 4 | [![CocoaPods](https://img.shields.io/cocoapods/p/YJCommonMacro.svg?style=flat)](https://github.com/YJManager/YJCommonMacro.git) 5 | [![CocoaPods](https://img.shields.io/cocoapods/v/YJCommonMacro.svg?style=flat)](https://github.com/YJManager/YJCommonMacro.git) 6 | [![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/YJManager/YJCommonMacro.git) 7 | [![GitHub tag](https://img.shields.io/github/tag/YJManager/YJCommonMacro.svg?style=flat)](https://github.com/YJManager/YJCommonMacro.git) 8 | [![license](https://img.shields.io/github/license/YJManager/YJCommonMacro.svg?style=flat)](https://github.com/YJManager/YJCommonMacro.git) 9 | 10 | iOS Objective-C 开发常用的宏 11 | 12 | ## Adding YJCommonMacro to your project (添加 YJCommonMacro 到你的项目) 13 | 14 | ### CocoaPods 15 | 16 | [CocoaPods](http://cocoapods.org) is the recommended way to add `YJCommonMacro` to your project. 17 | 18 | 1. Add a pod entry for `YJCommonMacro` to your Podfile
19 | ```bash 20 | pod 'YJCommonMacro' 21 | ``` 22 | 2. Install the pod(s) by running
23 | ```bash 24 | pod install 25 | ``` 26 | 3. Include `YJCommonMacro` wherever you need it with
27 | ```bash 28 | #import 29 | ``` 30 | 31 | ### Carthage 32 | 33 | 1. Add YJCommonMacro to your Cartfile.
34 | ```bash 35 | github "YJManager/YJCommonMacro" 36 | ``` 37 | 2. Run 38 | ```bash 39 | carthage update 40 | ``` 41 | 3. Follow the rest of the [standard Carthage installation instructions](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application) to add YJCommonMacro to your project. 42 | 43 | ```objc 44 | //------------------- 获取设备大小 ------------------------- 45 | #define kSCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width) 46 | #define kSCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height) 47 | 48 | #define kNAVIGATION_BAR_HEIGHT 64.0f 49 | #define kSTATUS_BAR_HEIGHT 20.0f 50 | 51 | //////////// 版本 ///////////// 52 | #define kSYSTEM_VERSION [[[UIDevice currentDevice] systemVersion] floatValue] 53 | /** APP 版本号 */ 54 | #define kAPP_VERSION [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] 55 | 56 | ////////// 方法宏 ////////////// 57 | #pragma mark - Funtion Method (宏 方法) 58 | 59 | #define kIMAGE_NANMED(imgName) [UIImage imageNamed:imgName] 60 | //读取本地图片 性能更高 61 | #define kLOAD_IMAGE(file, ext) [UIImage imageWithContentsOfFile:[[NSBundle mainBundle]pathForResource:file ofType:ext]] 62 | //获取当前语言 63 | #define kCURRENT_LANGUAGE ([[NSLocale preferredLanguages] objectAtIndex:0]) 64 | 65 | //判断是真机还是模拟器 66 | #if TARGET_OS_IPHONE 67 | //iPhone Device 68 | #endif 69 | 70 | #if TARGET_IPHONE_SIMULATOR 71 | //iPhone Simulator 72 | #endif 73 | 74 | //检查系统版本 75 | #define kSYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) 76 | #define kSYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) 77 | #define kSYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) 78 | #define kSYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) 79 | #define kSYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending) 80 | 81 | /** 日志Log */ 82 | #ifdef DEBUG 83 | # define YJLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); 84 | #else 85 | # define YJLog(...) 86 | #endif 87 | 88 | //重写NSLog,Debug模式下打印日志和当前行数 89 | #if DEBUG 90 | #define NSLog(FORMAT, ...) fprintf(stderr,"Function:%s Line:%d\n Content:%s\n\n", __FUNCTION__, __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]); 91 | #else 92 | #define NSLog(FORMAT, ...) nil 93 | #endif 94 | 95 | //DEBUG 模式下打印日志,当前行 并弹出一个警告 96 | #ifdef DEBUG 97 | # define YJAlertLog(fmt, ...) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:[NSString stringWithFormat:@"%s\n [Line %d] ", __PRETTY_FUNCTION__, __LINE__] message:[NSString stringWithFormat:fmt, ##__VA_ARGS__] delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; [alert show]; } 98 | #else 99 | # define YJAlertLog(...) 100 | #endif 101 | 102 | //----------------------内存---------------------------- 103 | 104 | //使用ARC和不使用ARC 105 | #if __has_feature(objc_arc) 106 | //compiling with ARC 107 | #else 108 | // compiling without ARC 109 | #endif 110 | 111 | //-------------------- GCD ------------------------- 112 | //G-C-D 113 | #define kGCD_BACK(block) dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block) 114 | #define kGCD_MAIN(block) dispatch_async(dispatch_get_main_queue(),block) 115 | 116 | //------------------- 转换 --------------- 117 | //由角度获取弧度 有弧度获取角度 118 | #define kDEGREES_TO_RADIAN(x) (M_PI * (x) / 180.0) 119 | #define kRADIAN_TO_DEGREES(radian) (radian*180.0)/(M_PI) 120 | 121 | //------------------ 单例 ----------------- 122 | //单例化一个类 123 | #define kSYNTHESIZE_SINGLETON_FOR_CLASS(classname) \ 124 | \ 125 | static classname *shared##classname = nil; \ 126 | \ 127 | + (classname *)shared##classname \ 128 | { \ 129 | @synchronized(self) \ 130 | { \ 131 | if (shared##classname == nil) \ 132 | { \ 133 | shared##classname = [[self alloc] init]; \ 134 | } \ 135 | } \ 136 | \ 137 | return shared##classname; \ 138 | } \ 139 | \ 140 | + (id)allocWithZone:(NSZone *)zone \ 141 | { \ 142 | @synchronized(self) \ 143 | { \ 144 | if (shared##classname == nil) \ 145 | { \ 146 | shared##classname = [super allocWithZone:zone]; \ 147 | return shared##classname; \ 148 | } \ 149 | } \ 150 | \ 151 | return nil; \ 152 | } \ 153 | \ 154 | - (id)copyWithZone:(NSZone *)zone \ 155 | { \ 156 | return self; \ 157 | } 158 | 159 | //////////////////// 字体 //////////////////////// 160 | /** 方正黑体简体字体定义 */ 161 | #define kFONT(F) [UIFont fontWithName:@"FZHTJW--GB1-0" size:F] 162 | // 正常字体 163 | #define F8 [UIFont systemFontOfSize:8] 164 | #define F9 [UIFont systemFontOfSize:9] 165 | #define F10 [UIFont systemFontOfSize:10] 166 | #define F11 [UIFont systemFontOfSize:11] 167 | #define F12 [UIFont systemFontOfSize:12] 168 | #define F13 [UIFont systemFontOfSize:13] 169 | #define F14 [UIFont systemFontOfSize:14] 170 | #define F15 [UIFont systemFontOfSize:15] 171 | #define F16 [UIFont systemFontOfSize:16] 172 | #define F17 [UIFont systemFontOfSize:17] 173 | #define F18 [UIFont systemFontOfSize:18] 174 | #define F19 [UIFont systemFontOfSize:19] 175 | #define F20 [UIFont systemFontOfSize:20] 176 | #define F21 [UIFont systemFontOfSize:21] 177 | #define F22 [UIFont systemFontOfSize:22] 178 | #define F23 [UIFont systemFontOfSize:23] 179 | #define F24 [UIFont systemFontOfSize:24] 180 | #define F25 [UIFont systemFontOfSize:25] 181 | #define F26 [UIFont systemFontOfSize:26] 182 | #define F27 [UIFont systemFontOfSize:27] 183 | #define F28 [UIFont systemFontOfSize:28] 184 | #define F29 [UIFont systemFontOfSize:29] 185 | #define F30 [UIFont systemFontOfSize:30] 186 | 187 | // 粗体 188 | #define FB8 [UIFont boldSystemFontOfSize:8] 189 | #define FB9 [UIFont boldSystemFontOfSize:9] 190 | #define FB10 [UIFont boldSystemFontOfSize:10] 191 | #define FB11 [UIFont boldSystemFontOfSize:11] 192 | #define FB12 [UIFont boldSystemFontOfSize:12] 193 | #define FB13 [UIFont boldSystemFontOfSize:13] 194 | #define FB14 [UIFont boldSystemFontOfSize:14] 195 | #define FB15 [UIFont boldSystemFontOfSize:15] 196 | #define FB16 [UIFont boldSystemFontOfSize:16] 197 | #define FB17 [UIFont boldSystemFontOfSize:17] 198 | #define FB18 [UIFont boldSystemFontOfSize:18] 199 | #define FB19 [UIFont boldSystemFontOfSize:19] 200 | #define FB20 [UIFont boldSystemFontOfSize:20] 201 | #define FB21 [UIFont boldSystemFontOfSize:21] 202 | #define FB22 [UIFont boldSystemFontOfSize:22] 203 | #define FB23 [UIFont boldSystemFontOfSize:23] 204 | #define FB24 [UIFont boldSystemFontOfSize:24] 205 | #define FB25 [UIFont boldSystemFontOfSize:25] 206 | #define FB26 [UIFont boldSystemFontOfSize:26] 207 | #define FB27 [UIFont boldSystemFontOfSize:27] 208 | #define FB28 [UIFont boldSystemFontOfSize:28] 209 | #define FB29 [UIFont boldSystemFontOfSize:29] 210 | #define FB30 [UIFont boldSystemFontOfSize:30] 211 | 212 | ///////////////// 常用颜色 ////////// 213 | #define black_color [UIColor blackColor] 214 | #define blue_color [UIColor blueColor] 215 | #define brown_color [UIColor brownColor] 216 | #define clear_color [UIColor clearColor] 217 | #define darkGray_color [UIColor darkGrayColor] 218 | #define darkText_color [UIColor darkTextColor] 219 | #define white_color [UIColor whiteColor] 220 | #define yellow_color [UIColor yellowColor] 221 | #define red_color [UIColor redColor] 222 | #define orange_color [UIColor orangeColor] 223 | #define purple_color [UIColor purpleColor] 224 | #define lightText_color [UIColor lightTextColor] 225 | #define lightGray_color [UIColor lightGrayColor] 226 | #define green_color [UIColor greenColor] 227 | #define gray_color [UIColor grayColor] 228 | #define magenta_color [UIColor magentaColor] 229 | 230 | // rgb颜色转换(16进制->10进制) 231 | #define kUIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0] 232 | // 设置颜色RGB 233 | #define kCOLOR(R, G, B, A) [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:A] 234 | 235 | /** 随机色 */ 236 | #define kRANDOM_COLOR [UIColor colorWithRed:((arc4random() % 255) / 255.0) green:((arc4random() % 255) / 255.0) blue:((arc4random() % 255) / 255.0) alpha:1] 237 | 238 | /** 背景色 */ 239 | #define kBACKGROUND_COLOR [UIColor colorWithRed:242.0/255.0 green:236.0/255.0 blue:231.0/255.0 alpha:1.0] 240 | /** 清除背景色 */ 241 | #define kCLEAR_COLOR [UIColor clearColor] 242 | ``` 243 | -------------------------------------------------------------------------------- /Carthage/Checkouts/YJCommonMacro/YJCommonMacro.podspec: -------------------------------------------------------------------------------- 1 | version = "0.0.5"; 2 | 3 | Pod::Spec.new do |s| 4 | 5 | s.name = "YJCommonMacro" 6 | s.version = version 7 | s.summary = "YJCommonMacro 包含 iOS 开发中常用的宏, Author's email:houmanager@Hotmail.com 工作地点:BeiJing 欢迎骚扰。" 8 | s.description = <<-DESC 9 | YJCommonMacro 包含 iOS 开发中常用的宏, Author's email:houmanager@Hotmail.com 工作地点:BeiJing 欢迎骚扰。欢迎大家提供更好的常用宏。 10 | DESC 11 | s.homepage = "https://github.com/YJManager/YJCommonMacro" 12 | s.license = { :type => "MIT", :file => "LICENSE" } 13 | s.author = { "houmanager" => "houmanager@Hotmail.com" } 14 | s.platform = :ios, "8.0" 15 | s.source = { :git => "https://github.com/YJManager/YJCommonMacro.git", :tag => "#{version}"} 16 | s.source_files = "YJCommonMacro/*.{h,m}" 17 | s.requires_arc = true 18 | 19 | end 20 | -------------------------------------------------------------------------------- /Carthage/Checkouts/YJCommonMacro/YJCommonMacro/OCCommonMacro.h: -------------------------------------------------------------------------------- 1 | // 2 | // OCCommonMacro.h 3 | // YJCommonMacroGather 4 | // 5 | // Created by YJHou on 2017/1/4. 6 | // Copyright © 2017年 YJHou. All rights reserved. 7 | // iOS ObJective-C 开发常用的宏 8 | 9 | /** 10 | 当前版本: 0.0.5 11 | */ 12 | 13 | #ifndef OCCommonMacro_h 14 | #define OCCommonMacro_h 15 | 16 | #ifdef __OBJC__ 17 | //------------------- 获取设备大小 ------------------------- 18 | #define kSCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width) 19 | #define kSCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height) 20 | 21 | #define kNAVIGATION_BAR_HEIGHT 64.0f 22 | #define kSTATUS_BAR_HEIGHT 20.0f 23 | #define kTAB_BAR_HEIGHT 49.0f 24 | 25 | //////////// 版本 ///////////// 26 | #define kSYSTEM_VERSION [[[UIDevice currentDevice] systemVersion] floatValue] 27 | /** APP 版本号 */ 28 | #define kAPP_VERSION [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] 29 | 30 | ////////// 方法宏 ////////////// 31 | #pragma mark - Funtion Method (宏 方法) 32 | 33 | #define kIMAGE_NANMED(imgName) [UIImage imageNamed:imgName] 34 | //读取本地图片 性能更高 35 | #define kLOAD_IMAGE(file, ext) [UIImage imageWithContentsOfFile:[[NSBundle mainBundle]pathForResource:file ofType:ext]] 36 | //获取当前语言 37 | #define kCURRENT_LANGUAGE ([[NSLocale preferredLanguages] objectAtIndex:0]) 38 | 39 | //判断是真机还是模拟器 40 | #if TARGET_OS_IPHONE 41 | //iPhone Device 42 | #endif 43 | 44 | #if TARGET_IPHONE_SIMULATOR 45 | //iPhone Simulator 46 | #endif 47 | 48 | //检查系统版本 49 | #define kSYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) 50 | #define kSYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) 51 | #define kSYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) 52 | #define kSYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) 53 | #define kSYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending) 54 | 55 | /** 日志Log */ 56 | #ifdef DEBUG 57 | # define YJLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); 58 | #else 59 | # define YJLog(...) 60 | #endif 61 | 62 | // COLog,Debug模式下打印日志和当前行数 63 | #if DEBUG 64 | #define COLog(FORMAT, ...) fprintf(stderr,"Function:%s Line:%d\n Content:%s\n\n", __FUNCTION__, __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]); 65 | #else 66 | #define COLog(FORMAT, ...) nil 67 | #endif 68 | 69 | //DEBUG 模式下打印日志,当前行 并弹出一个警告 70 | #ifdef DEBUG 71 | # define YJAlertLog(fmt, ...) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:[NSString stringWithFormat:@"%s\n [Line %d] ", __PRETTY_FUNCTION__, __LINE__] message:[NSString stringWithFormat:fmt, ##__VA_ARGS__] delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; [alert show]; } 72 | #else 73 | # define YJAlertLog(...) 74 | #endif 75 | 76 | //----------------------内存---------------------------- 77 | 78 | //使用ARC和不使用ARC 79 | #if __has_feature(objc_arc) 80 | //compiling with ARC 81 | #else 82 | // compiling without ARC 83 | #endif 84 | 85 | //-------------------- GCD ------------------------- 86 | //G-C-D 87 | #define kGCD_BACK(block) dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block) 88 | #define kGCD_MAIN(block) dispatch_async(dispatch_get_main_queue(),block) 89 | 90 | //------------------- 转换 --------------- 91 | //由角度获取弧度 有弧度获取角度 92 | #define kDEGREES_TO_RADIAN(x) (M_PI * (x) / 180.0) 93 | #define kRADIAN_TO_DEGREES(radian) (radian*180.0)/(M_PI) 94 | 95 | //------------------ 单例 ----------------- 96 | //单例化一个类 97 | #define kSYNTHESIZE_SINGLETON_FOR_CLASS(classname) \ 98 | \ 99 | static classname *shared##classname = nil; \ 100 | \ 101 | + (classname *)shared##classname \ 102 | { \ 103 | @synchronized(self) \ 104 | { \ 105 | if (shared##classname == nil) \ 106 | { \ 107 | shared##classname = [[self alloc] init]; \ 108 | } \ 109 | } \ 110 | \ 111 | return shared##classname; \ 112 | } \ 113 | \ 114 | + (id)allocWithZone:(NSZone *)zone \ 115 | { \ 116 | @synchronized(self) \ 117 | { \ 118 | if (shared##classname == nil) \ 119 | { \ 120 | shared##classname = [super allocWithZone:zone]; \ 121 | return shared##classname; \ 122 | } \ 123 | } \ 124 | \ 125 | return nil; \ 126 | } \ 127 | \ 128 | - (id)copyWithZone:(NSZone *)zone \ 129 | { \ 130 | return self; \ 131 | } 132 | 133 | //////////////////// 字体 //////////////////////// 134 | /** 方正黑体简体字体定义 */ 135 | #define kFONT(F) [UIFont fontWithName:@"FZHTJW--GB1-0" size:F] 136 | // 正常字体 137 | #define F8 [UIFont systemFontOfSize:8] 138 | #define F9 [UIFont systemFontOfSize:9] 139 | #define F10 [UIFont systemFontOfSize:10] 140 | #define F11 [UIFont systemFontOfSize:11] 141 | #define F12 [UIFont systemFontOfSize:12] 142 | #define F13 [UIFont systemFontOfSize:13] 143 | #define F14 [UIFont systemFontOfSize:14] 144 | #define F15 [UIFont systemFontOfSize:15] 145 | #define F16 [UIFont systemFontOfSize:16] 146 | #define F17 [UIFont systemFontOfSize:17] 147 | #define F18 [UIFont systemFontOfSize:18] 148 | #define F19 [UIFont systemFontOfSize:19] 149 | #define F20 [UIFont systemFontOfSize:20] 150 | #define F21 [UIFont systemFontOfSize:21] 151 | #define F22 [UIFont systemFontOfSize:22] 152 | #define F23 [UIFont systemFontOfSize:23] 153 | #define F24 [UIFont systemFontOfSize:24] 154 | #define F25 [UIFont systemFontOfSize:25] 155 | #define F26 [UIFont systemFontOfSize:26] 156 | #define F27 [UIFont systemFontOfSize:27] 157 | #define F28 [UIFont systemFontOfSize:28] 158 | #define F29 [UIFont systemFontOfSize:29] 159 | #define F30 [UIFont systemFontOfSize:30] 160 | 161 | // 粗体 162 | #define FB8 [UIFont boldSystemFontOfSize:8] 163 | #define FB9 [UIFont boldSystemFontOfSize:9] 164 | #define FB10 [UIFont boldSystemFontOfSize:10] 165 | #define FB11 [UIFont boldSystemFontOfSize:11] 166 | #define FB12 [UIFont boldSystemFontOfSize:12] 167 | #define FB13 [UIFont boldSystemFontOfSize:13] 168 | #define FB14 [UIFont boldSystemFontOfSize:14] 169 | #define FB15 [UIFont boldSystemFontOfSize:15] 170 | #define FB16 [UIFont boldSystemFontOfSize:16] 171 | #define FB17 [UIFont boldSystemFontOfSize:17] 172 | #define FB18 [UIFont boldSystemFontOfSize:18] 173 | #define FB19 [UIFont boldSystemFontOfSize:19] 174 | #define FB20 [UIFont boldSystemFontOfSize:20] 175 | #define FB21 [UIFont boldSystemFontOfSize:21] 176 | #define FB22 [UIFont boldSystemFontOfSize:22] 177 | #define FB23 [UIFont boldSystemFontOfSize:23] 178 | #define FB24 [UIFont boldSystemFontOfSize:24] 179 | #define FB25 [UIFont boldSystemFontOfSize:25] 180 | #define FB26 [UIFont boldSystemFontOfSize:26] 181 | #define FB27 [UIFont boldSystemFontOfSize:27] 182 | #define FB28 [UIFont boldSystemFontOfSize:28] 183 | #define FB29 [UIFont boldSystemFontOfSize:29] 184 | #define FB30 [UIFont boldSystemFontOfSize:30] 185 | 186 | ///////////////// 常用颜色 ////////// 187 | #define black_color [UIColor blackColor] 188 | #define blue_color [UIColor blueColor] 189 | #define brown_color [UIColor brownColor] 190 | #define clear_color [UIColor clearColor] 191 | #define darkGray_color [UIColor darkGrayColor] 192 | #define darkText_color [UIColor darkTextColor] 193 | #define white_color [UIColor whiteColor] 194 | #define yellow_color [UIColor yellowColor] 195 | #define red_color [UIColor redColor] 196 | #define orange_color [UIColor orangeColor] 197 | #define purple_color [UIColor purpleColor] 198 | #define lightText_color [UIColor lightTextColor] 199 | #define lightGray_color [UIColor lightGrayColor] 200 | #define green_color [UIColor greenColor] 201 | #define gray_color [UIColor grayColor] 202 | #define magenta_color [UIColor magentaColor] 203 | 204 | // rgb颜色转换(16进制->10进制) 205 | #define kUIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0] 206 | // 设置颜色RGB 207 | #define kCOLOR(R, G, B, A) [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:A] 208 | 209 | /** 随机色 */ 210 | #define kRANDOM_COLOR [UIColor colorWithRed:((arc4random() % 255) / 255.0) green:((arc4random() % 255) / 255.0) blue:((arc4random() % 255) / 255.0) alpha:1] 211 | 212 | /** 背景色 */ 213 | #define kBACKGROUND_COLOR [UIColor colorWithRed:242.0/255.0 green:236.0/255.0 blue:231.0/255.0 alpha:1.0] 214 | /** 清除背景色 */ 215 | #define kCLEAR_COLOR [UIColor clearColor] 216 | 217 | #endif /////// objc 218 | 219 | #endif /* OCCommonMacro_h */ 220 | -------------------------------------------------------------------------------- /Carthage/Checkouts/YJCommonMacro/YJCommonMacroGather.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 6375CBCD1ED82B1100844E54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6375CBCC1ED82B1100844E54 /* main.m */; }; 11 | 6375CBD01ED82B1100844E54 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6375CBCF1ED82B1100844E54 /* AppDelegate.m */; }; 12 | 6375CBD31ED82B1100844E54 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6375CBD21ED82B1100844E54 /* ViewController.m */; }; 13 | 6375CBD61ED82B1100844E54 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6375CBD41ED82B1100844E54 /* Main.storyboard */; }; 14 | 6375CBD81ED82B1100844E54 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6375CBD71ED82B1100844E54 /* Assets.xcassets */; }; 15 | 6375CBDB1ED82B1100844E54 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6375CBD91ED82B1100844E54 /* LaunchScreen.storyboard */; }; 16 | 63938AF61F0B3C2E005BD255 /* OCCommonMacro.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63938AEF1F0B3C2E005BD255 /* OCCommonMacro.framework */; }; 17 | 63938AF71F0B3C2E005BD255 /* OCCommonMacro.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 63938AEF1F0B3C2E005BD255 /* OCCommonMacro.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 18 | 63938AFC1F0B3C41005BD255 /* OCCommonMacro.h in Headers */ = {isa = PBXBuildFile; fileRef = 63938AE91F0B3B85005BD255 /* OCCommonMacro.h */; settings = {ATTRIBUTES = (Public, ); }; }; 19 | 63938AFD1F0B3C48005BD255 /* OCCommonMacro.h in Sources */ = {isa = PBXBuildFile; fileRef = 63938AE91F0B3B85005BD255 /* OCCommonMacro.h */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | 63938AF41F0B3C2E005BD255 /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = 6375CBC01ED82B1100844E54 /* Project object */; 26 | proxyType = 1; 27 | remoteGlobalIDString = 63938AEE1F0B3C2E005BD255; 28 | remoteInfo = OCCommonMacroFramework; 29 | }; 30 | /* End PBXContainerItemProxy section */ 31 | 32 | /* Begin PBXCopyFilesBuildPhase section */ 33 | 63938AFB1F0B3C2E005BD255 /* Embed Frameworks */ = { 34 | isa = PBXCopyFilesBuildPhase; 35 | buildActionMask = 2147483647; 36 | dstPath = ""; 37 | dstSubfolderSpec = 10; 38 | files = ( 39 | 63938AF71F0B3C2E005BD255 /* OCCommonMacro.framework in Embed Frameworks */, 40 | ); 41 | name = "Embed Frameworks"; 42 | runOnlyForDeploymentPostprocessing = 0; 43 | }; 44 | /* End PBXCopyFilesBuildPhase section */ 45 | 46 | /* Begin PBXFileReference section */ 47 | 6375CBC81ED82B1100844E54 /* YJCommonMacroGather.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = YJCommonMacroGather.app; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 6375CBCC1ED82B1100844E54 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 49 | 6375CBCE1ED82B1100844E54 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 50 | 6375CBCF1ED82B1100844E54 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 51 | 6375CBD11ED82B1100844E54 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 52 | 6375CBD21ED82B1100844E54 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 53 | 6375CBD51ED82B1100844E54 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 54 | 6375CBD71ED82B1100844E54 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 55 | 6375CBDA1ED82B1100844E54 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 56 | 6375CBDC1ED82B1100844E54 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 57 | 63938AE91F0B3B85005BD255 /* OCCommonMacro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCCommonMacro.h; sourceTree = ""; }; 58 | 63938AEF1F0B3C2E005BD255 /* OCCommonMacro.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OCCommonMacro.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 59 | 63938AF11F0B3C2E005BD255 /* OCCommonMacroFramework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OCCommonMacroFramework.h; sourceTree = ""; }; 60 | 63938AF21F0B3C2E005BD255 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 61 | /* End PBXFileReference section */ 62 | 63 | /* Begin PBXFrameworksBuildPhase section */ 64 | 6375CBC51ED82B1100844E54 /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | 63938AF61F0B3C2E005BD255 /* OCCommonMacro.framework in Frameworks */, 69 | ); 70 | runOnlyForDeploymentPostprocessing = 0; 71 | }; 72 | 63938AEB1F0B3C2E005BD255 /* Frameworks */ = { 73 | isa = PBXFrameworksBuildPhase; 74 | buildActionMask = 2147483647; 75 | files = ( 76 | ); 77 | runOnlyForDeploymentPostprocessing = 0; 78 | }; 79 | /* End PBXFrameworksBuildPhase section */ 80 | 81 | /* Begin PBXGroup section */ 82 | 6375CBBF1ED82B1100844E54 = { 83 | isa = PBXGroup; 84 | children = ( 85 | 6375CBE21ED82FC400844E54 /* YJCommonMacro */, 86 | 6375CBCA1ED82B1100844E54 /* YJCommonMacroGather */, 87 | 63938AF01F0B3C2E005BD255 /* OCCommonMacroFramework */, 88 | 6375CBC91ED82B1100844E54 /* Products */, 89 | ); 90 | sourceTree = ""; 91 | }; 92 | 6375CBC91ED82B1100844E54 /* Products */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | 6375CBC81ED82B1100844E54 /* YJCommonMacroGather.app */, 96 | 63938AEF1F0B3C2E005BD255 /* OCCommonMacro.framework */, 97 | ); 98 | name = Products; 99 | sourceTree = ""; 100 | }; 101 | 6375CBCA1ED82B1100844E54 /* YJCommonMacroGather */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 6375CBCE1ED82B1100844E54 /* AppDelegate.h */, 105 | 6375CBCF1ED82B1100844E54 /* AppDelegate.m */, 106 | 6375CBD11ED82B1100844E54 /* ViewController.h */, 107 | 6375CBD21ED82B1100844E54 /* ViewController.m */, 108 | 6375CBCB1ED82B1100844E54 /* Supporting Files */, 109 | ); 110 | path = YJCommonMacroGather; 111 | sourceTree = ""; 112 | }; 113 | 6375CBCB1ED82B1100844E54 /* Supporting Files */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 6375CBD41ED82B1100844E54 /* Main.storyboard */, 117 | 6375CBD71ED82B1100844E54 /* Assets.xcassets */, 118 | 6375CBD91ED82B1100844E54 /* LaunchScreen.storyboard */, 119 | 6375CBDC1ED82B1100844E54 /* Info.plist */, 120 | 6375CBCC1ED82B1100844E54 /* main.m */, 121 | ); 122 | name = "Supporting Files"; 123 | sourceTree = ""; 124 | }; 125 | 6375CBE21ED82FC400844E54 /* YJCommonMacro */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | 63938AE91F0B3B85005BD255 /* OCCommonMacro.h */, 129 | ); 130 | path = YJCommonMacro; 131 | sourceTree = ""; 132 | }; 133 | 63938AF01F0B3C2E005BD255 /* OCCommonMacroFramework */ = { 134 | isa = PBXGroup; 135 | children = ( 136 | 63938AF11F0B3C2E005BD255 /* OCCommonMacroFramework.h */, 137 | 63938AF21F0B3C2E005BD255 /* Info.plist */, 138 | ); 139 | path = OCCommonMacroFramework; 140 | sourceTree = ""; 141 | }; 142 | /* End PBXGroup section */ 143 | 144 | /* Begin PBXHeadersBuildPhase section */ 145 | 63938AEC1F0B3C2E005BD255 /* Headers */ = { 146 | isa = PBXHeadersBuildPhase; 147 | buildActionMask = 2147483647; 148 | files = ( 149 | 63938AFC1F0B3C41005BD255 /* OCCommonMacro.h in Headers */, 150 | ); 151 | runOnlyForDeploymentPostprocessing = 0; 152 | }; 153 | /* End PBXHeadersBuildPhase section */ 154 | 155 | /* Begin PBXNativeTarget section */ 156 | 6375CBC71ED82B1100844E54 /* YJCommonMacroGather */ = { 157 | isa = PBXNativeTarget; 158 | buildConfigurationList = 6375CBDF1ED82B1100844E54 /* Build configuration list for PBXNativeTarget "YJCommonMacroGather" */; 159 | buildPhases = ( 160 | 6375CBC41ED82B1100844E54 /* Sources */, 161 | 6375CBC51ED82B1100844E54 /* Frameworks */, 162 | 6375CBC61ED82B1100844E54 /* Resources */, 163 | 63938AFB1F0B3C2E005BD255 /* Embed Frameworks */, 164 | ); 165 | buildRules = ( 166 | ); 167 | dependencies = ( 168 | 63938AF51F0B3C2E005BD255 /* PBXTargetDependency */, 169 | ); 170 | name = YJCommonMacroGather; 171 | productName = YJCommonMacroGather; 172 | productReference = 6375CBC81ED82B1100844E54 /* YJCommonMacroGather.app */; 173 | productType = "com.apple.product-type.application"; 174 | }; 175 | 63938AEE1F0B3C2E005BD255 /* OCCommonMacroFramework */ = { 176 | isa = PBXNativeTarget; 177 | buildConfigurationList = 63938AF81F0B3C2E005BD255 /* Build configuration list for PBXNativeTarget "OCCommonMacroFramework" */; 178 | buildPhases = ( 179 | 63938AEA1F0B3C2E005BD255 /* Sources */, 180 | 63938AEB1F0B3C2E005BD255 /* Frameworks */, 181 | 63938AEC1F0B3C2E005BD255 /* Headers */, 182 | 63938AED1F0B3C2E005BD255 /* Resources */, 183 | ); 184 | buildRules = ( 185 | ); 186 | dependencies = ( 187 | ); 188 | name = OCCommonMacroFramework; 189 | productName = OCCommonMacroFramework; 190 | productReference = 63938AEF1F0B3C2E005BD255 /* OCCommonMacro.framework */; 191 | productType = "com.apple.product-type.framework"; 192 | }; 193 | /* End PBXNativeTarget section */ 194 | 195 | /* Begin PBXProject section */ 196 | 6375CBC01ED82B1100844E54 /* Project object */ = { 197 | isa = PBXProject; 198 | attributes = { 199 | LastUpgradeCheck = 0830; 200 | ORGANIZATIONNAME = YJHou; 201 | TargetAttributes = { 202 | 6375CBC71ED82B1100844E54 = { 203 | CreatedOnToolsVersion = 8.3.2; 204 | DevelopmentTeam = 33K3DU6932; 205 | ProvisioningStyle = Automatic; 206 | }; 207 | 63938AEE1F0B3C2E005BD255 = { 208 | CreatedOnToolsVersion = 8.3.3; 209 | DevelopmentTeam = 33K3DU6932; 210 | ProvisioningStyle = Automatic; 211 | }; 212 | }; 213 | }; 214 | buildConfigurationList = 6375CBC31ED82B1100844E54 /* Build configuration list for PBXProject "YJCommonMacroGather" */; 215 | compatibilityVersion = "Xcode 3.2"; 216 | developmentRegion = English; 217 | hasScannedForEncodings = 0; 218 | knownRegions = ( 219 | en, 220 | Base, 221 | ); 222 | mainGroup = 6375CBBF1ED82B1100844E54; 223 | productRefGroup = 6375CBC91ED82B1100844E54 /* Products */; 224 | projectDirPath = ""; 225 | projectRoot = ""; 226 | targets = ( 227 | 6375CBC71ED82B1100844E54 /* YJCommonMacroGather */, 228 | 63938AEE1F0B3C2E005BD255 /* OCCommonMacroFramework */, 229 | ); 230 | }; 231 | /* End PBXProject section */ 232 | 233 | /* Begin PBXResourcesBuildPhase section */ 234 | 6375CBC61ED82B1100844E54 /* Resources */ = { 235 | isa = PBXResourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | 6375CBDB1ED82B1100844E54 /* LaunchScreen.storyboard in Resources */, 239 | 6375CBD81ED82B1100844E54 /* Assets.xcassets in Resources */, 240 | 6375CBD61ED82B1100844E54 /* Main.storyboard in Resources */, 241 | ); 242 | runOnlyForDeploymentPostprocessing = 0; 243 | }; 244 | 63938AED1F0B3C2E005BD255 /* Resources */ = { 245 | isa = PBXResourcesBuildPhase; 246 | buildActionMask = 2147483647; 247 | files = ( 248 | ); 249 | runOnlyForDeploymentPostprocessing = 0; 250 | }; 251 | /* End PBXResourcesBuildPhase section */ 252 | 253 | /* Begin PBXSourcesBuildPhase section */ 254 | 6375CBC41ED82B1100844E54 /* Sources */ = { 255 | isa = PBXSourcesBuildPhase; 256 | buildActionMask = 2147483647; 257 | files = ( 258 | 6375CBD31ED82B1100844E54 /* ViewController.m in Sources */, 259 | 6375CBD01ED82B1100844E54 /* AppDelegate.m in Sources */, 260 | 6375CBCD1ED82B1100844E54 /* main.m in Sources */, 261 | ); 262 | runOnlyForDeploymentPostprocessing = 0; 263 | }; 264 | 63938AEA1F0B3C2E005BD255 /* Sources */ = { 265 | isa = PBXSourcesBuildPhase; 266 | buildActionMask = 2147483647; 267 | files = ( 268 | 63938AFD1F0B3C48005BD255 /* OCCommonMacro.h in Sources */, 269 | ); 270 | runOnlyForDeploymentPostprocessing = 0; 271 | }; 272 | /* End PBXSourcesBuildPhase section */ 273 | 274 | /* Begin PBXTargetDependency section */ 275 | 63938AF51F0B3C2E005BD255 /* PBXTargetDependency */ = { 276 | isa = PBXTargetDependency; 277 | target = 63938AEE1F0B3C2E005BD255 /* OCCommonMacroFramework */; 278 | targetProxy = 63938AF41F0B3C2E005BD255 /* PBXContainerItemProxy */; 279 | }; 280 | /* End PBXTargetDependency section */ 281 | 282 | /* Begin PBXVariantGroup section */ 283 | 6375CBD41ED82B1100844E54 /* Main.storyboard */ = { 284 | isa = PBXVariantGroup; 285 | children = ( 286 | 6375CBD51ED82B1100844E54 /* Base */, 287 | ); 288 | name = Main.storyboard; 289 | sourceTree = ""; 290 | }; 291 | 6375CBD91ED82B1100844E54 /* LaunchScreen.storyboard */ = { 292 | isa = PBXVariantGroup; 293 | children = ( 294 | 6375CBDA1ED82B1100844E54 /* Base */, 295 | ); 296 | name = LaunchScreen.storyboard; 297 | sourceTree = ""; 298 | }; 299 | /* End PBXVariantGroup section */ 300 | 301 | /* Begin XCBuildConfiguration section */ 302 | 6375CBDD1ED82B1100844E54 /* Debug */ = { 303 | isa = XCBuildConfiguration; 304 | buildSettings = { 305 | ALWAYS_SEARCH_USER_PATHS = NO; 306 | CLANG_ANALYZER_NONNULL = YES; 307 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 308 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 309 | CLANG_CXX_LIBRARY = "libc++"; 310 | CLANG_ENABLE_MODULES = YES; 311 | CLANG_ENABLE_OBJC_ARC = YES; 312 | CLANG_WARN_BOOL_CONVERSION = YES; 313 | CLANG_WARN_CONSTANT_CONVERSION = YES; 314 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 315 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 316 | CLANG_WARN_EMPTY_BODY = YES; 317 | CLANG_WARN_ENUM_CONVERSION = YES; 318 | CLANG_WARN_INFINITE_RECURSION = YES; 319 | CLANG_WARN_INT_CONVERSION = YES; 320 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 321 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 322 | CLANG_WARN_UNREACHABLE_CODE = YES; 323 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 324 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 325 | COPY_PHASE_STRIP = NO; 326 | DEBUG_INFORMATION_FORMAT = dwarf; 327 | ENABLE_STRICT_OBJC_MSGSEND = YES; 328 | ENABLE_TESTABILITY = YES; 329 | GCC_C_LANGUAGE_STANDARD = gnu99; 330 | GCC_DYNAMIC_NO_PIC = NO; 331 | GCC_NO_COMMON_BLOCKS = YES; 332 | GCC_OPTIMIZATION_LEVEL = 0; 333 | GCC_PREPROCESSOR_DEFINITIONS = ( 334 | "DEBUG=1", 335 | "$(inherited)", 336 | ); 337 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 338 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 339 | GCC_WARN_UNDECLARED_SELECTOR = YES; 340 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 341 | GCC_WARN_UNUSED_FUNCTION = YES; 342 | GCC_WARN_UNUSED_VARIABLE = YES; 343 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 344 | MTL_ENABLE_DEBUG_INFO = YES; 345 | ONLY_ACTIVE_ARCH = YES; 346 | SDKROOT = iphoneos; 347 | }; 348 | name = Debug; 349 | }; 350 | 6375CBDE1ED82B1100844E54 /* Release */ = { 351 | isa = XCBuildConfiguration; 352 | buildSettings = { 353 | ALWAYS_SEARCH_USER_PATHS = NO; 354 | CLANG_ANALYZER_NONNULL = YES; 355 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 356 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 357 | CLANG_CXX_LIBRARY = "libc++"; 358 | CLANG_ENABLE_MODULES = YES; 359 | CLANG_ENABLE_OBJC_ARC = YES; 360 | CLANG_WARN_BOOL_CONVERSION = YES; 361 | CLANG_WARN_CONSTANT_CONVERSION = YES; 362 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 363 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 364 | CLANG_WARN_EMPTY_BODY = YES; 365 | CLANG_WARN_ENUM_CONVERSION = YES; 366 | CLANG_WARN_INFINITE_RECURSION = YES; 367 | CLANG_WARN_INT_CONVERSION = YES; 368 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 369 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 370 | CLANG_WARN_UNREACHABLE_CODE = YES; 371 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 372 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 373 | COPY_PHASE_STRIP = NO; 374 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 375 | ENABLE_NS_ASSERTIONS = NO; 376 | ENABLE_STRICT_OBJC_MSGSEND = YES; 377 | GCC_C_LANGUAGE_STANDARD = gnu99; 378 | GCC_NO_COMMON_BLOCKS = YES; 379 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 380 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 381 | GCC_WARN_UNDECLARED_SELECTOR = YES; 382 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 383 | GCC_WARN_UNUSED_FUNCTION = YES; 384 | GCC_WARN_UNUSED_VARIABLE = YES; 385 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 386 | MTL_ENABLE_DEBUG_INFO = NO; 387 | SDKROOT = iphoneos; 388 | VALIDATE_PRODUCT = YES; 389 | }; 390 | name = Release; 391 | }; 392 | 6375CBE01ED82B1100844E54 /* Debug */ = { 393 | isa = XCBuildConfiguration; 394 | buildSettings = { 395 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 396 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 397 | DEVELOPMENT_TEAM = 33K3DU6932; 398 | INFOPLIST_FILE = YJCommonMacroGather/Info.plist; 399 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 400 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 401 | PRODUCT_BUNDLE_IDENTIFIER = com.houmanager.de; 402 | PRODUCT_NAME = "$(TARGET_NAME)"; 403 | PROVISIONING_PROFILE_SPECIFIER = ""; 404 | }; 405 | name = Debug; 406 | }; 407 | 6375CBE11ED82B1100844E54 /* Release */ = { 408 | isa = XCBuildConfiguration; 409 | buildSettings = { 410 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 411 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 412 | DEVELOPMENT_TEAM = 33K3DU6932; 413 | INFOPLIST_FILE = YJCommonMacroGather/Info.plist; 414 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 415 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 416 | PRODUCT_BUNDLE_IDENTIFIER = com.houmanager.de; 417 | PRODUCT_NAME = "$(TARGET_NAME)"; 418 | PROVISIONING_PROFILE_SPECIFIER = ""; 419 | }; 420 | name = Release; 421 | }; 422 | 63938AF91F0B3C2E005BD255 /* Debug */ = { 423 | isa = XCBuildConfiguration; 424 | buildSettings = { 425 | CODE_SIGN_IDENTITY = ""; 426 | CURRENT_PROJECT_VERSION = 1; 427 | DEFINES_MODULE = YES; 428 | DEVELOPMENT_TEAM = 33K3DU6932; 429 | DYLIB_COMPATIBILITY_VERSION = 1; 430 | DYLIB_CURRENT_VERSION = 1; 431 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 432 | INFOPLIST_FILE = OCCommonMacroFramework/Info.plist; 433 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 434 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 435 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 436 | OTHER_CFLAGS = "-fembed-bitcode"; 437 | PRODUCT_BUNDLE_IDENTIFIER = com.houmanager.OCCommonMacroFramework; 438 | PRODUCT_MODULE_NAME = OCCommonMacro; 439 | PRODUCT_NAME = OCCommonMacro; 440 | SKIP_INSTALL = YES; 441 | TARGETED_DEVICE_FAMILY = "1,2"; 442 | VERSIONING_SYSTEM = "apple-generic"; 443 | VERSION_INFO_PREFIX = ""; 444 | }; 445 | name = Debug; 446 | }; 447 | 63938AFA1F0B3C2E005BD255 /* Release */ = { 448 | isa = XCBuildConfiguration; 449 | buildSettings = { 450 | CODE_SIGN_IDENTITY = ""; 451 | CURRENT_PROJECT_VERSION = 1; 452 | DEFINES_MODULE = YES; 453 | DEVELOPMENT_TEAM = 33K3DU6932; 454 | DYLIB_COMPATIBILITY_VERSION = 1; 455 | DYLIB_CURRENT_VERSION = 1; 456 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 457 | INFOPLIST_FILE = OCCommonMacroFramework/Info.plist; 458 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 459 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 460 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 461 | OTHER_CFLAGS = "-fembed-bitcode"; 462 | PRODUCT_BUNDLE_IDENTIFIER = com.houmanager.OCCommonMacroFramework; 463 | PRODUCT_MODULE_NAME = OCCommonMacro; 464 | PRODUCT_NAME = OCCommonMacro; 465 | SKIP_INSTALL = YES; 466 | TARGETED_DEVICE_FAMILY = "1,2"; 467 | VERSIONING_SYSTEM = "apple-generic"; 468 | VERSION_INFO_PREFIX = ""; 469 | }; 470 | name = Release; 471 | }; 472 | /* End XCBuildConfiguration section */ 473 | 474 | /* Begin XCConfigurationList section */ 475 | 6375CBC31ED82B1100844E54 /* Build configuration list for PBXProject "YJCommonMacroGather" */ = { 476 | isa = XCConfigurationList; 477 | buildConfigurations = ( 478 | 6375CBDD1ED82B1100844E54 /* Debug */, 479 | 6375CBDE1ED82B1100844E54 /* Release */, 480 | ); 481 | defaultConfigurationIsVisible = 0; 482 | defaultConfigurationName = Release; 483 | }; 484 | 6375CBDF1ED82B1100844E54 /* Build configuration list for PBXNativeTarget "YJCommonMacroGather" */ = { 485 | isa = XCConfigurationList; 486 | buildConfigurations = ( 487 | 6375CBE01ED82B1100844E54 /* Debug */, 488 | 6375CBE11ED82B1100844E54 /* Release */, 489 | ); 490 | defaultConfigurationIsVisible = 0; 491 | defaultConfigurationName = Release; 492 | }; 493 | 63938AF81F0B3C2E005BD255 /* Build configuration list for PBXNativeTarget "OCCommonMacroFramework" */ = { 494 | isa = XCConfigurationList; 495 | buildConfigurations = ( 496 | 63938AF91F0B3C2E005BD255 /* Debug */, 497 | 63938AFA1F0B3C2E005BD255 /* Release */, 498 | ); 499 | defaultConfigurationIsVisible = 0; 500 | }; 501 | /* End XCConfigurationList section */ 502 | }; 503 | rootObject = 6375CBC01ED82B1100844E54 /* Project object */; 504 | } 505 | -------------------------------------------------------------------------------- /Carthage/Checkouts/YJCommonMacro/YJCommonMacroGather.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Carthage/Checkouts/YJCommonMacro/YJCommonMacroGather.xcodeproj/xcshareddata/xcschemes/OCCommonMacroFramework.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /Carthage/Checkouts/YJCommonMacro/YJCommonMacroGather/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // YJCommonMacroGather 4 | // 5 | // Created by YJHou on 2017/5/26. 6 | // Copyright © 2017年 YJHou. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /Carthage/Checkouts/YJCommonMacro/YJCommonMacroGather/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // YJCommonMacroGather 4 | // 5 | // Created by YJHou on 2017/5/26. 6 | // Copyright © 2017年 YJHou. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // 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. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // 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. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // 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. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // 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. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Carthage/Checkouts/YJCommonMacro/YJCommonMacroGather/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /Carthage/Checkouts/YJCommonMacro/YJCommonMacroGather/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Carthage/Checkouts/YJCommonMacro/YJCommonMacroGather/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Carthage/Checkouts/YJCommonMacro/YJCommonMacroGather/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Carthage/Checkouts/YJCommonMacro/YJCommonMacroGather/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // YJCommonMacroGather 4 | // 5 | // Created by YJHou on 2017/5/26. 6 | // Copyright © 2017年 YJHou. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /Carthage/Checkouts/YJCommonMacro/YJCommonMacroGather/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // YJCommonMacroGather 4 | // 5 | // Created by YJHou on 2017/5/26. 6 | // Copyright © 2017年 YJHou. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | @interface ViewController () 12 | 13 | @end 14 | 15 | @implementation ViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view, typically from a nib. 20 | 21 | } 22 | 23 | 24 | - (void)didReceiveMemoryWarning { 25 | [super didReceiveMemoryWarning]; 26 | // Dispose of any resources that can be recreated. 27 | } 28 | 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Carthage/Checkouts/YJCommonMacro/YJCommonMacroGather/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // YJCommonMacroGather 4 | // 5 | // Created by YJHou on 2017/5/26. 6 | // Copyright © 2017年 YJHou. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 houmanager 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | iOS 11适配源码 [简书地址](http://www.jianshu.com/p/de19e9cda481) 4 | 5 | # 安全区域的适配 6 | 7 | 用Xcode 9 创建storyboard或者xib时,最低版本支持iOS 8时会报: Safe Area Layout Guide before iOS 9.0 如图: 8 | 9 | ![](https://ws4.sinaimg.cn/large/006tNc79ly1fjpyydjr0mj30b103j74n.jpg) 10 | 11 | 原因:在iOS7中引入的Top Layout Guide和Bottom Layout Guide,这些布局指南在iOS 11中被弃用,取而代之的是Safe Area Layout Guide. 12 | 13 | 当一个Viewcontroller 被嵌入到UINavigationcontroller 、Tab bar 或者ToolBar 中时, 我们可以使用 `Top Layout Guide` 和 `Bottom Layout Guide` 让 view根 据上下锚点自适应内容。如图: 14 | 15 | ![](https://ws2.sinaimg.cn/large/006tNc79ly1fjqyr027ykj30im0kkgmb.jpg) 16 | 17 | 在iOS 11中取而代之的是Safe Area Layout Guide,在iOS11中苹果用单独的Safe Area属性代替了上面的属性.安全区域限制于顶部和底部的锚点。如图: 18 | 19 | ![](https://ws2.sinaimg.cn/large/006tNc79ly1fjqytaszk5j30in0kujs1.jpg) 20 | 21 | 解决办法:适配最低支持版本iOS 8,将图中的 Use Safe Area Layout Guide 取消即可 22 | 23 | ![](https://ws1.sinaimg.cn/large/006tNc79ly1fjqyvinaxlj307605hmxh.jpg) 24 | 25 | 可以通过一个新的属性:addtionalSafeAreaInsets来改变safeAreaInsets的值,当你的viewController改变了它的safeAreaInsets值时,有两种方式获取到回调: 26 | 27 | ```objc 28 | UIView.safeAreaInsetsDidChange() 29 | UIViewController.viewSafeAreaInsetsDidChange() 30 | ``` 31 | 32 | 如果你的APP中是自定义的Navigationbar,隐藏掉系统的Navigationbar,并且tableView的frame为(0, 0, kSCREEN_WIDTH, kSCREEN_HEIGHT)开始,那么系统会自动调整SafeAreaInsets值为(20,0,0,0),如果使用了系统的navigationbar,那么SafeAreaInsets值为(64,0,0,0),如果也使用了系统的tabbar,那么SafeAreaInsets值为(64,0,49,0) 33 | 34 | 35 | # UIScrollView、UITableView、UICollectionView适配 36 | 37 | ## UITableView 38 | 39 | Tableview莫名奇妙的偏移20pt或者64pt, 原因是iOS11弃用了automaticallyAdjustsScrollViewInsets属性,取而代之的是UIScrollView新增了contentInsetAdjustmentBehavior属性,这一切的罪魁祸首都是新引入的safeArea 40 | 41 | 适配: 42 | 43 | ```objc 44 | // 定义宏 45 | #define adjustsScrollViewInsets(scrollView)\ 46 | do {\ 47 | _Pragma("clang diagnostic push")\ 48 | _Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"")\ 49 | if ([scrollView respondsToSelector:NSSelectorFromString(@"setContentInsetAdjustmentBehavior:")]) {\ 50 | NSMethodSignature *signature = [UIScrollView instanceMethodSignatureForSelector:@selector(setContentInsetAdjustmentBehavior:)];\ 51 | NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];\ 52 | NSInteger argument = 2;\ 53 | invocation.target = scrollView;\ 54 | invocation.selector = @selector(setContentInsetAdjustmentBehavior:);\ 55 | [invocation setArgument:&argument atIndex:2];\ 56 | [invocation retainArguments];\ 57 | [invocation invoke];\ 58 | }\ 59 | _Pragma("clang diagnostic pop")\ 60 | } while (0) 61 | ``` 62 | 如果你使用了Masonry,那么你需要适配safeArea 63 | 64 | ```objc 65 | if (@available(iOS 11.0, *)) { 66 | make.edges.equalTo()(self.view.safeAreaInsets) 67 | } else { 68 | make.edges.equalTo()(self.view) 69 | } 70 | ``` 71 | 72 | - 首先结构发生了变化:对比 73 | 74 | 75 | 76 | 77 | 适配:设置TableView的高度为全屏,会自动适配。 78 | 79 | - 有点Eclipse的味道了,遵守代理后,点击fix会自动填充完所需方法 80 | 81 | ![](https://ws1.sinaimg.cn/large/006tNc79ly1fjqzrpw8fpj30x908amz5.jpg) 82 | 83 | 自动实现所需方法效果(貌似实现了很多不常用的): 84 | 85 | ![](https://ws4.sinaimg.cn/large/006tNc79ly1fjr6zqkptuj30ww0ieae8.jpg) 86 | 87 | - 代理方法的优化: 88 | 89 | iOS 11之前不设置sectionHeaderView或者sectionFooterView会走设置高度的方法。 90 | iOS 11 如果不实现下面这两个方法,不会走设置高度的方法,即:设置高度失效。 91 | 92 | 当TableView时分组样式Grouped,设置高度为不等0的很小的数也会失效。所以必须实现下面两个方法和并设置高度。 93 | 94 | `- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section;` 95 | 96 | `- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section` 97 | 98 | - iOS 11默认开启了Self-Sizing(在WWDC 2017 session204 Updating Your App for iOS 11 中有介绍),也是造成上面代理方法优化的问题的根本原因,同时在获取TableView的ContentSize也不再准确的大小。均是UITableViewAutomaticDimension 预估高度造成。 99 | 100 | 解决办法: 101 | 102 | 将`estimatedRowHeight`、`estimatedSectionHeaderHeight`、`estimatedSectionFooterHeight`均设置为0,即将默认开启关闭。 103 | 104 | ## UIScrollView 105 | - scrollView在iOS11新增的两个属性:`adjustContentInset` 和 `contentInsetAdjustmentBehavior`。 106 | 107 | `adjustContentInset`表示contentView.frame.origin偏移了scrollview.frame.origin多少;是系统计算得来的,计算方式由contentInsetAdjustmentBehavior决定。有以下几种枚举计算方式: 108 | 109 | 1. `UIScrollViewContentInsetAdjustmentAutomatic`:如果scrollview在一个automaticallyAdjustsScrollViewContentInset = YES 的controller上,并且这个Controller包含在一个Navigation controller中,这种情况下会设置在top & bottom上 adjustedContentInset = safeAreaInset + contentInset不管是否滚动。其他情况下与UIScrollViewContentInsetAdjustmentScrollableAxes相同 110 | 111 | 2. `UIScrollViewContentInsetAdjustmentScrollableAxes`: 在可滚动方向上adjustedContentInset = safeAreaInset + contentInset,在不可滚动方向上adjustedContentInset = contentInset;依赖于scrollEnabled和alwaysBounceHorizontal / Vertical = YES,scrollEnabled默认为YES,所以大多数情况下,计算方式还是adjustedContentInset = safeAreaInset + contentInset 112 | 113 | 3. `UIScrollViewContentInsetAdjustmentNever`: 这种方式下adjustedContentInset = contentInset 114 | 115 | 4. `UIScrollViewContentInsetAdjustmentAlways`: 这种方式下会这么计算 adjustedContentInset = safeAreaInset + contentInset 116 | 117 | 当`contentInsetAdjustmentBehavior`设置为UIScrollViewContentInsetAdjustmentNever的时候,adjustContentInset值不受SafeAreaInset值的影响。 118 | 119 | ## 解决办法总结 120 | 121 | ### 重新设置tableView的contentInset值,来抵消掉SafeAreaInset值 122 | 123 | 因为内容下移偏移量 = contentInset + SafeAreaInset,如果之前自己设置了contentInset值为(64,0,0,0),现在系统又设置了SafeAreaInsets值为(64,0,0,0),那么tableView内容下移了64pt,这种情况下,可以设置contentInset值为(0,0,0,0),也就是遵从系统的设置了。 124 | 125 | ### 设置tableView的contentInsetAdjustmentBehavior属性 126 | 127 | `contentInsetAdjustmentBehavior`属性也是用来取代`automaticallyAdjustsScrollViewInsets`属性的,推荐使用这种方式 128 | 如果不需要系统为你设置边缘距离,可以做以下设置: 129 | 130 | ```objc 131 | //如果iOS的系统是11.0,会有这样一个宏定义“#define __IPHONE_11_0 110000”;如果系统版本低于11.0则没有这个宏定义 132 | #ifdef __IPHONE_11_0 133 | if ([tableView respondsToSelector:@selector(setContentInsetAdjustmentBehavior:)]) { 134 | tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; 135 | } 136 | #endif 137 | ``` 138 | ### 通过设置iOS 11新增的属性addtionalSafeAreaInset 139 | 140 | iOS 11之前,通过将Controller的automaticallyAdjustsScrollViewInsets属性设置为NO,来禁止系统对tableView调整contentInsets的。如果还是想从Controller级别解决问题,那么可以通过设置Controller的additionalSafeAreaInsets属性,如果SafeAreaInset值为(20,0,0,0),那么设置additionalSafeAreaInsets属性值为(-20,0,0,0),则SafeAreaInsets不会对adjustedContentInset值产生影响,tableView内容不会显示异常。这里需要注意的是addtionalSafeAreaInset是Controller的属性,要知道SafeAreaInset的值是由哪个Controller引起的,可能是由自己的Controller调整的,可能是navigationController调整的。是由哪个Controller调整的,则设置哪个Controller的addtionalSafeAreaInset值来抵消掉SafeAreaInset值。 141 | 142 | # 导航适配 143 | 144 | - iOS 11增加了大标题的显示,通过UINavigationBar的prefersLargeTitles属性控制,默认是不开启的。可以忽略不用做适配。 145 | 146 | 可以通过navigationItem的largeTitleDisplayMode属性控制不同页面大标题的显示,枚举如下: 147 | 148 | ```objc 149 | typedef NS_ENUM(NSInteger, UINavigationItemLargeTitleDisplayMode) { 150 | // 默认自动模式依赖上一个 item 的特性 151 | UINavigationItemLargeTitleDisplayModeAutomatic, 152 | // 针对当前 item 总是启用大标题特性 153 | UINavigationItemLargeTitleDisplayModeAlways, 154 | // Never 155 | UINavigationItemLargeTitleDisplayModeNever, 156 | } NS_SWIFT_NAME(UINavigationItem.LargeTitleDisplayMode); 157 | ``` 158 | - Navigation 集成 UISearchController 159 | 160 | 把你的UISearchController赋值给navigationItem,就可以实现将UISearchController集成到Navigation。 161 | 162 | ```objc 163 | navigationItem.searchController //iOS 11 新增属性 164 | navigationItem.hidesSearchBarWhenScrolling //决定滑动的时候是否隐藏搜索框;iOS 11 新增属性 165 | ``` 166 | 167 | - UINavigationController和滚动交互 168 | 169 | 滚动的时候,以下交互操作都是由UINavigationController负责调动的: 170 | 171 | 1. UIsearchController搜索框效果更新 172 | 2. 大标题效果的控制 173 | 3. Rubber banding效果 //当你开始往下拉,大标题会变大来回应那个滚轮 174 | 175 | 所以,如果你使用navigation bar,组装push和pop体验,你不会得到searchController的集成、大标题的控制更新和Rubber banding效果,因为这些都是由UINavigationController控制的。 176 | 177 | - UIToolbar and UINavigationBar— Layout 178 | 179 | 在 iOS 11 中,当苹果进行所有这些新特性时,也进行了其他的优化,针对 UIToolbar 和 UINavigaBar 做了新的自动布局扩展支持,自定义的bar button items、自定义的title都可以通过layout来表示尺寸。 需要注意的是,你的constraints需要在view内部设置,所以如果你有一个自定义的标题视图,你需要确保任何约束只依赖于标题视图及其任何子视图。当你使用自动布局,系统假设你知道你在做什么。 180 | 181 | - Avoiding Zero-Sized Custom Views 182 | 183 | 自定义视图的size为0是因为你有一些模糊的约束布局。要避免视图尺寸为0,可以从以下方面做: 184 | 185 | 1. UINavigationBar 和 UIToolbar 提供位置 186 | 187 | 2. 开发者则必须提供视图的size,有三种方式: 188 | 189 | a. 对宽度和高度的约束; 190 | b. 实现 intrinsicContentSize; 191 | c. 通过约束关联你的子视图; 192 | 193 | # 导航栏 194 | 195 | ## 导航栏高度的变化 196 | 197 | iOS11之前导航栏默认高度为64pt(statusBar + NavigationBar),iOS11之后如果设置了prefersLargeTitles = YES则为96pt,默认情况下还是64pt,但在iPhoneX上由于刘海的出现statusBar由以前的20pt变成了44pt,所以iPhoneX上高度变为88pt,如果项目里隐藏了导航栏加了自定义按钮之类的,注意适配一下。 198 | 199 | ## 导航栏图层及对titleView布局的影响 200 | 201 | iOS11之前导航栏的title是添加在`UINavigationItemView上面,而navigationBarButton则直接添加在UINavigationBar上面,如果设置了titleView,则titleView也是直接添加在UINavigationBar上面。 202 | 203 | ![](https://ws1.sinaimg.cn/large/006tNc79ly1fjs72xxjecj30bn069dgq.jpg) 204 | ![](https://ws1.sinaimg.cn/large/006tNc79ly1fjs718e860j30be0a3abe.jpg) 205 | 206 | iOS11之后,大概因为largeTitle的原因,视图层级发生了变化,如果没有给titleView赋值,则titleView会直接添加在_UINavigationBarContentView上面,如果赋值了titleView,则会把titleView添加在_UITAMICAdaptorView上,而navigationBarButton被加在了_UIButtonBarStackView上,然后他们都被加在了_UINavigationBarContentView上 207 | 208 | ![](https://ws1.sinaimg.cn/large/006tNc79ly1fjs78ugjhaj30bn05qq3p.jpg) 209 | ![](https://ws2.sinaimg.cn/large/006tNc79ly1fjs7g6bqotj30bb0b075t.jpg) 210 | 211 | 如果你的项目是自定义的navigationBar,那么在iOS11上运行就可能出现布局错乱的bug,解决办法是重写UINavigationBar的layoutSubviews方法,调整布局: 212 | 213 | ```objc 214 | - (void)layoutSubviews { 215 | [super layoutSubviews]; 216 | 217 | // 注意导航栏及状态栏高度适配 218 | self.frame = CGRectMake(0, 0, CGRectGetWidth(self.frame), naviBarHeight); 219 | for (UIView *view in self.subviews) { 220 | if([NSStringFromClass([view class]) containsString:@"Background"]) { 221 | view.frame = self.bounds; 222 | }else if ([NSStringFromClass([view class]) containsString:@"ContentView"]) { 223 | CGRect frame = view.frame; 224 | frame.origin.y = statusBarHeight; 225 | frame.size.height = self.bounds.size.height - frame.origin.y; 226 | view.frame = frame; 227 | } 228 | } 229 | } 230 | ``` 231 | 232 | titleView支持autolayout,这要求titleView必须是能够自撑开的或实现了- intrinsicContentSize方法: 233 | 234 | ```objc 235 | - (CGSize)intrinsicContentSize { 236 | return UILayoutFittingExpandedSize; 237 | } 238 | ``` 239 | 240 | # TabBarController 241 | 242 | 主要是tabBar高度及tabBarItem偏移适配,iPhoneX由于底部安全区的原因UITabBar高度由49pt变成了83pt,可以通过判断机型来修改相关界面代码: 243 | 244 | ```objc 245 | // UIDevice 分类 246 | - (BOOL)isIPhoneX{ 247 | if ([UIScreen instancesRespondToSelector:@selector(currentMode)]) { 248 | return CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size); 249 | }else{ 250 | return NO; 251 | } 252 | } 253 | ``` 254 | 255 | # 其他适配注意事项 256 | 257 | 部分项目的轮播图在iOS 11+Xcode编译的情况下,会出现是上下左右任意滚动的bug,推荐使用 YJBannerView轮播图,完全适配iOS 11。Github地址:[YJBannerView](https://github.com/stackhou/YJBannerViewOC) 258 | -------------------------------------------------------------------------------- /iOS11Adaptation.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 63AC177C1F7231D2005DCA8E /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 63AC177B1F7231D2005DCA8E /* AppDelegate.m */; }; 11 | 63AC17821F7231D2005DCA8E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 63AC17801F7231D2005DCA8E /* Main.storyboard */; }; 12 | 63AC17841F7231D2005DCA8E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 63AC17831F7231D2005DCA8E /* Assets.xcassets */; }; 13 | 63AC17871F7231D2005DCA8E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 63AC17851F7231D2005DCA8E /* LaunchScreen.storyboard */; }; 14 | 63AC178A1F7231D2005DCA8E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 63AC17891F7231D2005DCA8E /* main.m */; }; 15 | 63C3D98A1F739F21004D87F1 /* OCCommonMacro.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C3D9891F739F21004D87F1 /* OCCommonMacro.framework */; }; 16 | 63C3D98F1F73B939004D87F1 /* 01.png in Resources */ = {isa = PBXBuildFile; fileRef = 63C3D98E1F73B939004D87F1 /* 01.png */; }; 17 | 63DB866C1F735ABB00889D6A /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 63DB866B1F735ABB00889D6A /* MainViewController.m */; }; 18 | 63DB866F1F735BBA00889D6A /* SubTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 63DB866E1F735BBA00889D6A /* SubTableViewController.m */; }; 19 | 63DB86721F735D0300889D6A /* ElegantTableView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63DB86711F735D0300889D6A /* ElegantTableView.framework */; }; 20 | 63EAD5F01F74D3F300DBA57E /* YJNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 63EAD5EF1F74D3F300DBA57E /* YJNavigationController.m */; }; 21 | 63EAD5F31F74D43700DBA57E /* YJNavigationBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 63EAD5F21F74D43700DBA57E /* YJNavigationBar.m */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXFileReference section */ 25 | 63AC17771F7231D2005DCA8E /* iOS11Adaptation.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOS11Adaptation.app; sourceTree = BUILT_PRODUCTS_DIR; }; 26 | 63AC177A1F7231D2005DCA8E /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 27 | 63AC177B1F7231D2005DCA8E /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 28 | 63AC17811F7231D2005DCA8E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 29 | 63AC17831F7231D2005DCA8E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 30 | 63AC17861F7231D2005DCA8E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 31 | 63AC17881F7231D2005DCA8E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32 | 63AC17891F7231D2005DCA8E /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 33 | 63C3D9891F739F21004D87F1 /* OCCommonMacro.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OCCommonMacro.framework; path = Carthage/Build/iOS/OCCommonMacro.framework; sourceTree = ""; }; 34 | 63C3D98B1F739F3B004D87F1 /* PrefixHeader.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrefixHeader.pch; sourceTree = ""; }; 35 | 63C3D98E1F73B939004D87F1 /* 01.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 01.png; sourceTree = ""; }; 36 | 63DB866A1F735ABB00889D6A /* MainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = ""; }; 37 | 63DB866B1F735ABB00889D6A /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = ""; }; 38 | 63DB866D1F735BBA00889D6A /* SubTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SubTableViewController.h; sourceTree = ""; }; 39 | 63DB866E1F735BBA00889D6A /* SubTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SubTableViewController.m; sourceTree = ""; }; 40 | 63DB86711F735D0300889D6A /* ElegantTableView.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ElegantTableView.framework; path = Carthage/Build/iOS/ElegantTableView.framework; sourceTree = ""; }; 41 | 63EAD5EE1F74D3F300DBA57E /* YJNavigationController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YJNavigationController.h; sourceTree = ""; }; 42 | 63EAD5EF1F74D3F300DBA57E /* YJNavigationController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YJNavigationController.m; sourceTree = ""; }; 43 | 63EAD5F11F74D43700DBA57E /* YJNavigationBar.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YJNavigationBar.h; sourceTree = ""; }; 44 | 63EAD5F21F74D43700DBA57E /* YJNavigationBar.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YJNavigationBar.m; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 63AC17741F7231D2005DCA8E /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | 63C3D98A1F739F21004D87F1 /* OCCommonMacro.framework in Frameworks */, 53 | 63DB86721F735D0300889D6A /* ElegantTableView.framework in Frameworks */, 54 | ); 55 | runOnlyForDeploymentPostprocessing = 0; 56 | }; 57 | /* End PBXFrameworksBuildPhase section */ 58 | 59 | /* Begin PBXGroup section */ 60 | 63AC176E1F7231D2005DCA8E = { 61 | isa = PBXGroup; 62 | children = ( 63 | 63AC17791F7231D2005DCA8E /* iOS11Adaptation */, 64 | 63AC17781F7231D2005DCA8E /* Products */, 65 | 63DB86701F735D0300889D6A /* Frameworks */, 66 | ); 67 | sourceTree = ""; 68 | }; 69 | 63AC17781F7231D2005DCA8E /* Products */ = { 70 | isa = PBXGroup; 71 | children = ( 72 | 63AC17771F7231D2005DCA8E /* iOS11Adaptation.app */, 73 | ); 74 | name = Products; 75 | sourceTree = ""; 76 | }; 77 | 63AC17791F7231D2005DCA8E /* iOS11Adaptation */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | 63C3D98C1F73B939004D87F1 /* Resources */, 81 | 63AC177A1F7231D2005DCA8E /* AppDelegate.h */, 82 | 63AC177B1F7231D2005DCA8E /* AppDelegate.m */, 83 | 63DB866A1F735ABB00889D6A /* MainViewController.h */, 84 | 63DB866B1F735ABB00889D6A /* MainViewController.m */, 85 | 63DB866D1F735BBA00889D6A /* SubTableViewController.h */, 86 | 63DB866E1F735BBA00889D6A /* SubTableViewController.m */, 87 | 63EAD5EE1F74D3F300DBA57E /* YJNavigationController.h */, 88 | 63EAD5EF1F74D3F300DBA57E /* YJNavigationController.m */, 89 | 63EAD5F11F74D43700DBA57E /* YJNavigationBar.h */, 90 | 63EAD5F21F74D43700DBA57E /* YJNavigationBar.m */, 91 | 63AC17801F7231D2005DCA8E /* Main.storyboard */, 92 | 63AC17831F7231D2005DCA8E /* Assets.xcassets */, 93 | 63AC17851F7231D2005DCA8E /* LaunchScreen.storyboard */, 94 | 63AC17881F7231D2005DCA8E /* Info.plist */, 95 | 63AC17891F7231D2005DCA8E /* main.m */, 96 | 63C3D98B1F739F3B004D87F1 /* PrefixHeader.pch */, 97 | ); 98 | path = iOS11Adaptation; 99 | sourceTree = ""; 100 | }; 101 | 63C3D98C1F73B939004D87F1 /* Resources */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 63C3D98D1F73B939004D87F1 /* images */, 105 | ); 106 | path = Resources; 107 | sourceTree = ""; 108 | }; 109 | 63C3D98D1F73B939004D87F1 /* images */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 63C3D98E1F73B939004D87F1 /* 01.png */, 113 | ); 114 | path = images; 115 | sourceTree = ""; 116 | }; 117 | 63DB86701F735D0300889D6A /* Frameworks */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 63C3D9891F739F21004D87F1 /* OCCommonMacro.framework */, 121 | 63DB86711F735D0300889D6A /* ElegantTableView.framework */, 122 | ); 123 | name = Frameworks; 124 | sourceTree = ""; 125 | }; 126 | /* End PBXGroup section */ 127 | 128 | /* Begin PBXNativeTarget section */ 129 | 63AC17761F7231D2005DCA8E /* iOS11Adaptation */ = { 130 | isa = PBXNativeTarget; 131 | buildConfigurationList = 63AC178D1F7231D2005DCA8E /* Build configuration list for PBXNativeTarget "iOS11Adaptation" */; 132 | buildPhases = ( 133 | 63AC17731F7231D2005DCA8E /* Sources */, 134 | 63AC17741F7231D2005DCA8E /* Frameworks */, 135 | 63AC17751F7231D2005DCA8E /* Resources */, 136 | 63DB86731F735D1000889D6A /* ShellScript */, 137 | ); 138 | buildRules = ( 139 | ); 140 | dependencies = ( 141 | ); 142 | name = iOS11Adaptation; 143 | productName = iOS11Adaptation; 144 | productReference = 63AC17771F7231D2005DCA8E /* iOS11Adaptation.app */; 145 | productType = "com.apple.product-type.application"; 146 | }; 147 | /* End PBXNativeTarget section */ 148 | 149 | /* Begin PBXProject section */ 150 | 63AC176F1F7231D2005DCA8E /* Project object */ = { 151 | isa = PBXProject; 152 | attributes = { 153 | LastUpgradeCheck = 0900; 154 | ORGANIZATIONNAME = "https://github.com/stackhou"; 155 | TargetAttributes = { 156 | 63AC17761F7231D2005DCA8E = { 157 | CreatedOnToolsVersion = 9.0; 158 | ProvisioningStyle = Automatic; 159 | }; 160 | }; 161 | }; 162 | buildConfigurationList = 63AC17721F7231D2005DCA8E /* Build configuration list for PBXProject "iOS11Adaptation" */; 163 | compatibilityVersion = "Xcode 8.0"; 164 | developmentRegion = en; 165 | hasScannedForEncodings = 0; 166 | knownRegions = ( 167 | en, 168 | Base, 169 | ); 170 | mainGroup = 63AC176E1F7231D2005DCA8E; 171 | productRefGroup = 63AC17781F7231D2005DCA8E /* Products */; 172 | projectDirPath = ""; 173 | projectRoot = ""; 174 | targets = ( 175 | 63AC17761F7231D2005DCA8E /* iOS11Adaptation */, 176 | ); 177 | }; 178 | /* End PBXProject section */ 179 | 180 | /* Begin PBXResourcesBuildPhase section */ 181 | 63AC17751F7231D2005DCA8E /* Resources */ = { 182 | isa = PBXResourcesBuildPhase; 183 | buildActionMask = 2147483647; 184 | files = ( 185 | 63AC17871F7231D2005DCA8E /* LaunchScreen.storyboard in Resources */, 186 | 63AC17841F7231D2005DCA8E /* Assets.xcassets in Resources */, 187 | 63C3D98F1F73B939004D87F1 /* 01.png in Resources */, 188 | 63AC17821F7231D2005DCA8E /* Main.storyboard in Resources */, 189 | ); 190 | runOnlyForDeploymentPostprocessing = 0; 191 | }; 192 | /* End PBXResourcesBuildPhase section */ 193 | 194 | /* Begin PBXShellScriptBuildPhase section */ 195 | 63DB86731F735D1000889D6A /* ShellScript */ = { 196 | isa = PBXShellScriptBuildPhase; 197 | buildActionMask = 2147483647; 198 | files = ( 199 | ); 200 | inputPaths = ( 201 | "$(SRCROOT)/Carthage/Build/iOS/ElegantTableView.framework", 202 | "$(SRCROOT)/Carthage/Build/iOS/OCCommonMacro.framework", 203 | ); 204 | outputPaths = ( 205 | ); 206 | runOnlyForDeploymentPostprocessing = 0; 207 | shellPath = /bin/sh; 208 | shellScript = "/usr/local/bin/carthage copy-frameworks"; 209 | }; 210 | /* End PBXShellScriptBuildPhase section */ 211 | 212 | /* Begin PBXSourcesBuildPhase section */ 213 | 63AC17731F7231D2005DCA8E /* Sources */ = { 214 | isa = PBXSourcesBuildPhase; 215 | buildActionMask = 2147483647; 216 | files = ( 217 | 63DB866F1F735BBA00889D6A /* SubTableViewController.m in Sources */, 218 | 63AC178A1F7231D2005DCA8E /* main.m in Sources */, 219 | 63EAD5F31F74D43700DBA57E /* YJNavigationBar.m in Sources */, 220 | 63AC177C1F7231D2005DCA8E /* AppDelegate.m in Sources */, 221 | 63EAD5F01F74D3F300DBA57E /* YJNavigationController.m in Sources */, 222 | 63DB866C1F735ABB00889D6A /* MainViewController.m in Sources */, 223 | ); 224 | runOnlyForDeploymentPostprocessing = 0; 225 | }; 226 | /* End PBXSourcesBuildPhase section */ 227 | 228 | /* Begin PBXVariantGroup section */ 229 | 63AC17801F7231D2005DCA8E /* Main.storyboard */ = { 230 | isa = PBXVariantGroup; 231 | children = ( 232 | 63AC17811F7231D2005DCA8E /* Base */, 233 | ); 234 | name = Main.storyboard; 235 | sourceTree = ""; 236 | }; 237 | 63AC17851F7231D2005DCA8E /* LaunchScreen.storyboard */ = { 238 | isa = PBXVariantGroup; 239 | children = ( 240 | 63AC17861F7231D2005DCA8E /* Base */, 241 | ); 242 | name = LaunchScreen.storyboard; 243 | sourceTree = ""; 244 | }; 245 | /* End PBXVariantGroup section */ 246 | 247 | /* Begin XCBuildConfiguration section */ 248 | 63AC178B1F7231D2005DCA8E /* Debug */ = { 249 | isa = XCBuildConfiguration; 250 | buildSettings = { 251 | ALWAYS_SEARCH_USER_PATHS = NO; 252 | CLANG_ANALYZER_NONNULL = YES; 253 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 254 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 255 | CLANG_CXX_LIBRARY = "libc++"; 256 | CLANG_ENABLE_MODULES = YES; 257 | CLANG_ENABLE_OBJC_ARC = YES; 258 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 259 | CLANG_WARN_BOOL_CONVERSION = YES; 260 | CLANG_WARN_COMMA = YES; 261 | CLANG_WARN_CONSTANT_CONVERSION = YES; 262 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 263 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 264 | CLANG_WARN_EMPTY_BODY = YES; 265 | CLANG_WARN_ENUM_CONVERSION = YES; 266 | CLANG_WARN_INFINITE_RECURSION = YES; 267 | CLANG_WARN_INT_CONVERSION = YES; 268 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 269 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 270 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 271 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 272 | CLANG_WARN_STRICT_PROTOTYPES = YES; 273 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 274 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 275 | CLANG_WARN_UNREACHABLE_CODE = YES; 276 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 277 | CODE_SIGN_IDENTITY = "iPhone Developer"; 278 | COPY_PHASE_STRIP = NO; 279 | DEBUG_INFORMATION_FORMAT = dwarf; 280 | ENABLE_STRICT_OBJC_MSGSEND = YES; 281 | ENABLE_TESTABILITY = YES; 282 | GCC_C_LANGUAGE_STANDARD = gnu11; 283 | GCC_DYNAMIC_NO_PIC = NO; 284 | GCC_NO_COMMON_BLOCKS = YES; 285 | GCC_OPTIMIZATION_LEVEL = 0; 286 | GCC_PREPROCESSOR_DEFINITIONS = ( 287 | "DEBUG=1", 288 | "$(inherited)", 289 | ); 290 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 291 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 292 | GCC_WARN_UNDECLARED_SELECTOR = YES; 293 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 294 | GCC_WARN_UNUSED_FUNCTION = YES; 295 | GCC_WARN_UNUSED_VARIABLE = YES; 296 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 297 | MTL_ENABLE_DEBUG_INFO = YES; 298 | ONLY_ACTIVE_ARCH = YES; 299 | SDKROOT = iphoneos; 300 | }; 301 | name = Debug; 302 | }; 303 | 63AC178C1F7231D2005DCA8E /* Release */ = { 304 | isa = XCBuildConfiguration; 305 | buildSettings = { 306 | ALWAYS_SEARCH_USER_PATHS = NO; 307 | CLANG_ANALYZER_NONNULL = YES; 308 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 309 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 310 | CLANG_CXX_LIBRARY = "libc++"; 311 | CLANG_ENABLE_MODULES = YES; 312 | CLANG_ENABLE_OBJC_ARC = YES; 313 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 314 | CLANG_WARN_BOOL_CONVERSION = YES; 315 | CLANG_WARN_COMMA = YES; 316 | CLANG_WARN_CONSTANT_CONVERSION = YES; 317 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 318 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 319 | CLANG_WARN_EMPTY_BODY = YES; 320 | CLANG_WARN_ENUM_CONVERSION = YES; 321 | CLANG_WARN_INFINITE_RECURSION = YES; 322 | CLANG_WARN_INT_CONVERSION = YES; 323 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 324 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 325 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 326 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 327 | CLANG_WARN_STRICT_PROTOTYPES = YES; 328 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 329 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 330 | CLANG_WARN_UNREACHABLE_CODE = YES; 331 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 332 | CODE_SIGN_IDENTITY = "iPhone Developer"; 333 | COPY_PHASE_STRIP = NO; 334 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 335 | ENABLE_NS_ASSERTIONS = NO; 336 | ENABLE_STRICT_OBJC_MSGSEND = YES; 337 | GCC_C_LANGUAGE_STANDARD = gnu11; 338 | GCC_NO_COMMON_BLOCKS = YES; 339 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 340 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 341 | GCC_WARN_UNDECLARED_SELECTOR = YES; 342 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 343 | GCC_WARN_UNUSED_FUNCTION = YES; 344 | GCC_WARN_UNUSED_VARIABLE = YES; 345 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 346 | MTL_ENABLE_DEBUG_INFO = NO; 347 | SDKROOT = iphoneos; 348 | VALIDATE_PRODUCT = YES; 349 | }; 350 | name = Release; 351 | }; 352 | 63AC178E1F7231D2005DCA8E /* Debug */ = { 353 | isa = XCBuildConfiguration; 354 | buildSettings = { 355 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 356 | CODE_SIGN_STYLE = Automatic; 357 | DEVELOPMENT_TEAM = 33K3DU6932; 358 | FRAMEWORK_SEARCH_PATHS = ( 359 | "$(inherited)", 360 | "$(PROJECT_DIR)/Carthage/Build/iOS", 361 | ); 362 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 363 | GCC_PREFIX_HEADER = iOS11Adaptation/PrefixHeader.pch; 364 | INFOPLIST_FILE = iOS11Adaptation/Info.plist; 365 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 366 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 367 | PRODUCT_BUNDLE_IDENTIFIER = com.houmananger.demo; 368 | PRODUCT_NAME = "$(TARGET_NAME)"; 369 | TARGETED_DEVICE_FAMILY = 1; 370 | }; 371 | name = Debug; 372 | }; 373 | 63AC178F1F7231D2005DCA8E /* Release */ = { 374 | isa = XCBuildConfiguration; 375 | buildSettings = { 376 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 377 | CODE_SIGN_STYLE = Automatic; 378 | DEVELOPMENT_TEAM = 33K3DU6932; 379 | FRAMEWORK_SEARCH_PATHS = ( 380 | "$(inherited)", 381 | "$(PROJECT_DIR)/Carthage/Build/iOS", 382 | ); 383 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 384 | GCC_PREFIX_HEADER = iOS11Adaptation/PrefixHeader.pch; 385 | INFOPLIST_FILE = iOS11Adaptation/Info.plist; 386 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 387 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 388 | PRODUCT_BUNDLE_IDENTIFIER = com.houmananger.demo; 389 | PRODUCT_NAME = "$(TARGET_NAME)"; 390 | TARGETED_DEVICE_FAMILY = 1; 391 | }; 392 | name = Release; 393 | }; 394 | /* End XCBuildConfiguration section */ 395 | 396 | /* Begin XCConfigurationList section */ 397 | 63AC17721F7231D2005DCA8E /* Build configuration list for PBXProject "iOS11Adaptation" */ = { 398 | isa = XCConfigurationList; 399 | buildConfigurations = ( 400 | 63AC178B1F7231D2005DCA8E /* Debug */, 401 | 63AC178C1F7231D2005DCA8E /* Release */, 402 | ); 403 | defaultConfigurationIsVisible = 0; 404 | defaultConfigurationName = Release; 405 | }; 406 | 63AC178D1F7231D2005DCA8E /* Build configuration list for PBXNativeTarget "iOS11Adaptation" */ = { 407 | isa = XCConfigurationList; 408 | buildConfigurations = ( 409 | 63AC178E1F7231D2005DCA8E /* Debug */, 410 | 63AC178F1F7231D2005DCA8E /* Release */, 411 | ); 412 | defaultConfigurationIsVisible = 0; 413 | defaultConfigurationName = Release; 414 | }; 415 | /* End XCConfigurationList section */ 416 | }; 417 | rootObject = 63AC176F1F7231D2005DCA8E /* Project object */; 418 | } 419 | -------------------------------------------------------------------------------- /iOS11Adaptation.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iOS11Adaptation/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // iOS11Adaptation 4 | // 5 | // Created by YJHou on 2017/9/20. 6 | // Copyright © 2017年 https://github.com/stackhou. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /iOS11Adaptation/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // iOS11Adaptation 4 | // 5 | // Created by YJHou on 2017/9/20. 6 | // Copyright © 2017年 https://github.com/stackhou. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | 20 | self.window.backgroundColor = [UIColor whiteColor]; 21 | 22 | return YES; 23 | } 24 | 25 | 26 | - (void)applicationWillResignActive:(UIApplication *)application { 27 | // 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. 28 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 29 | } 30 | 31 | 32 | - (void)applicationDidEnterBackground:(UIApplication *)application { 33 | // 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. 34 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 35 | } 36 | 37 | 38 | - (void)applicationWillEnterForeground:(UIApplication *)application { 39 | // 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. 40 | } 41 | 42 | 43 | - (void)applicationDidBecomeActive:(UIApplication *)application { 44 | // 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. 45 | } 46 | 47 | 48 | - (void)applicationWillTerminate:(UIApplication *)application { 49 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 50 | } 51 | 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /iOS11Adaptation/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 | } -------------------------------------------------------------------------------- /iOS11Adaptation/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /iOS11Adaptation/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /iOS11Adaptation/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /iOS11Adaptation/MainViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MainViewController.h 3 | // iOS11Adaptation 4 | // 5 | // Created by YJHou on 2017/9/21. 6 | // Copyright © 2017年 https://github.com/stackhou. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MainViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /iOS11Adaptation/MainViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MainViewController.m 3 | // iOS11Adaptation 4 | // 5 | // Created by YJHou on 2017/9/21. 6 | // Copyright © 2017年 https://github.com/stackhou. All rights reserved. 7 | // 8 | 9 | #import "MainViewController.h" 10 | #import 11 | 12 | #import "SubTableViewController.h" 13 | 14 | @interface MainViewController () 15 | 16 | @property (nonatomic, strong) NSArray *dataSource; /**< 数据源 */ 17 | @property (nonatomic, strong) NSArray *gotoVCClasses; /**< 跳转类集合 */ 18 | 19 | @end 20 | 21 | @implementation MainViewController 22 | 23 | - (void)viewDidLoad { 24 | [super viewDidLoad]; 25 | self.view.backgroundColor = [UIColor whiteColor]; 26 | [self _setUpMainView]; 27 | 28 | // UITabBarItem *selectedTabBarItem = ((UITabBar *)((UITabBarController *)[UIApplication sharedApplication].keyWindow.rootViewController).view.subviews[1]).selectedItem; 29 | // 30 | // selectedTabBarItem.landscapeImagePhone = [UIImage imageNamed:@"01"]; 31 | 32 | // NSLog(@"-->%@-- %@", self.tabBarItem, self.navigationController.tabBarItem); 33 | 34 | // self.navigationController.tabBarItem.landscapeImagePhone = [UIImage imageNamed:@"01"]; 35 | 36 | if (@available(iOS 11.0, *)) { 37 | self.navigationController.tabBarItem.largeContentSizeImage = [UIImage imageNamed:@"01"]; 38 | } else { 39 | // Fallback on earlier versions 40 | } 41 | 42 | // 大标题 43 | self.navigationItem.title = @"iOS11 适配"; 44 | if (@available(iOS 11.0, *)) { 45 | self.navigationItem.largeTitleDisplayMode = UINavigationItemLargeTitleDisplayModeAutomatic; 46 | } else { 47 | // Fallback on earlier versions 48 | } 49 | if (@available(iOS 11.0, *)) { 50 | // self.navigationController.navigationBar.prefersLargeTitles = YES; 51 | } else { 52 | // Fallback on earlier versions 53 | } 54 | 55 | [self _setUpNavView]; 56 | } 57 | 58 | - (void)_setUpNavView{ 59 | 60 | UIBarButtonItem *buttonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(barButtonItemClick:)]; 61 | self.navigationItem.leftBarButtonItem = buttonItem; 62 | 63 | UILabel *titleView = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 40)]; 64 | titleView.text = @"我是TitleView"; 65 | self.navigationItem.titleView = titleView; 66 | } 67 | 68 | - (void)barButtonItemClick:(UIBarButtonItem *)item{ 69 | NSLog(@"-->%@", @"---------"); 70 | } 71 | 72 | - (void)viewDidAppear:(BOOL)animated{ 73 | [super viewDidAppear:animated]; 74 | } 75 | 76 | - (void)_setUpMainView{ 77 | 78 | UITableView *tableView = [[ElegantTableViewGenerator shareInstance] createTableViewWithTitles:self.dataSource subTitles:nil rowHeight:50 superView:self.view didSelectRowBlock:^(UITableView *tableView, NSIndexPath *indexPath) { 79 | 80 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 81 | 82 | if (indexPath.row < self.gotoVCClasses.count) { 83 | 84 | id class = (UIViewController *)self.gotoVCClasses[indexPath.row]; 85 | if (class) { 86 | UIViewController * vc = [[class alloc] init]; 87 | vc.hidesBottomBarWhenPushed = YES; 88 | [self.navigationController pushViewController:vc animated:YES]; 89 | } 90 | } 91 | } didScrollBlock:^(UIScrollView *tableView, CGPoint contentOffset) { 92 | 93 | }]; 94 | 95 | if (@available(iOS 11.0, *)) { 96 | // tableView.contentInsetAdjustmentBehavior = UIApplicationBackgroundFetchIntervalNever; 97 | } else { 98 | // Fallback on earlier versions 99 | } 100 | } 101 | 102 | #pragma mark - Lazy 103 | - (NSArray *)dataSource{ 104 | if (!_dataSource) { 105 | _dataSource = @[@"TableView 适配"]; 106 | } 107 | return _dataSource; 108 | } 109 | 110 | - (NSArray *)gotoVCClasses{ 111 | if (!_gotoVCClasses) { 112 | _gotoVCClasses = @[[SubTableViewController class], [SubTableViewController class]]; 113 | } 114 | return _gotoVCClasses; 115 | } 116 | 117 | - (void)didReceiveMemoryWarning { 118 | [super didReceiveMemoryWarning]; 119 | } 120 | 121 | 122 | @end 123 | -------------------------------------------------------------------------------- /iOS11Adaptation/PrefixHeader.pch: -------------------------------------------------------------------------------- 1 | // 2 | // PrefixHeader.pch 3 | // iOS11Adaptation 4 | // 5 | // Created by YJHou on 2017/9/21. 6 | // Copyright © 2017年 https://github.com/stackhou. 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 one or more of your targets to reference this file. 14 | 15 | #import 16 | 17 | #endif /* PrefixHeader_pch */ 18 | -------------------------------------------------------------------------------- /iOS11Adaptation/Resources/images/01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoaye/iOS11-Adaptation/63faf3678a220da8aac0678d92270e6001786972/iOS11Adaptation/Resources/images/01.png -------------------------------------------------------------------------------- /iOS11Adaptation/SubTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SubTableViewController.h 3 | // iOS11Adaptation 4 | // 5 | // Created by YJHou on 2017/9/21. 6 | // Copyright © 2017年 https://github.com/stackhou. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SubTableViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /iOS11Adaptation/SubTableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // SubTableViewController.m 3 | // iOS11Adaptation 4 | // 5 | // Created by YJHou on 2017/9/21. 6 | // Copyright © 2017年 https://github.com/stackhou. All rights reserved. 7 | // 8 | 9 | #import "SubTableViewController.h" 10 | 11 | // 定义宏 12 | #define adjustsScrollViewInsets(scrollView)\ 13 | do {\ 14 | _Pragma("clang diagnostic push")\ 15 | _Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"")\ 16 | if ([scrollView respondsToSelector:NSSelectorFromString(@"setContentInsetAdjustmentBehavior:")]) {\ 17 | NSMethodSignature *signature = [UIScrollView instanceMethodSignatureForSelector:@selector(setContentInsetAdjustmentBehavior:)];\ 18 | NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];\ 19 | NSInteger argument = 2;\ 20 | invocation.target = scrollView;\ 21 | invocation.selector = @selector(setContentInsetAdjustmentBehavior:);\ 22 | [invocation setArgument:&argument atIndex:2];\ 23 | [invocation retainArguments];\ 24 | [invocation invoke];\ 25 | }\ 26 | _Pragma("clang diagnostic pop")\ 27 | } while (0) 28 | 29 | @interface SubTableViewController () 30 | 31 | @property (nonatomic, strong) UITableView *tableView; 32 | 33 | @property (nonatomic, strong) UIView *headView; 34 | 35 | @end 36 | 37 | @implementation SubTableViewController 38 | 39 | - (void)viewDidLoad { 40 | [super viewDidLoad]; 41 | self.view.backgroundColor = [UIColor whiteColor]; 42 | 43 | [self.navigationController setNavigationBarHidden:YES animated:YES]; 44 | 45 | CGFloat navHeight = [UIApplication sharedApplication].statusBarFrame.size.height; 46 | NSLog(@"navHeight-->%f", navHeight); 47 | 48 | [self _setUpSubTableViewNavgationView]; 49 | [self _setUpSubTableViewMainView]; 50 | } 51 | 52 | - (void)_setUpSubTableViewNavgationView{ 53 | if (@available(iOS 11.0, *)) { 54 | self.navigationItem.largeTitleDisplayMode = UINavigationItemLargeTitleDisplayModeNever; 55 | } else { 56 | // Fallback on earlier versions 57 | } 58 | self.navigationItem.title = @"TableView适配"; 59 | } 60 | 61 | - (void)_setUpSubTableViewMainView{ 62 | 63 | [self.view addSubview:self.tableView]; 64 | 65 | [self.tableView reloadData]; 66 | 67 | NSLog(@"tableView宽度=%f, 高度=%f, 屏幕的高=%f", self.tableView.contentSize.width, self.tableView.contentSize.height, kSCREEN_HEIGHT); 68 | 69 | } 70 | 71 | #pragma mark - UITableViewDataSource && UITableViewDelegate 72 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ 73 | return 2; 74 | } 75 | 76 | - (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 77 | return 20; 78 | } 79 | 80 | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{ 81 | return 0.0001; 82 | } 83 | 84 | - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ 85 | UIView *headerView = [[UIView alloc] init]; 86 | headerView.backgroundColor = [UIColor orangeColor]; 87 | return headerView; 88 | } 89 | 90 | - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{ 91 | return 10; 92 | } 93 | 94 | - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{ 95 | UIView *footerView = [[UIView alloc] init]; 96 | footerView.backgroundColor = [UIColor redColor]; 97 | return footerView; 98 | } 99 | 100 | - (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { 101 | static NSString *cellId = @"CellId"; 102 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId]; 103 | if (cell == nil) { 104 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId]; 105 | } 106 | 107 | cell.textLabel.text = [NSString stringWithFormat:@"第%ld组-第%ld行", indexPath.section, indexPath.row]; 108 | 109 | return cell; 110 | } 111 | 112 | 113 | #pragma mark - Lazy 114 | - (UITableView *)tableView{ 115 | if (!_tableView) { 116 | _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, kSCREEN_WIDTH, kSCREEN_HEIGHT) style:UITableViewStyleGrouped]; 117 | _tableView.backgroundColor = [UIColor whiteColor]; 118 | _tableView.dataSource = self; 119 | _tableView.delegate = self; 120 | self.tableView.tableHeaderView = self.headView; 121 | if (@available(iOS 11.0, *)) { 122 | _tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; 123 | } else { 124 | // Fallback on earlier versions 125 | } 126 | 127 | _tableView.estimatedRowHeight = 0; 128 | _tableView.estimatedSectionHeaderHeight = 0; 129 | _tableView.estimatedSectionFooterHeight = 0; 130 | } 131 | return _tableView; 132 | } 133 | 134 | - (UIView *)headView{ 135 | if (!_headView) { 136 | _headView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kSCREEN_WIDTH, 100)]; 137 | _headView.backgroundColor = [UIColor redColor]; 138 | } 139 | return _headView; 140 | } 141 | 142 | - (void)didReceiveMemoryWarning { 143 | [super didReceiveMemoryWarning]; 144 | } 145 | 146 | @end 147 | -------------------------------------------------------------------------------- /iOS11Adaptation/YJNavigationBar.h: -------------------------------------------------------------------------------- 1 | // 2 | // YJNavigationBar.h 3 | // iOS11Adaptation 4 | // 5 | // Created by YJHou on 2017/9/22. 6 | // Copyright © 2017年 https://github.com/stackhou. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface YJNavigationBar : UINavigationBar 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /iOS11Adaptation/YJNavigationBar.m: -------------------------------------------------------------------------------- 1 | // 2 | // YJNavigationBar.m 3 | // iOS11Adaptation 4 | // 5 | // Created by YJHou on 2017/9/22. 6 | // Copyright © 2017年 https://github.com/stackhou. All rights reserved. 7 | // 8 | 9 | #import "YJNavigationBar.h" 10 | 11 | @implementation YJNavigationBar 12 | 13 | 14 | 15 | #define kDevice_Is_iPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO) 16 | 17 | - (BOOL)isIPhoneX{ 18 | if ([UIScreen instancesRespondToSelector:@selector(currentMode)]) { 19 | return CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size); 20 | }else{ 21 | return NO; 22 | } 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /iOS11Adaptation/YJNavigationController.h: -------------------------------------------------------------------------------- 1 | // 2 | // YJNavigationController.h 3 | // iOS11Adaptation 4 | // 5 | // Created by YJHou on 2017/9/22. 6 | // Copyright © 2017年 https://github.com/stackhou. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface YJNavigationController : UINavigationController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /iOS11Adaptation/YJNavigationController.m: -------------------------------------------------------------------------------- 1 | // 2 | // YJNavigationController.m 3 | // iOS11Adaptation 4 | // 5 | // Created by YJHou on 2017/9/22. 6 | // Copyright © 2017年 https://github.com/stackhou. All rights reserved. 7 | // 8 | 9 | #import "YJNavigationController.h" 10 | 11 | @interface YJNavigationController () 12 | 13 | @end 14 | 15 | @implementation YJNavigationController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /iOS11Adaptation/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // iOS11Adaptation 4 | // 5 | // Created by YJHou on 2017/9/20. 6 | // Copyright © 2017年 https://github.com/stackhou. 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 | --------------------------------------------------------------------------------