├── .gitignore ├── HQYModules ├── HQYModules.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── HQYModules │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── bg.imageset │ │ │ ├── Contents.json │ │ │ └── bg.png │ │ └── 樱桃小丸子 │ │ │ ├── 1.imageset │ │ │ ├── 1.jpg │ │ │ └── Contents.json │ │ │ ├── 10.imageset │ │ │ ├── 10.jpg │ │ │ └── Contents.json │ │ │ ├── 11.imageset │ │ │ ├── 2.jpg │ │ │ └── Contents.json │ │ │ ├── 12.imageset │ │ │ ├── 12.jpeg │ │ │ └── Contents.json │ │ │ ├── 2.imageset │ │ │ ├── 11.jpg │ │ │ └── Contents.json │ │ │ ├── 3.imageset │ │ │ ├── 3.jpg │ │ │ └── Contents.json │ │ │ ├── 4.imageset │ │ │ ├── 4.jpg │ │ │ └── Contents.json │ │ │ ├── 5.imageset │ │ │ ├── 5.jpg │ │ │ └── Contents.json │ │ │ ├── 6.imageset │ │ │ ├── 6.jpg │ │ │ └── Contents.json │ │ │ ├── 7.imageset │ │ │ ├── 7.jpg │ │ │ └── Contents.json │ │ │ ├── 8.imageset │ │ │ ├── 8.jpg │ │ │ └── Contents.json │ │ │ ├── 9.imageset │ │ │ ├── 9.jpg │ │ │ └── Contents.json │ │ │ └── Contents.json │ ├── Base.lproj │ │ └── LaunchScreen.storyboard │ ├── HQY.pch │ ├── HQYCascadingMenu │ │ ├── HQYCascadingMenuController.h │ │ ├── HQYCascadingMenuController.m │ │ ├── HQYDownMenu │ │ │ ├── HQYDownMenu.h │ │ │ ├── HQYDownMenu.m │ │ │ ├── HQYDownMenuController.h │ │ │ ├── HQYDownMenuController.m │ │ │ └── HQYPhotoPicker │ │ │ │ ├── HQYPhotoPickerViewController.h │ │ │ │ └── HQYPhotoPickerViewController.m │ │ ├── HQYMainCategoryController.h │ │ ├── HQYMainCategoryController.m │ │ ├── HQYSubCategoryController.h │ │ ├── HQYSubCategoryController.m │ │ ├── HYQHealthItem.h │ │ ├── HYQHealthItem.m │ │ └── Resources │ │ │ └── health.plist │ ├── HQYCollectionView Reordering │ │ ├── HQYReorderingCell.h │ │ ├── HQYReorderingCell.m │ │ ├── HQYReorderingController.h │ │ └── HQYReorderingController.m │ ├── HQYDownMenu │ │ ├── HQYDownMenu.h │ │ ├── HQYDownMenu.m │ │ ├── HQYDownMenuController.h │ │ └── HQYDownMenuController.m │ ├── HQYStatusBar │ │ ├── HQYStatusBarController.h │ │ └── HQYStatusBarController.m │ ├── Info.plist │ ├── Main │ │ ├── HQYTableViewCell.h │ │ ├── HQYTableViewCell.m │ │ ├── HQYTableViewController.h │ │ └── HQYTableViewController.m │ └── main.m ├── HQYModulesTests │ ├── HQYModulesTests.m │ └── Info.plist └── HQYModulesUITests │ ├── HQYModulesUITests.m │ └── Info.plist ├── LICENSE ├── README.md ├── UICollectionView重排 .gif ├── statusBar.gif └── 级联菜单.gif /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata 19 | 20 | ## Other 21 | *.xccheckout 22 | *.moved-aside 23 | *.xcuserstate 24 | *.xcscmblueprint 25 | 26 | ## Obj-C/Swift specific 27 | *.hmap 28 | *.ipa 29 | 30 | # CocoaPods 31 | # 32 | # We recommend against adding the Pods directory to your .gitignore. However 33 | # you should judge for yourself, the pros and cons are mentioned at: 34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 35 | # 36 | # Pods/ 37 | 38 | # Carthage 39 | # 40 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 41 | # Carthage/Checkouts 42 | 43 | Carthage/Build 44 | 45 | # fastlane 46 | # 47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 48 | # screenshots whenever they are needed. 49 | # For more information about the recommended setup visit: 50 | # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md 51 | 52 | fastlane/report.xml 53 | fastlane/screenshots 54 | -------------------------------------------------------------------------------- /HQYModules/HQYModules.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | B913CE4A1D66E55A00CEDE0C /* HQYStatusBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = B913CE491D66E55A00CEDE0C /* HQYStatusBarController.m */; }; 11 | B93117831D8A46EB008BDDD8 /* HQYDownMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = B93117801D8A46EB008BDDD8 /* HQYDownMenu.m */; }; 12 | B93117841D8A46EB008BDDD8 /* HQYDownMenuController.m in Sources */ = {isa = PBXBuildFile; fileRef = B93117821D8A46EB008BDDD8 /* HQYDownMenuController.m */; }; 13 | B9C696D91DB2846000C48A11 /* HQYPhotoPickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B9C696D81DB2846000C48A11 /* HQYPhotoPickerViewController.m */; }; 14 | B9CA97161D635D1F00FEB07A /* HQYMainCategoryController.m in Sources */ = {isa = PBXBuildFile; fileRef = B9CA97151D635D1F00FEB07A /* HQYMainCategoryController.m */; }; 15 | B9CA97191D635D3100FEB07A /* HQYSubCategoryController.m in Sources */ = {isa = PBXBuildFile; fileRef = B9CA97181D635D3100FEB07A /* HQYSubCategoryController.m */; }; 16 | B9CA971C1D635D4900FEB07A /* HYQHealthItem.m in Sources */ = {isa = PBXBuildFile; fileRef = B9CA971B1D635D4900FEB07A /* HYQHealthItem.m */; }; 17 | B9CA971F1D635DF100FEB07A /* HQYCascadingMenuController.m in Sources */ = {isa = PBXBuildFile; fileRef = B9CA971E1D635DF100FEB07A /* HQYCascadingMenuController.m */; }; 18 | B9CA97241D635E5B00FEB07A /* health.plist in Resources */ = {isa = PBXBuildFile; fileRef = B9CA97231D635E5B00FEB07A /* health.plist */; }; 19 | B9D8BA3E1D61686F003A0CB8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B9D8BA3D1D61686F003A0CB8 /* main.m */; }; 20 | B9D8BA411D61686F003A0CB8 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B9D8BA401D61686F003A0CB8 /* AppDelegate.m */; }; 21 | B9D8BA491D61686F003A0CB8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B9D8BA481D61686F003A0CB8 /* Assets.xcassets */; }; 22 | B9D8BA4C1D61686F003A0CB8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B9D8BA4A1D61686F003A0CB8 /* LaunchScreen.storyboard */; }; 23 | B9D8BA571D61686F003A0CB8 /* HQYModulesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B9D8BA561D61686F003A0CB8 /* HQYModulesTests.m */; }; 24 | B9D8BA621D61686F003A0CB8 /* HQYModulesUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = B9D8BA611D61686F003A0CB8 /* HQYModulesUITests.m */; }; 25 | B9D8BA751D61695B003A0CB8 /* HQYTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B9D8BA721D61695B003A0CB8 /* HQYTableViewCell.m */; }; 26 | B9D8BA761D61695B003A0CB8 /* HQYTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B9D8BA741D61695B003A0CB8 /* HQYTableViewController.m */; }; 27 | B9D8BA791D6169AE003A0CB8 /* HQYReorderingController.m in Sources */ = {isa = PBXBuildFile; fileRef = B9D8BA781D6169AE003A0CB8 /* HQYReorderingController.m */; }; 28 | B9D8BA7C1D616A54003A0CB8 /* HQYReorderingCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B9D8BA7B1D616A54003A0CB8 /* HQYReorderingCell.m */; }; 29 | /* End PBXBuildFile section */ 30 | 31 | /* Begin PBXContainerItemProxy section */ 32 | B9D8BA531D61686F003A0CB8 /* PBXContainerItemProxy */ = { 33 | isa = PBXContainerItemProxy; 34 | containerPortal = B9D8BA311D61686F003A0CB8 /* Project object */; 35 | proxyType = 1; 36 | remoteGlobalIDString = B9D8BA381D61686F003A0CB8; 37 | remoteInfo = HQYModules; 38 | }; 39 | B9D8BA5E1D61686F003A0CB8 /* PBXContainerItemProxy */ = { 40 | isa = PBXContainerItemProxy; 41 | containerPortal = B9D8BA311D61686F003A0CB8 /* Project object */; 42 | proxyType = 1; 43 | remoteGlobalIDString = B9D8BA381D61686F003A0CB8; 44 | remoteInfo = HQYModules; 45 | }; 46 | /* End PBXContainerItemProxy section */ 47 | 48 | /* Begin PBXFileReference section */ 49 | B913CE481D66E55A00CEDE0C /* HQYStatusBarController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HQYStatusBarController.h; sourceTree = ""; }; 50 | B913CE491D66E55A00CEDE0C /* HQYStatusBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HQYStatusBarController.m; sourceTree = ""; }; 51 | B93117731D8A39E3008BDDD8 /* HQY.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HQY.pch; sourceTree = ""; }; 52 | B931177F1D8A46EB008BDDD8 /* HQYDownMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HQYDownMenu.h; sourceTree = ""; }; 53 | B93117801D8A46EB008BDDD8 /* HQYDownMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HQYDownMenu.m; sourceTree = ""; }; 54 | B93117811D8A46EB008BDDD8 /* HQYDownMenuController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HQYDownMenuController.h; sourceTree = ""; }; 55 | B93117821D8A46EB008BDDD8 /* HQYDownMenuController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HQYDownMenuController.m; sourceTree = ""; }; 56 | B9C696D71DB2846000C48A11 /* HQYPhotoPickerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HQYPhotoPickerViewController.h; sourceTree = ""; }; 57 | B9C696D81DB2846000C48A11 /* HQYPhotoPickerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HQYPhotoPickerViewController.m; sourceTree = ""; }; 58 | B9CA97141D635D1F00FEB07A /* HQYMainCategoryController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HQYMainCategoryController.h; sourceTree = ""; }; 59 | B9CA97151D635D1F00FEB07A /* HQYMainCategoryController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HQYMainCategoryController.m; sourceTree = ""; }; 60 | B9CA97171D635D3100FEB07A /* HQYSubCategoryController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HQYSubCategoryController.h; sourceTree = ""; }; 61 | B9CA97181D635D3100FEB07A /* HQYSubCategoryController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HQYSubCategoryController.m; sourceTree = ""; }; 62 | B9CA971A1D635D4900FEB07A /* HYQHealthItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYQHealthItem.h; sourceTree = ""; }; 63 | B9CA971B1D635D4900FEB07A /* HYQHealthItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYQHealthItem.m; sourceTree = ""; }; 64 | B9CA971D1D635DF100FEB07A /* HQYCascadingMenuController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HQYCascadingMenuController.h; sourceTree = ""; }; 65 | B9CA971E1D635DF100FEB07A /* HQYCascadingMenuController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HQYCascadingMenuController.m; sourceTree = ""; }; 66 | B9CA97231D635E5B00FEB07A /* health.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = health.plist; sourceTree = ""; }; 67 | B9D8BA391D61686F003A0CB8 /* HQYModules.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HQYModules.app; sourceTree = BUILT_PRODUCTS_DIR; }; 68 | B9D8BA3D1D61686F003A0CB8 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 69 | B9D8BA3F1D61686F003A0CB8 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 70 | B9D8BA401D61686F003A0CB8 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 71 | B9D8BA481D61686F003A0CB8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 72 | B9D8BA4B1D61686F003A0CB8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 73 | B9D8BA4D1D61686F003A0CB8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 74 | B9D8BA521D61686F003A0CB8 /* HQYModulesTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HQYModulesTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 75 | B9D8BA561D61686F003A0CB8 /* HQYModulesTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HQYModulesTests.m; sourceTree = ""; }; 76 | B9D8BA581D61686F003A0CB8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 77 | B9D8BA5D1D61686F003A0CB8 /* HQYModulesUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HQYModulesUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 78 | B9D8BA611D61686F003A0CB8 /* HQYModulesUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HQYModulesUITests.m; sourceTree = ""; }; 79 | B9D8BA631D61686F003A0CB8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 80 | B9D8BA711D61695B003A0CB8 /* HQYTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HQYTableViewCell.h; sourceTree = ""; }; 81 | B9D8BA721D61695B003A0CB8 /* HQYTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HQYTableViewCell.m; sourceTree = ""; }; 82 | B9D8BA731D61695B003A0CB8 /* HQYTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HQYTableViewController.h; sourceTree = ""; }; 83 | B9D8BA741D61695B003A0CB8 /* HQYTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HQYTableViewController.m; sourceTree = ""; }; 84 | B9D8BA771D6169AE003A0CB8 /* HQYReorderingController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HQYReorderingController.h; sourceTree = ""; }; 85 | B9D8BA781D6169AE003A0CB8 /* HQYReorderingController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HQYReorderingController.m; sourceTree = ""; }; 86 | B9D8BA7A1D616A54003A0CB8 /* HQYReorderingCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HQYReorderingCell.h; sourceTree = ""; }; 87 | B9D8BA7B1D616A54003A0CB8 /* HQYReorderingCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HQYReorderingCell.m; sourceTree = ""; }; 88 | /* End PBXFileReference section */ 89 | 90 | /* Begin PBXFrameworksBuildPhase section */ 91 | B9D8BA361D61686F003A0CB8 /* Frameworks */ = { 92 | isa = PBXFrameworksBuildPhase; 93 | buildActionMask = 2147483647; 94 | files = ( 95 | ); 96 | runOnlyForDeploymentPostprocessing = 0; 97 | }; 98 | B9D8BA4F1D61686F003A0CB8 /* Frameworks */ = { 99 | isa = PBXFrameworksBuildPhase; 100 | buildActionMask = 2147483647; 101 | files = ( 102 | ); 103 | runOnlyForDeploymentPostprocessing = 0; 104 | }; 105 | B9D8BA5A1D61686F003A0CB8 /* Frameworks */ = { 106 | isa = PBXFrameworksBuildPhase; 107 | buildActionMask = 2147483647; 108 | files = ( 109 | ); 110 | runOnlyForDeploymentPostprocessing = 0; 111 | }; 112 | /* End PBXFrameworksBuildPhase section */ 113 | 114 | /* Begin PBXGroup section */ 115 | B913CE471D66E53500CEDE0C /* HQYStatusBar */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | B913CE481D66E55A00CEDE0C /* HQYStatusBarController.h */, 119 | B913CE491D66E55A00CEDE0C /* HQYStatusBarController.m */, 120 | ); 121 | path = HQYStatusBar; 122 | sourceTree = ""; 123 | }; 124 | B931177E1D8A46EB008BDDD8 /* HQYDownMenu */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | B931177F1D8A46EB008BDDD8 /* HQYDownMenu.h */, 128 | B93117801D8A46EB008BDDD8 /* HQYDownMenu.m */, 129 | B93117811D8A46EB008BDDD8 /* HQYDownMenuController.h */, 130 | B93117821D8A46EB008BDDD8 /* HQYDownMenuController.m */, 131 | ); 132 | name = HQYDownMenu; 133 | path = HQYCascadingMenu/HQYDownMenu; 134 | sourceTree = ""; 135 | }; 136 | B9C696D51DB283B100C48A11 /* HQYPhotoPicker */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | B9C696D71DB2846000C48A11 /* HQYPhotoPickerViewController.h */, 140 | B9C696D81DB2846000C48A11 /* HQYPhotoPickerViewController.m */, 141 | ); 142 | name = HQYPhotoPicker; 143 | path = HQYCascadingMenu/HQYDownMenu/HQYPhotoPicker; 144 | sourceTree = ""; 145 | }; 146 | B9CA97131D635CFB00FEB07A /* HQYCascadingMenu */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | B9CA971D1D635DF100FEB07A /* HQYCascadingMenuController.h */, 150 | B9CA971E1D635DF100FEB07A /* HQYCascadingMenuController.m */, 151 | B9CA97141D635D1F00FEB07A /* HQYMainCategoryController.h */, 152 | B9CA97151D635D1F00FEB07A /* HQYMainCategoryController.m */, 153 | B9CA97171D635D3100FEB07A /* HQYSubCategoryController.h */, 154 | B9CA97181D635D3100FEB07A /* HQYSubCategoryController.m */, 155 | B9CA971A1D635D4900FEB07A /* HYQHealthItem.h */, 156 | B9CA971B1D635D4900FEB07A /* HYQHealthItem.m */, 157 | B9CA97221D635E5B00FEB07A /* Resources */, 158 | ); 159 | path = HQYCascadingMenu; 160 | sourceTree = ""; 161 | }; 162 | B9CA97221D635E5B00FEB07A /* Resources */ = { 163 | isa = PBXGroup; 164 | children = ( 165 | B9CA97231D635E5B00FEB07A /* health.plist */, 166 | ); 167 | path = Resources; 168 | sourceTree = ""; 169 | }; 170 | B9D8BA301D61686F003A0CB8 = { 171 | isa = PBXGroup; 172 | children = ( 173 | B9D8BA3B1D61686F003A0CB8 /* HQYModules */, 174 | B9D8BA551D61686F003A0CB8 /* HQYModulesTests */, 175 | B9D8BA601D61686F003A0CB8 /* HQYModulesUITests */, 176 | B9D8BA3A1D61686F003A0CB8 /* Products */, 177 | ); 178 | sourceTree = ""; 179 | }; 180 | B9D8BA3A1D61686F003A0CB8 /* Products */ = { 181 | isa = PBXGroup; 182 | children = ( 183 | B9D8BA391D61686F003A0CB8 /* HQYModules.app */, 184 | B9D8BA521D61686F003A0CB8 /* HQYModulesTests.xctest */, 185 | B9D8BA5D1D61686F003A0CB8 /* HQYModulesUITests.xctest */, 186 | ); 187 | name = Products; 188 | sourceTree = ""; 189 | }; 190 | B9D8BA3B1D61686F003A0CB8 /* HQYModules */ = { 191 | isa = PBXGroup; 192 | children = ( 193 | B9D8BA3F1D61686F003A0CB8 /* AppDelegate.h */, 194 | B9D8BA401D61686F003A0CB8 /* AppDelegate.m */, 195 | B9D8BA701D616938003A0CB8 /* Main */, 196 | B9D8BA6F1D61691B003A0CB8 /* HQYCollectionView Reordering */, 197 | B9CA97131D635CFB00FEB07A /* HQYCascadingMenu */, 198 | B913CE471D66E53500CEDE0C /* HQYStatusBar */, 199 | B9C696D51DB283B100C48A11 /* HQYPhotoPicker */, 200 | B931177E1D8A46EB008BDDD8 /* HQYDownMenu */, 201 | B9D8BA3C1D61686F003A0CB8 /* Supporting Files */, 202 | ); 203 | path = HQYModules; 204 | sourceTree = ""; 205 | }; 206 | B9D8BA3C1D61686F003A0CB8 /* Supporting Files */ = { 207 | isa = PBXGroup; 208 | children = ( 209 | B9D8BA481D61686F003A0CB8 /* Assets.xcassets */, 210 | B9D8BA4A1D61686F003A0CB8 /* LaunchScreen.storyboard */, 211 | B9D8BA4D1D61686F003A0CB8 /* Info.plist */, 212 | B9D8BA3D1D61686F003A0CB8 /* main.m */, 213 | B93117731D8A39E3008BDDD8 /* HQY.pch */, 214 | ); 215 | name = "Supporting Files"; 216 | sourceTree = ""; 217 | }; 218 | B9D8BA551D61686F003A0CB8 /* HQYModulesTests */ = { 219 | isa = PBXGroup; 220 | children = ( 221 | B9D8BA561D61686F003A0CB8 /* HQYModulesTests.m */, 222 | B9D8BA581D61686F003A0CB8 /* Info.plist */, 223 | ); 224 | path = HQYModulesTests; 225 | sourceTree = ""; 226 | }; 227 | B9D8BA601D61686F003A0CB8 /* HQYModulesUITests */ = { 228 | isa = PBXGroup; 229 | children = ( 230 | B9D8BA611D61686F003A0CB8 /* HQYModulesUITests.m */, 231 | B9D8BA631D61686F003A0CB8 /* Info.plist */, 232 | ); 233 | path = HQYModulesUITests; 234 | sourceTree = ""; 235 | }; 236 | B9D8BA6F1D61691B003A0CB8 /* HQYCollectionView Reordering */ = { 237 | isa = PBXGroup; 238 | children = ( 239 | B9D8BA771D6169AE003A0CB8 /* HQYReorderingController.h */, 240 | B9D8BA781D6169AE003A0CB8 /* HQYReorderingController.m */, 241 | B9D8BA7A1D616A54003A0CB8 /* HQYReorderingCell.h */, 242 | B9D8BA7B1D616A54003A0CB8 /* HQYReorderingCell.m */, 243 | ); 244 | path = "HQYCollectionView Reordering"; 245 | sourceTree = ""; 246 | }; 247 | B9D8BA701D616938003A0CB8 /* Main */ = { 248 | isa = PBXGroup; 249 | children = ( 250 | B9D8BA711D61695B003A0CB8 /* HQYTableViewCell.h */, 251 | B9D8BA721D61695B003A0CB8 /* HQYTableViewCell.m */, 252 | B9D8BA731D61695B003A0CB8 /* HQYTableViewController.h */, 253 | B9D8BA741D61695B003A0CB8 /* HQYTableViewController.m */, 254 | ); 255 | path = Main; 256 | sourceTree = ""; 257 | }; 258 | /* End PBXGroup section */ 259 | 260 | /* Begin PBXNativeTarget section */ 261 | B9D8BA381D61686F003A0CB8 /* HQYModules */ = { 262 | isa = PBXNativeTarget; 263 | buildConfigurationList = B9D8BA661D61686F003A0CB8 /* Build configuration list for PBXNativeTarget "HQYModules" */; 264 | buildPhases = ( 265 | B9D8BA351D61686F003A0CB8 /* Sources */, 266 | B9D8BA361D61686F003A0CB8 /* Frameworks */, 267 | B9D8BA371D61686F003A0CB8 /* Resources */, 268 | ); 269 | buildRules = ( 270 | ); 271 | dependencies = ( 272 | ); 273 | name = HQYModules; 274 | productName = HQYModules; 275 | productReference = B9D8BA391D61686F003A0CB8 /* HQYModules.app */; 276 | productType = "com.apple.product-type.application"; 277 | }; 278 | B9D8BA511D61686F003A0CB8 /* HQYModulesTests */ = { 279 | isa = PBXNativeTarget; 280 | buildConfigurationList = B9D8BA691D61686F003A0CB8 /* Build configuration list for PBXNativeTarget "HQYModulesTests" */; 281 | buildPhases = ( 282 | B9D8BA4E1D61686F003A0CB8 /* Sources */, 283 | B9D8BA4F1D61686F003A0CB8 /* Frameworks */, 284 | B9D8BA501D61686F003A0CB8 /* Resources */, 285 | ); 286 | buildRules = ( 287 | ); 288 | dependencies = ( 289 | B9D8BA541D61686F003A0CB8 /* PBXTargetDependency */, 290 | ); 291 | name = HQYModulesTests; 292 | productName = HQYModulesTests; 293 | productReference = B9D8BA521D61686F003A0CB8 /* HQYModulesTests.xctest */; 294 | productType = "com.apple.product-type.bundle.unit-test"; 295 | }; 296 | B9D8BA5C1D61686F003A0CB8 /* HQYModulesUITests */ = { 297 | isa = PBXNativeTarget; 298 | buildConfigurationList = B9D8BA6C1D61686F003A0CB8 /* Build configuration list for PBXNativeTarget "HQYModulesUITests" */; 299 | buildPhases = ( 300 | B9D8BA591D61686F003A0CB8 /* Sources */, 301 | B9D8BA5A1D61686F003A0CB8 /* Frameworks */, 302 | B9D8BA5B1D61686F003A0CB8 /* Resources */, 303 | ); 304 | buildRules = ( 305 | ); 306 | dependencies = ( 307 | B9D8BA5F1D61686F003A0CB8 /* PBXTargetDependency */, 308 | ); 309 | name = HQYModulesUITests; 310 | productName = HQYModulesUITests; 311 | productReference = B9D8BA5D1D61686F003A0CB8 /* HQYModulesUITests.xctest */; 312 | productType = "com.apple.product-type.bundle.ui-testing"; 313 | }; 314 | /* End PBXNativeTarget section */ 315 | 316 | /* Begin PBXProject section */ 317 | B9D8BA311D61686F003A0CB8 /* Project object */ = { 318 | isa = PBXProject; 319 | attributes = { 320 | CLASSPREFIX = HQY; 321 | LastUpgradeCheck = 0720; 322 | ORGANIZATIONNAME = "江城程序猿"; 323 | TargetAttributes = { 324 | B9D8BA381D61686F003A0CB8 = { 325 | CreatedOnToolsVersion = 7.2; 326 | }; 327 | B9D8BA511D61686F003A0CB8 = { 328 | CreatedOnToolsVersion = 7.2; 329 | TestTargetID = B9D8BA381D61686F003A0CB8; 330 | }; 331 | B9D8BA5C1D61686F003A0CB8 = { 332 | CreatedOnToolsVersion = 7.2; 333 | TestTargetID = B9D8BA381D61686F003A0CB8; 334 | }; 335 | }; 336 | }; 337 | buildConfigurationList = B9D8BA341D61686F003A0CB8 /* Build configuration list for PBXProject "HQYModules" */; 338 | compatibilityVersion = "Xcode 3.2"; 339 | developmentRegion = English; 340 | hasScannedForEncodings = 0; 341 | knownRegions = ( 342 | en, 343 | Base, 344 | ); 345 | mainGroup = B9D8BA301D61686F003A0CB8; 346 | productRefGroup = B9D8BA3A1D61686F003A0CB8 /* Products */; 347 | projectDirPath = ""; 348 | projectRoot = ""; 349 | targets = ( 350 | B9D8BA381D61686F003A0CB8 /* HQYModules */, 351 | B9D8BA511D61686F003A0CB8 /* HQYModulesTests */, 352 | B9D8BA5C1D61686F003A0CB8 /* HQYModulesUITests */, 353 | ); 354 | }; 355 | /* End PBXProject section */ 356 | 357 | /* Begin PBXResourcesBuildPhase section */ 358 | B9D8BA371D61686F003A0CB8 /* Resources */ = { 359 | isa = PBXResourcesBuildPhase; 360 | buildActionMask = 2147483647; 361 | files = ( 362 | B9D8BA4C1D61686F003A0CB8 /* LaunchScreen.storyboard in Resources */, 363 | B9CA97241D635E5B00FEB07A /* health.plist in Resources */, 364 | B9D8BA491D61686F003A0CB8 /* Assets.xcassets in Resources */, 365 | ); 366 | runOnlyForDeploymentPostprocessing = 0; 367 | }; 368 | B9D8BA501D61686F003A0CB8 /* Resources */ = { 369 | isa = PBXResourcesBuildPhase; 370 | buildActionMask = 2147483647; 371 | files = ( 372 | ); 373 | runOnlyForDeploymentPostprocessing = 0; 374 | }; 375 | B9D8BA5B1D61686F003A0CB8 /* Resources */ = { 376 | isa = PBXResourcesBuildPhase; 377 | buildActionMask = 2147483647; 378 | files = ( 379 | ); 380 | runOnlyForDeploymentPostprocessing = 0; 381 | }; 382 | /* End PBXResourcesBuildPhase section */ 383 | 384 | /* Begin PBXSourcesBuildPhase section */ 385 | B9D8BA351D61686F003A0CB8 /* Sources */ = { 386 | isa = PBXSourcesBuildPhase; 387 | buildActionMask = 2147483647; 388 | files = ( 389 | B93117841D8A46EB008BDDD8 /* HQYDownMenuController.m in Sources */, 390 | B9CA971C1D635D4900FEB07A /* HYQHealthItem.m in Sources */, 391 | B9C696D91DB2846000C48A11 /* HQYPhotoPickerViewController.m in Sources */, 392 | B9D8BA761D61695B003A0CB8 /* HQYTableViewController.m in Sources */, 393 | B9D8BA791D6169AE003A0CB8 /* HQYReorderingController.m in Sources */, 394 | B9CA971F1D635DF100FEB07A /* HQYCascadingMenuController.m in Sources */, 395 | B9D8BA751D61695B003A0CB8 /* HQYTableViewCell.m in Sources */, 396 | B9CA97191D635D3100FEB07A /* HQYSubCategoryController.m in Sources */, 397 | B9CA97161D635D1F00FEB07A /* HQYMainCategoryController.m in Sources */, 398 | B93117831D8A46EB008BDDD8 /* HQYDownMenu.m in Sources */, 399 | B9D8BA411D61686F003A0CB8 /* AppDelegate.m in Sources */, 400 | B913CE4A1D66E55A00CEDE0C /* HQYStatusBarController.m in Sources */, 401 | B9D8BA3E1D61686F003A0CB8 /* main.m in Sources */, 402 | B9D8BA7C1D616A54003A0CB8 /* HQYReorderingCell.m in Sources */, 403 | ); 404 | runOnlyForDeploymentPostprocessing = 0; 405 | }; 406 | B9D8BA4E1D61686F003A0CB8 /* Sources */ = { 407 | isa = PBXSourcesBuildPhase; 408 | buildActionMask = 2147483647; 409 | files = ( 410 | B9D8BA571D61686F003A0CB8 /* HQYModulesTests.m in Sources */, 411 | ); 412 | runOnlyForDeploymentPostprocessing = 0; 413 | }; 414 | B9D8BA591D61686F003A0CB8 /* Sources */ = { 415 | isa = PBXSourcesBuildPhase; 416 | buildActionMask = 2147483647; 417 | files = ( 418 | B9D8BA621D61686F003A0CB8 /* HQYModulesUITests.m in Sources */, 419 | ); 420 | runOnlyForDeploymentPostprocessing = 0; 421 | }; 422 | /* End PBXSourcesBuildPhase section */ 423 | 424 | /* Begin PBXTargetDependency section */ 425 | B9D8BA541D61686F003A0CB8 /* PBXTargetDependency */ = { 426 | isa = PBXTargetDependency; 427 | target = B9D8BA381D61686F003A0CB8 /* HQYModules */; 428 | targetProxy = B9D8BA531D61686F003A0CB8 /* PBXContainerItemProxy */; 429 | }; 430 | B9D8BA5F1D61686F003A0CB8 /* PBXTargetDependency */ = { 431 | isa = PBXTargetDependency; 432 | target = B9D8BA381D61686F003A0CB8 /* HQYModules */; 433 | targetProxy = B9D8BA5E1D61686F003A0CB8 /* PBXContainerItemProxy */; 434 | }; 435 | /* End PBXTargetDependency section */ 436 | 437 | /* Begin PBXVariantGroup section */ 438 | B9D8BA4A1D61686F003A0CB8 /* LaunchScreen.storyboard */ = { 439 | isa = PBXVariantGroup; 440 | children = ( 441 | B9D8BA4B1D61686F003A0CB8 /* Base */, 442 | ); 443 | name = LaunchScreen.storyboard; 444 | sourceTree = ""; 445 | }; 446 | /* End PBXVariantGroup section */ 447 | 448 | /* Begin XCBuildConfiguration section */ 449 | B9D8BA641D61686F003A0CB8 /* Debug */ = { 450 | isa = XCBuildConfiguration; 451 | buildSettings = { 452 | ALWAYS_SEARCH_USER_PATHS = NO; 453 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 454 | CLANG_CXX_LIBRARY = "libc++"; 455 | CLANG_ENABLE_MODULES = YES; 456 | CLANG_ENABLE_OBJC_ARC = YES; 457 | CLANG_WARN_BOOL_CONVERSION = YES; 458 | CLANG_WARN_CONSTANT_CONVERSION = YES; 459 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 460 | CLANG_WARN_EMPTY_BODY = YES; 461 | CLANG_WARN_ENUM_CONVERSION = YES; 462 | CLANG_WARN_INT_CONVERSION = YES; 463 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 464 | CLANG_WARN_UNREACHABLE_CODE = YES; 465 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 466 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 467 | COPY_PHASE_STRIP = NO; 468 | DEBUG_INFORMATION_FORMAT = dwarf; 469 | ENABLE_STRICT_OBJC_MSGSEND = YES; 470 | ENABLE_TESTABILITY = YES; 471 | GCC_C_LANGUAGE_STANDARD = gnu99; 472 | GCC_DYNAMIC_NO_PIC = NO; 473 | GCC_NO_COMMON_BLOCKS = YES; 474 | GCC_OPTIMIZATION_LEVEL = 0; 475 | GCC_PREPROCESSOR_DEFINITIONS = ( 476 | "DEBUG=1", 477 | "$(inherited)", 478 | ); 479 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 480 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 481 | GCC_WARN_UNDECLARED_SELECTOR = YES; 482 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 483 | GCC_WARN_UNUSED_FUNCTION = YES; 484 | GCC_WARN_UNUSED_VARIABLE = YES; 485 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 486 | MTL_ENABLE_DEBUG_INFO = YES; 487 | ONLY_ACTIVE_ARCH = YES; 488 | SDKROOT = iphoneos; 489 | TARGETED_DEVICE_FAMILY = "1,2"; 490 | }; 491 | name = Debug; 492 | }; 493 | B9D8BA651D61686F003A0CB8 /* Release */ = { 494 | isa = XCBuildConfiguration; 495 | buildSettings = { 496 | ALWAYS_SEARCH_USER_PATHS = NO; 497 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 498 | CLANG_CXX_LIBRARY = "libc++"; 499 | CLANG_ENABLE_MODULES = YES; 500 | CLANG_ENABLE_OBJC_ARC = YES; 501 | CLANG_WARN_BOOL_CONVERSION = YES; 502 | CLANG_WARN_CONSTANT_CONVERSION = YES; 503 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 504 | CLANG_WARN_EMPTY_BODY = YES; 505 | CLANG_WARN_ENUM_CONVERSION = YES; 506 | CLANG_WARN_INT_CONVERSION = YES; 507 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 508 | CLANG_WARN_UNREACHABLE_CODE = YES; 509 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 510 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 511 | COPY_PHASE_STRIP = NO; 512 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 513 | ENABLE_NS_ASSERTIONS = NO; 514 | ENABLE_STRICT_OBJC_MSGSEND = YES; 515 | GCC_C_LANGUAGE_STANDARD = gnu99; 516 | GCC_NO_COMMON_BLOCKS = YES; 517 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 518 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 519 | GCC_WARN_UNDECLARED_SELECTOR = YES; 520 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 521 | GCC_WARN_UNUSED_FUNCTION = YES; 522 | GCC_WARN_UNUSED_VARIABLE = YES; 523 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 524 | MTL_ENABLE_DEBUG_INFO = NO; 525 | SDKROOT = iphoneos; 526 | TARGETED_DEVICE_FAMILY = "1,2"; 527 | VALIDATE_PRODUCT = YES; 528 | }; 529 | name = Release; 530 | }; 531 | B9D8BA671D61686F003A0CB8 /* Debug */ = { 532 | isa = XCBuildConfiguration; 533 | buildSettings = { 534 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 535 | GCC_PREFIX_HEADER = HQYModules/HQY.pch; 536 | INFOPLIST_FILE = HQYModules/Info.plist; 537 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 538 | PRODUCT_BUNDLE_IDENTIFIER = www.heqingyun.com.HQYModules; 539 | PRODUCT_NAME = "$(TARGET_NAME)"; 540 | }; 541 | name = Debug; 542 | }; 543 | B9D8BA681D61686F003A0CB8 /* Release */ = { 544 | isa = XCBuildConfiguration; 545 | buildSettings = { 546 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 547 | GCC_PREFIX_HEADER = HQYModules/HQY.pch; 548 | INFOPLIST_FILE = HQYModules/Info.plist; 549 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 550 | PRODUCT_BUNDLE_IDENTIFIER = www.heqingyun.com.HQYModules; 551 | PRODUCT_NAME = "$(TARGET_NAME)"; 552 | }; 553 | name = Release; 554 | }; 555 | B9D8BA6A1D61686F003A0CB8 /* Debug */ = { 556 | isa = XCBuildConfiguration; 557 | buildSettings = { 558 | BUNDLE_LOADER = "$(TEST_HOST)"; 559 | INFOPLIST_FILE = HQYModulesTests/Info.plist; 560 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 561 | PRODUCT_BUNDLE_IDENTIFIER = www.heqingyun.com.HQYModulesTests; 562 | PRODUCT_NAME = "$(TARGET_NAME)"; 563 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HQYModules.app/HQYModules"; 564 | }; 565 | name = Debug; 566 | }; 567 | B9D8BA6B1D61686F003A0CB8 /* Release */ = { 568 | isa = XCBuildConfiguration; 569 | buildSettings = { 570 | BUNDLE_LOADER = "$(TEST_HOST)"; 571 | INFOPLIST_FILE = HQYModulesTests/Info.plist; 572 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 573 | PRODUCT_BUNDLE_IDENTIFIER = www.heqingyun.com.HQYModulesTests; 574 | PRODUCT_NAME = "$(TARGET_NAME)"; 575 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HQYModules.app/HQYModules"; 576 | }; 577 | name = Release; 578 | }; 579 | B9D8BA6D1D61686F003A0CB8 /* Debug */ = { 580 | isa = XCBuildConfiguration; 581 | buildSettings = { 582 | INFOPLIST_FILE = HQYModulesUITests/Info.plist; 583 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 584 | PRODUCT_BUNDLE_IDENTIFIER = www.heqingyun.com.HQYModulesUITests; 585 | PRODUCT_NAME = "$(TARGET_NAME)"; 586 | TEST_TARGET_NAME = HQYModules; 587 | USES_XCTRUNNER = YES; 588 | }; 589 | name = Debug; 590 | }; 591 | B9D8BA6E1D61686F003A0CB8 /* Release */ = { 592 | isa = XCBuildConfiguration; 593 | buildSettings = { 594 | INFOPLIST_FILE = HQYModulesUITests/Info.plist; 595 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 596 | PRODUCT_BUNDLE_IDENTIFIER = www.heqingyun.com.HQYModulesUITests; 597 | PRODUCT_NAME = "$(TARGET_NAME)"; 598 | TEST_TARGET_NAME = HQYModules; 599 | USES_XCTRUNNER = YES; 600 | }; 601 | name = Release; 602 | }; 603 | /* End XCBuildConfiguration section */ 604 | 605 | /* Begin XCConfigurationList section */ 606 | B9D8BA341D61686F003A0CB8 /* Build configuration list for PBXProject "HQYModules" */ = { 607 | isa = XCConfigurationList; 608 | buildConfigurations = ( 609 | B9D8BA641D61686F003A0CB8 /* Debug */, 610 | B9D8BA651D61686F003A0CB8 /* Release */, 611 | ); 612 | defaultConfigurationIsVisible = 0; 613 | defaultConfigurationName = Release; 614 | }; 615 | B9D8BA661D61686F003A0CB8 /* Build configuration list for PBXNativeTarget "HQYModules" */ = { 616 | isa = XCConfigurationList; 617 | buildConfigurations = ( 618 | B9D8BA671D61686F003A0CB8 /* Debug */, 619 | B9D8BA681D61686F003A0CB8 /* Release */, 620 | ); 621 | defaultConfigurationIsVisible = 0; 622 | defaultConfigurationName = Release; 623 | }; 624 | B9D8BA691D61686F003A0CB8 /* Build configuration list for PBXNativeTarget "HQYModulesTests" */ = { 625 | isa = XCConfigurationList; 626 | buildConfigurations = ( 627 | B9D8BA6A1D61686F003A0CB8 /* Debug */, 628 | B9D8BA6B1D61686F003A0CB8 /* Release */, 629 | ); 630 | defaultConfigurationIsVisible = 0; 631 | defaultConfigurationName = Release; 632 | }; 633 | B9D8BA6C1D61686F003A0CB8 /* Build configuration list for PBXNativeTarget "HQYModulesUITests" */ = { 634 | isa = XCConfigurationList; 635 | buildConfigurations = ( 636 | B9D8BA6D1D61686F003A0CB8 /* Debug */, 637 | B9D8BA6E1D61686F003A0CB8 /* Release */, 638 | ); 639 | defaultConfigurationIsVisible = 0; 640 | defaultConfigurationName = Release; 641 | }; 642 | /* End XCConfigurationList section */ 643 | }; 644 | rootObject = B9D8BA311D61686F003A0CB8 /* Project object */; 645 | } 646 | -------------------------------------------------------------------------------- /HQYModules/HQYModules.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/5/15. 6 | // Copyright © 2016年 江城程序猿. 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 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/5/15. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "HQYTableViewController.h" 11 | 12 | @interface AppDelegate () 13 | 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | #pragma - mark app加载完成 19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 20 | 21 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 22 | 23 | HQYTableViewController *vc = [[HQYTableViewController alloc] init]; 24 | 25 | UINavigationController *navVc = [[UINavigationController alloc] initWithRootViewController:vc]; 26 | 27 | self.window.rootViewController = navVc; 28 | 29 | [self.window makeKeyAndVisible]; 30 | 31 | return YES; 32 | } 33 | 34 | - (void)applicationWillResignActive:(UIApplication *)application { 35 | // 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. 36 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 37 | } 38 | 39 | - (void)applicationDidEnterBackground:(UIApplication *)application { 40 | // 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. 41 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 42 | } 43 | 44 | - (void)applicationWillEnterForeground:(UIApplication *)application { 45 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 46 | } 47 | 48 | - (void)applicationDidBecomeActive:(UIApplication *)application { 49 | // 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. 50 | } 51 | 52 | - (void)applicationWillTerminate:(UIApplication *)application { 53 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/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 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "83.5x83.5", 66 | "scale" : "2x" 67 | } 68 | ], 69 | "info" : { 70 | "version" : 1, 71 | "author" : "xcode" 72 | } 73 | } -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/bg.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "bg.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/bg.imageset/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingyunhe/HQYModules/6974461aee91816951475608ab3a14e5a65a55cd/HQYModules/HQYModules/Assets.xcassets/bg.imageset/bg.png -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/1.imageset/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingyunhe/HQYModules/6974461aee91816951475608ab3a14e5a65a55cd/HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/1.imageset/1.jpg -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "1.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/10.imageset/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingyunhe/HQYModules/6974461aee91816951475608ab3a14e5a65a55cd/HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/10.imageset/10.jpg -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/10.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "10.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/11.imageset/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingyunhe/HQYModules/6974461aee91816951475608ab3a14e5a65a55cd/HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/11.imageset/2.jpg -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/11.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/12.imageset/12.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingyunhe/HQYModules/6974461aee91816951475608ab3a14e5a65a55cd/HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/12.imageset/12.jpeg -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/12.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "12.jpeg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/2.imageset/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingyunhe/HQYModules/6974461aee91816951475608ab3a14e5a65a55cd/HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/2.imageset/11.jpg -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "11.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/3.imageset/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingyunhe/HQYModules/6974461aee91816951475608ab3a14e5a65a55cd/HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/3.imageset/3.jpg -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "3.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/4.imageset/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingyunhe/HQYModules/6974461aee91816951475608ab3a14e5a65a55cd/HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/4.imageset/4.jpg -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "4.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/5.imageset/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingyunhe/HQYModules/6974461aee91816951475608ab3a14e5a65a55cd/HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/5.imageset/5.jpg -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "5.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/6.imageset/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingyunhe/HQYModules/6974461aee91816951475608ab3a14e5a65a55cd/HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/6.imageset/6.jpg -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/6.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "6.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/7.imageset/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingyunhe/HQYModules/6974461aee91816951475608ab3a14e5a65a55cd/HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/7.imageset/7.jpg -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/7.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "7.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/8.imageset/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingyunhe/HQYModules/6974461aee91816951475608ab3a14e5a65a55cd/HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/8.imageset/8.jpg -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/8.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "8.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/9.imageset/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingyunhe/HQYModules/6974461aee91816951475608ab3a14e5a65a55cd/HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/9.imageset/9.jpg -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/9.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "9.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HQYModules/HQYModules/Assets.xcassets/樱桃小丸子/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /HQYModules/HQYModules/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 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQY.pch: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // HQY.pch 4 | // HQYModules 5 | // 6 | // Created by 江城程序猿 on 16/9/15. 7 | // Copyright © 2016年 江城程序猿. All rights reserved. 8 | // 9 | 10 | 11 | #ifdef __OBJC__ 12 | 13 | // 程序主窗口 14 | #define HQYKeyWindow [UIApplication sharedApplication].keyWindow 15 | // 屏幕的bounds 16 | #define HQYScreenBounds [UIScreen mainScreen].bounds 17 | 18 | #define HQYScreenWidth [UIScreen mainScreen].bounds.size.width 19 | 20 | #define HQYScreenHeight [UIScreen mainScreen].bounds.size.height 21 | 22 | #endif -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYCascadingMenu/HQYCascadingMenuController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HQYCascadingMenuController.h 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/8/16. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HQYCascadingMenuController : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYCascadingMenu/HQYCascadingMenuController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HQYCascadingMenuController.m 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/8/16. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import "HQYCascadingMenuController.h" 10 | #import "HQYMainCategoryController.h" 11 | #import "HQYSubCategoryController.h" 12 | 13 | @interface HQYCascadingMenuController () 14 | 15 | @end 16 | 17 | @implementation HQYCascadingMenuController 18 | 19 | - (void)viewDidLoad { 20 | [super viewDidLoad]; 21 | 22 | CGFloat width = self.view.frame.size.width * 0.5; 23 | CGFloat height = self.view.frame.size.height; 24 | 25 | HQYSubCategoryController *subCategoryVc = [[HQYSubCategoryController alloc] init]; 26 | subCategoryVc.view.frame = CGRectMake(width, 0, width, height); 27 | [self addChildViewController:subCategoryVc]; 28 | [self.view addSubview:subCategoryVc.view]; 29 | 30 | HQYMainCategoryController *mainCategoryVc = [[HQYMainCategoryController alloc] init]; 31 | mainCategoryVc.delegate = subCategoryVc; 32 | mainCategoryVc.view.frame = CGRectMake(0, 0, width, height); 33 | [self addChildViewController:mainCategoryVc]; 34 | [self.view addSubview:mainCategoryVc.view]; 35 | 36 | } 37 | 38 | @end -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYCascadingMenu/HQYDownMenu/HQYDownMenu.h: -------------------------------------------------------------------------------- 1 | // 2 | // HQYDownMenu.h 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/9/15. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HQYDownMenu : UIView 12 | 13 | + (instancetype)showMenuInView:(UIView *)view WithTarget:(id)target action:(SEL)action; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYCascadingMenu/HQYDownMenu/HQYDownMenu.m: -------------------------------------------------------------------------------- 1 | // 2 | // HQYDownMenu.m 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/9/15. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import "HQYDownMenu.h" 10 | @interface HQYDownMenu() 11 | /** menuView */ 12 | @property (nonatomic,weak) UIView *menuView; 13 | 14 | @end 15 | 16 | @implementation HQYDownMenu 17 | 18 | + (instancetype)showMenuInView:(UIView *)view WithTarget:(id)target action:(SEL)action{ 19 | 20 | NSInteger row = 5; 21 | 22 | // HQYScreenWidth - 100 23 | CGRect downMenuViewFrame = CGRectMake(HQYScreenWidth - 100, 64, 100, 44 * row); 24 | HQYDownMenu *downMenuView = [[HQYDownMenu alloc] initWithFrame:downMenuViewFrame]; 25 | 26 | CGFloat x = 0; 27 | CGFloat h = 44; 28 | CGFloat w = 100; 29 | 30 | for (NSInteger i = 0; i < row; ++i) { 31 | UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; 32 | button .tag = i; 33 | button.frame = CGRectMake(x, i * h, w, h); 34 | [downMenuView addSubview:button]; 35 | [button addTarget:target action:action forControlEvents:UIControlEventTouchUpInside]; 36 | 37 | // 添加与菜单同色的背景view 38 | CGRect backViewFrame = CGRectMake(HQYScreenWidth - 100, 64, 100, 44); 39 | UIView *backView = [[UIView alloc] initWithFrame:backViewFrame]; 40 | backView.backgroundColor = [UIColor redColor]; 41 | [view addSubview:backView]; 42 | 43 | CGFloat ratio = 0.1; 44 | downMenuView.transform = CGAffineTransformMakeTranslation(0, - (ratio * downMenuView.frame.size.height)); 45 | [UIView animateWithDuration:0.5 delay:0 usingSpringWithDamping:0.8 46 | initialSpringVelocity:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{ 47 | 48 | downMenuView.transform = CGAffineTransformIdentity; 49 | 50 | } completion:^(BOOL finished) { 51 | [backView removeFromSuperview]; 52 | }]; 53 | 54 | if (0 == button.tag ) { 55 | [button setTitle:@"原味酸奶" forState:UIControlStateNormal]; 56 | } 57 | if (1 == button.tag) { 58 | [button setTitle:@"芒果酸奶" forState:UIControlStateNormal]; 59 | } 60 | if (button.tag == 2) { 61 | [button setTitle:@"蓝莓酸奶" forState:UIControlStateNormal]; 62 | } 63 | if (button.tag == 3) { 64 | [button setTitle:@"菠萝酸奶" forState:UIControlStateNormal]; 65 | } 66 | if (button.tag == 4) { 67 | [button setTitle:@"蜜柚酸奶" forState:UIControlStateNormal]; 68 | } 69 | if (button.tag == 5) { 70 | [button setTitle:@"动画组" forState:UIControlStateNormal]; 71 | } 72 | if (6 == button.tag) { 73 | [button setTitle:@"代码混淆" forState:UIControlStateNormal]; 74 | } 75 | } 76 | 77 | downMenuView.backgroundColor = [UIColor redColor]; 78 | 79 | // 此处不能将downMenuView添加到主窗口中 80 | // [[UIApplication sharedApplication].keyWindow addSubview:downMenuView]; 81 | [view addSubview:downMenuView]; 82 | 83 | return downMenuView; 84 | } 85 | 86 | @end 87 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYCascadingMenu/HQYDownMenu/HQYDownMenuController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HQYDownMenuController.h 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/9/15. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HQYDownMenuController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYCascadingMenu/HQYDownMenu/HQYDownMenuController.m: -------------------------------------------------------------------------------- 1 | 2 | 3 | // 4 | // HQYDownMenuController.m 5 | // HQYModules 6 | // 7 | // Created by 江城程序猿 on 16/9/15. 8 | // Copyright © 2016年 江城程序猿. All rights reserved. 9 | // 10 | 11 | #import "HQYDownMenuController.h" 12 | #import "HQYDownMenu.h" 13 | 14 | @interface HQYDownMenuController () 15 | /** 菜单是否弹出 */ 16 | @property(nonatomic,assign) BOOL isPopMenu; 17 | 18 | /** downMenuView */ 19 | @property (nonatomic,weak) UIView *downMenuView; 20 | 21 | @end 22 | 23 | @implementation HQYDownMenuController 24 | 25 | - (void)viewDidLoad { 26 | [super viewDidLoad]; 27 | 28 | self.view.backgroundColor = [UIColor orangeColor]; 29 | 30 | [self setUpDownMenuButton]; 31 | 32 | } 33 | 34 | - (void)setUpDownMenuButton{ 35 | 36 | UIButton *downMenuButton = [[UIButton alloc] init]; 37 | [downMenuButton setTitle:@"快点我吧😄" forState:UIControlStateNormal]; 38 | [downMenuButton setFont:[UIFont boldSystemFontOfSize:25]]; 39 | downMenuButton.frame = CGRectMake(50, 50, 150, 30); 40 | downMenuButton.center = self.view.center; 41 | [self.view addSubview:downMenuButton]; 42 | [downMenuButton addTarget:self action:@selector(downMenuButtonClick) forControlEvents:UIControlEventTouchUpInside]; 43 | } 44 | 45 | #pragma - mark 下拉菜单按钮的点击 46 | - (void)downMenuButtonClick{ 47 | 48 | [self popMenu]; 49 | 50 | } 51 | 52 | #pragma - mark 监听导航条右边按钮的点击 53 | - (void)popMenu{ 54 | 55 | if (_isPopMenu == NO) { 56 | 57 | self.downMenuView = [HQYDownMenu showMenuInView:self.view WithTarget:self action:@selector(buttonClick:)]; 58 | 59 | }else{ 60 | // 隐藏菜单 61 | [UIView animateWithDuration:0.5 animations:^{ 62 | 63 | self.downMenuView.transform = CGAffineTransformMakeTranslation(0, - self.downMenuView.frame.size.height); 64 | 65 | } completion:^(BOOL finished) { 66 | 67 | [self.downMenuView removeFromSuperview]; 68 | 69 | }]; 70 | 71 | } 72 | _isPopMenu = !_isPopMenu; 73 | 74 | } 75 | 76 | - (void)buttonClick:(UIButton *)button{ 77 | 78 | NSLog(@"在这里你可以做一些不可描述的事情"); 79 | 80 | } 81 | 82 | 83 | @end 84 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYCascadingMenu/HQYDownMenu/HQYPhotoPicker/HQYPhotoPickerViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HQYPhotoPickerViewController.h 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/10/15. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HQYPhotoPickerViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYCascadingMenu/HQYDownMenu/HQYPhotoPicker/HQYPhotoPickerViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HQYPhotoPickerViewController.m 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/10/15. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import "HQYPhotoPickerViewController.h" 10 | 11 | @interface HQYPhotoPickerViewController () 12 | 13 | @end 14 | 15 | @implementation HQYPhotoPickerViewController 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 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYCascadingMenu/HQYMainCategoryController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HQYMainCategoryController.h 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/8/16. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class HQYMainCategoryController; 12 | 13 | @protocol HQYMainCategoryControllerDelegate 14 | 15 | @optional 16 | 17 | - (void)categoryViewController:(HQYMainCategoryController *)mainCategoryViewController didSelectSubCategories:(NSArray *)subCategories; 18 | 19 | @end 20 | 21 | @interface HQYMainCategoryController : UITableViewController 22 | 23 | @property (nonatomic, weak) id delegate; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYCascadingMenu/HQYMainCategoryController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HQYMainCategoryController.m 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/8/16. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import "HQYMainCategoryController.h" 10 | #import "HYQHealthItem.h" 11 | 12 | @interface HQYMainCategoryController () 13 | /** plist文件中所有数据 */ 14 | @property (nonatomic, strong) NSArray *mainCategories; 15 | 16 | @end 17 | 18 | @implementation HQYMainCategoryController 19 | 20 | static NSString *HQYMainCategoryControllerID = @"cell"; 21 | 22 | - (void)viewDidLoad { 23 | [super viewDidLoad]; 24 | 25 | [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:HQYMainCategoryControllerID]; 26 | } 27 | 28 | - (void)viewWillAppear:(BOOL)animated{ 29 | 30 | [self.tableView selectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] animated:NO scrollPosition:(UITableViewScrollPositionTop)]; 31 | 32 | [self showSubCategoriesDataOfArrowZero]; 33 | } 34 | 35 | #pragma - mark 显示第0行数据 36 | - (void)showSubCategoriesDataOfArrowZero{ 37 | 38 | if ([self.delegate respondsToSelector:@selector(categoryViewController:didSelectSubCategories:)]) { 39 | 40 | NSDictionary *dict = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"health.plist" ofType:nil]][0]; 41 | HYQHealthItem *item = [HYQHealthItem categoryWithDict:dict]; 42 | [self.delegate categoryViewController:self didSelectSubCategories:item.subcategories]; 43 | } 44 | } 45 | 46 | #pragma - mark plist文件中所有数据懒加载 47 | - (NSArray *)mainCategories 48 | { 49 | if (_mainCategories == nil) { 50 | NSArray *dictArray = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"health.plist" ofType:nil]]; 51 | 52 | NSMutableArray *categoryArray = [NSMutableArray array]; 53 | for (NSDictionary *dict in dictArray) { 54 | [categoryArray addObject:[HYQHealthItem categoryWithDict:dict]]; 55 | } 56 | _mainCategories = categoryArray; 57 | } 58 | return _mainCategories; 59 | } 60 | 61 | #pragma mark - UITableViewDataSource 62 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 63 | return self.mainCategories.count; 64 | } 65 | 66 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 67 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:HQYMainCategoryControllerID]; 68 | 69 | HYQHealthItem *item = self.mainCategories[indexPath.row]; 70 | cell.textLabel.text = item.name; 71 | cell.textLabel.highlightedTextColor = [UIColor redColor]; 72 | cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; 73 | 74 | return cell; 75 | } 76 | 77 | #pragma mark - UITableViewDelegate 78 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 79 | if ([self.delegate respondsToSelector:@selector(categoryViewController:didSelectSubCategories:)]) { 80 | HYQHealthItem *item = self.mainCategories[indexPath.row]; 81 | [self.delegate categoryViewController:self didSelectSubCategories:item.subcategories]; 82 | } 83 | } 84 | 85 | @end 86 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYCascadingMenu/HQYSubCategoryController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HQYSubCategoryController.h 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/8/16. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "HQYMainCategoryController.h" 11 | 12 | @interface HQYSubCategoryController : UITableViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYCascadingMenu/HQYSubCategoryController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HQYSubCategoryController.m 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/8/16. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import "HQYSubCategoryController.h" 10 | 11 | @interface HQYSubCategoryController () 12 | /** 子类别数据 */ 13 | @property (nonatomic, strong) NSArray *subCategories; 14 | @end 15 | 16 | @implementation HQYSubCategoryController 17 | 18 | static NSString *HQYSubCategoryControllerID = @"cell"; 19 | 20 | - (void)viewDidLoad { 21 | [super viewDidLoad]; 22 | 23 | [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:HQYSubCategoryControllerID]; 24 | } 25 | 26 | #pragma mark - HQYMainCategoryControllerDelegate 27 | - (void)categoryViewController:(HQYMainCategoryController *)mainCategoryViewController didSelectSubCategories:(NSArray *)subCategories{ 28 | 29 | self.subCategories = subCategories; 30 | // 刷新数据(如果不刷新数据,HQYSubCategoryController中的数据不会显示) 31 | [self.tableView reloadData]; 32 | } 33 | 34 | #pragma mark - UITableViewDataSource 35 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 36 | return self.subCategories.count; 37 | } 38 | 39 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 40 | 41 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:HQYSubCategoryControllerID]; 42 | cell.textLabel.text = self.subCategories[indexPath.row]; 43 | 44 | return cell; 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYCascadingMenu/HYQHealthItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYQHealthItem.h 3 | // 级联菜单 4 | // 5 | // Created by 江城程序猿 on 16/8/16. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HYQHealthItem : NSObject 12 | /** 名称*/ 13 | @property (nonatomic,strong) NSString *name; 14 | /** 具体项目 */ 15 | @property(nonatomic,strong) NSArray *subcategories; 16 | /** 字典转模型 */ 17 | + (instancetype)categoryWithDict:(NSDictionary *)dict; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYCascadingMenu/HYQHealthItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYQHealthItem.m 3 | // 级联菜单 4 | // 5 | // Created by 江城程序猿 on 16/8/16. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import "HYQHealthItem.h" 10 | 11 | @implementation HYQHealthItem 12 | 13 | + (instancetype)categoryWithDict:(NSDictionary *)dict{ 14 | 15 | HYQHealthItem *item = [[self alloc] init]; 16 | [item setValuesForKeysWithDictionary:dict]; 17 | return item; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYCascadingMenu/Resources/health.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | name 7 | 血脂 8 | subcategories 9 | 10 | 总胆固醇 11 | 低密度脂蛋白胆固醇 12 | 甘油三酯 13 | 载脂蛋白B 14 | 载脂蛋白A1 15 | 同型半胱氨酸 16 | 高密度脂蛋白胆固醇 17 | 18 | 19 | 20 | name 21 | 肝功能 22 | subcategories 23 | 24 | 总蛋白浓度 25 | 总胆红素 26 | 球蛋白 27 | 乳酸脱氢酶 28 | 谷丙转氨酶 29 | 白蛋白浓度 30 | 碱性磷酸酶 31 | 间接胆红素 32 | 33 | 34 | 35 | name 36 | 甲状腺功能 37 | subcategories 38 | 39 | 游离三碘甲状腺氨酸 40 | 血清游离甲状腺素 41 | 血清三碘甲状腺原氨酸 42 | 血清甲状腺素 43 | 促甲状腺激素 44 | 45 | 46 | 47 | name 48 | 性激素六项 49 | subcategories 50 | 51 | 睾酮 52 | 孕酮 53 | 血清泌乳素 54 | 血清促卵泡刺激素 55 | 促黄体生成素 56 | 雌二醇 57 | 58 | 59 | 60 | name 61 | 血流变 62 | subcategories 63 | 64 | 红细胞刚性指数 65 | 红细胞变形指数 66 | 红细胞聚集指数 67 | 红细胞压积 68 | 全血高切相对指数 69 | 全血高切还原粘度 70 | 全血低切相对指数 71 | 血浆年度 72 | 血沉 73 | 血沉方程K值 74 | 75 | 76 | 77 | name 78 | 一般检查 79 | subcategories 80 | 81 | 血压 82 | 心率 83 | 舒张压 84 | 收缩压 85 | 脉搏 86 | 晶状体 87 | 玻璃体 88 | 体重指数BMI 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYCollectionView Reordering/HQYReorderingCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // HQYReorderingCell.h 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/5/15. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HQYReorderingCell : UICollectionViewCell 12 | 13 | @property (nonatomic, strong) UIImageView *cellImageView; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYCollectionView Reordering/HQYReorderingCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // HQYReorderingCell.m 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/5/15. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import "HQYReorderingCell.h" 10 | 11 | @implementation HQYReorderingCell 12 | 13 | - (instancetype)initWithFrame:(CGRect)frame{ 14 | self = [super initWithFrame:frame]; 15 | 16 | if (self) { 17 | _cellImageView = [[UIImageView alloc] initWithFrame:CGRectMake(5.0, 5.0, frame.size.width - 10.0, frame.size.height - 10.0)]; 18 | [self.contentView addSubview:_cellImageView]; 19 | } 20 | return self; 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYCollectionView Reordering/HQYReorderingController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HQYReorderingController.h 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/5/15. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HQYReorderingController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYCollectionView Reordering/HQYReorderingController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HQYReorderingController.m 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/5/15. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import "HQYReorderingController.h" 10 | #import "HQYReorderingCell.h" 11 | 12 | 13 | 14 | @interface HQYReorderingController () 15 | 16 | @property (nonatomic, strong) UICollectionView *reorderingCollectionView; 17 | 18 | /** 素材图片 */ 19 | @property (nonatomic, strong) NSMutableArray *imagesArrayM; 20 | /** 保存所有布局属性cell */ 21 | @property (nonatomic, strong) NSMutableArray *layoutAttributesCellArrayM; 22 | 23 | @end 24 | 25 | static NSString * const HQYReorderingControllerID = @"cell"; 26 | 27 | @implementation HQYReorderingController 28 | 29 | #pragma - mark 素材图片数组懒加载 30 | - (NSMutableArray *)imagesArrayM{ 31 | 32 | if (!_imagesArrayM) { 33 | self.imagesArrayM = [NSMutableArray arrayWithCapacity:0]; 34 | } 35 | return _imagesArrayM; 36 | } 37 | 38 | #pragma - mark 保存所有布局属性cell懒加载 39 | - (NSMutableArray *)layoutAttributesCellArrayM{ 40 | 41 | if (!_layoutAttributesCellArrayM) { 42 | self.layoutAttributesCellArrayM = [NSMutableArray arrayWithCapacity:0]; 43 | } 44 | return _layoutAttributesCellArrayM; 45 | } 46 | 47 | - (void)viewDidLoad { 48 | [super viewDidLoad]; 49 | 50 | self.view.backgroundColor = [UIColor redColor]; 51 | 52 | self.automaticallyAdjustsScrollViewInsets = NO; 53 | 54 | self.view.backgroundColor = [UIColor lightGrayColor]; 55 | 56 | [self setUpImageCollectionFlowLayout]; 57 | 58 | for (int i = 0; i < 12; i++) { 59 | [self.imagesArrayM addObject:[NSString stringWithFormat:@"%d",i+1]]; 60 | } 61 | } 62 | 63 | #pragma - mark 初始化imageCollection的流水布局 64 | - (void)setUpImageCollectionFlowLayout{ 65 | 66 | UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc]init]; 67 | layout.minimumLineSpacing = 5.0; 68 | layout.minimumInteritemSpacing = 5.0; 69 | layout.sectionInset = UIEdgeInsetsMake(5.0, 5.0, 5.0, 5.0); 70 | 71 | // 初始化imageCollection 72 | [self setUpImageCollection:layout]; 73 | } 74 | 75 | #pragma - mark 初始化imageCollection 76 | - (void)setUpImageCollection:(UICollectionViewFlowLayout *)layout{ 77 | 78 | _reorderingCollectionView = [[UICollectionView alloc]initWithFrame:CGRectMake(0, 64.0, HQYScreenWidth, HQYScreenHeight) collectionViewLayout:layout]; 79 | _reorderingCollectionView.backgroundColor = [UIColor lightGrayColor]; 80 | _reorderingCollectionView.dataSource = self; 81 | _reorderingCollectionView.delegate = self; 82 | [_reorderingCollectionView registerClass:[HQYReorderingCell class] forCellWithReuseIdentifier:HQYReorderingControllerID]; 83 | [self.view addSubview:_reorderingCollectionView]; 84 | } 85 | 86 | #pragma - mark UICollectionViewDataSource 87 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{ 88 | 89 | return self.imagesArrayM.count; 90 | } 91 | 92 | - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{ 93 | 94 | return CGSizeMake((HQYScreenWidth - 25.0) / 3.0, (HQYScreenWidth - 25.0) / 3.0 * 5 / 3); 95 | } 96 | 97 | - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ 98 | 99 | HQYReorderingCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:HQYReorderingControllerID forIndexPath:indexPath]; 100 | cell.backgroundColor = [UIColor whiteColor]; 101 | cell.cellImageView.image = [UIImage imageNamed:self.imagesArrayM[indexPath.row]]; 102 | UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc]initWithTarget:self action:@selector(longPressGesture:)]; 103 | [cell addGestureRecognizer:longPress]; 104 | return cell; 105 | } 106 | 107 | #pragma - mark 添加长按手势 108 | - (void)longPressGesture:(UILongPressGestureRecognizer *)sender{ 109 | 110 | HQYReorderingCell *cell = (HQYReorderingCell *)sender.view; 111 | NSIndexPath *cellIndexPath = [_reorderingCollectionView indexPathForCell:cell]; 112 | [_reorderingCollectionView bringSubviewToFront:cell]; 113 | 114 | BOOL isChanged = NO; 115 | 116 | switch (sender.state) { 117 | 118 | case UIGestureRecognizerStateBegan: 119 | [self.layoutAttributesCellArrayM removeAllObjects]; 120 | for (int i = 0;i< self.imagesArrayM.count; i++) { 121 | [self.layoutAttributesCellArrayM addObject:[_reorderingCollectionView layoutAttributesForItemAtIndexPath:[NSIndexPath indexPathForItem:i inSection:0]]]; 122 | } 123 | break; 124 | 125 | case UIGestureRecognizerStateChanged: 126 | cell.center = [sender locationInView:_reorderingCollectionView]; 127 | for (UICollectionViewLayoutAttributes *attributes in self.layoutAttributesCellArrayM) { 128 | if (CGRectContainsPoint(attributes.frame, cell.center) && cellIndexPath != attributes.indexPath) { 129 | isChanged = YES; 130 | NSString *imageStr = self.imagesArrayM[cellIndexPath.row]; 131 | [self.imagesArrayM removeObjectAtIndex:cellIndexPath.row]; 132 | [self.imagesArrayM insertObject:imageStr atIndex:attributes.indexPath.row]; 133 | [self.reorderingCollectionView moveItemAtIndexPath:cellIndexPath 134 | toIndexPath:attributes.indexPath]; 135 | } 136 | } 137 | break; 138 | 139 | case UIGestureRecognizerStateEnded: 140 | if (!isChanged) { 141 | cell.center = [_reorderingCollectionView layoutAttributesForItemAtIndexPath:cellIndexPath].center; 142 | } 143 | break; 144 | // 消除警告用,因为sender.state的其他几种状态未做判断 145 | default: 146 | 147 | break; 148 | } 149 | } 150 | 151 | @end 152 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYDownMenu/HQYDownMenu.h: -------------------------------------------------------------------------------- 1 | // 2 | // HQYDownMenu.h 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/9/15. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HQYDownMenu : UIView 12 | 13 | + (instancetype)showMenuInView:(UIView *)view WithTarget:(id)target action:(SEL)action; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYDownMenu/HQYDownMenu.m: -------------------------------------------------------------------------------- 1 | // 2 | // HQYDownMenu.m 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/9/15. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import "HQYDownMenu.h" 10 | @interface HQYDownMenu() 11 | /** menuView */ 12 | @property (nonatomic,weak) UIView *menuView; 13 | 14 | @end 15 | 16 | @implementation HQYDownMenu 17 | 18 | + (instancetype)showMenuInView:(UIView *)view WithTarget:(id)target action:(SEL)action{ 19 | 20 | NSInteger row = 5; 21 | 22 | // HQYScreenWidth - 100 23 | CGRect downMenuViewFrame = CGRectMake(HQYScreenWidth - 100, 64, 100, 44 * row); 24 | HQYDownMenu *downMenuView = [[HQYDownMenu alloc] initWithFrame:downMenuViewFrame]; 25 | 26 | CGFloat x = 0; 27 | CGFloat h = 44; 28 | CGFloat w = 100; 29 | 30 | for (NSInteger i = 0; i < row; ++i) { 31 | UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; 32 | button .tag = i; 33 | button.frame = CGRectMake(x, i * h, w, h); 34 | [downMenuView addSubview:button]; 35 | [button addTarget:target action:action forControlEvents:UIControlEventTouchUpInside]; 36 | 37 | // 添加与菜单同色的背景view 38 | CGRect backViewFrame = CGRectMake(HQYScreenWidth - 100, 64, 100, 44); 39 | UIView *backView = [[UIView alloc] initWithFrame:backViewFrame]; 40 | backView.backgroundColor = [UIColor redColor]; 41 | [view addSubview:backView]; 42 | 43 | 44 | CGFloat ratio = 0.1; 45 | downMenuView.transform = CGAffineTransformMakeTranslation(0, - (ratio * downMenuView.frame.size.height)); 46 | [UIView animateWithDuration:0.5 delay:0 usingSpringWithDamping:0.8 47 | initialSpringVelocity:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{ 48 | 49 | downMenuView.transform = CGAffineTransformIdentity; 50 | 51 | } completion:^(BOOL finished) { 52 | [backView removeFromSuperview]; 53 | }]; 54 | 55 | if (button.tag == 0) { 56 | [button setTitle:@"原味酸奶" forState:UIControlStateNormal]; 57 | } 58 | if (button.tag == 1) { 59 | [button setTitle:@"芒果酸奶" forState:UIControlStateNormal]; 60 | } 61 | if (button.tag == 2) { 62 | [button setTitle:@"蓝莓酸奶" forState:UIControlStateNormal]; 63 | } 64 | if (button.tag == 3) { 65 | [button setTitle:@"菠萝酸奶" forState:UIControlStateNormal]; 66 | } 67 | if (button.tag == 4) { 68 | [button setTitle:@"蜜柚酸奶" forState:UIControlStateNormal]; 69 | } 70 | } 71 | 72 | downMenuView.backgroundColor = [UIColor redColor]; 73 | 74 | // 此处不能将downMenuView添加到主窗口中 75 | // [[UIApplication sharedApplication].keyWindow addSubview:downMenuView]; 76 | [view addSubview:downMenuView]; 77 | 78 | return downMenuView; 79 | } 80 | 81 | @end 82 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYDownMenu/HQYDownMenuController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HQYDownMenuController.h 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/9/15. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HQYDownMenuController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYDownMenu/HQYDownMenuController.m: -------------------------------------------------------------------------------- 1 | 2 | 3 | // 4 | // HQYDownMenuController.m 5 | // HQYModules 6 | // 7 | // Created by 江城程序猿 on 16/9/15. 8 | // Copyright © 2016年 江城程序猿. All rights reserved. 9 | // 10 | 11 | #import "HQYDownMenuController.h" 12 | #import "HQYDownMenu.h" 13 | 14 | @interface HQYDownMenuController () 15 | /** 菜单是否弹出 */ 16 | @property(nonatomic,assign) BOOL isPopMenu; 17 | 18 | /** downMenuView */ 19 | @property (nonatomic,weak) UIView *downMenuView; 20 | 21 | @end 22 | 23 | @implementation HQYDownMenuController 24 | 25 | - (void)viewDidLoad { 26 | [super viewDidLoad]; 27 | 28 | self.view.backgroundColor = [UIColor orangeColor]; 29 | 30 | [self setUpDownMenuButton]; 31 | 32 | } 33 | 34 | - (void)setUpDownMenuButton{ 35 | 36 | UIButton *downMenuButton = [[UIButton alloc] init]; 37 | [downMenuButton setTitle:@"快点我😄" forState:UIControlStateNormal]; 38 | [downMenuButton setFont:[UIFont boldSystemFontOfSize:25]]; 39 | downMenuButton.frame = CGRectMake(50, 50, 150, 30); 40 | downMenuButton.center = self.view.center; 41 | [self.view addSubview:downMenuButton]; 42 | [downMenuButton addTarget:self action:@selector(downMenuButtonClick) forControlEvents:UIControlEventTouchUpInside]; 43 | } 44 | 45 | #pragma - mark 下拉菜单按钮的点击 46 | - (void)downMenuButtonClick{ 47 | 48 | [self popMenu]; 49 | 50 | } 51 | 52 | #pragma - mark 监听导航条右边按钮的点击 53 | - (void)popMenu{ 54 | 55 | if (_isPopMenu == NO) { 56 | 57 | self.downMenuView = [HQYDownMenu showMenuInView:self.view WithTarget:self action:@selector(buttonClick:)]; 58 | 59 | }else{ 60 | // 隐藏菜单 61 | [UIView animateWithDuration:0.5 animations:^{ 62 | 63 | self.downMenuView.transform = CGAffineTransformMakeTranslation(0, - self.downMenuView.frame.size.height); 64 | 65 | } completion:^(BOOL finished) { 66 | 67 | [self.downMenuView removeFromSuperview]; 68 | 69 | }]; 70 | 71 | } 72 | _isPopMenu = !_isPopMenu; 73 | 74 | } 75 | 76 | 77 | 78 | 79 | 80 | @end 81 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYStatusBar/HQYStatusBarController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HQYStatusBarController.h 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/8/19. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HQYStatusBarController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/HQYStatusBar/HQYStatusBarController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HQYStatusBarController.m 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/8/19. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import "HQYStatusBarController.h" 10 | 11 | @interface HQYStatusBarController () 12 | 13 | @end 14 | 15 | @implementation HQYStatusBarController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | self.view.backgroundColor = [UIColor whiteColor]; 20 | 21 | [self setUpStatusBar]; 22 | } 23 | 24 | #pragma - mark 设置状态栏 25 | - (void)setUpStatusBar{ 26 | 27 | UIApplication *app = [UIApplication sharedApplication]; 28 | UIView *statusBar = [app valueForKeyPath:@"statusBar"]; 29 | statusBar.frame = (CGRect){0, 100, 350, 20}; 30 | statusBar.center = self.view.center; 31 | statusBar.backgroundColor = [UIColor orangeColor]; 32 | 33 | // 拿到UIStatusBarForegroundView对象 34 | UIView *barForegroundView = statusBar.subviews[1]; 35 | 36 | // 设置服务商 37 | UIView *seviceView = barForegroundView.subviews[0]; 38 | CGRect seviceFrame = seviceView.frame; 39 | seviceFrame.size.width = 2 * seviceFrame.size.width; 40 | seviceView.frame = seviceFrame; 41 | seviceView.hidden = YES; 42 | UILabel *seviceLabel = [[UILabel alloc] init]; 43 | seviceLabel.frame = seviceFrame; 44 | seviceLabel.text = @"66666"; 45 | seviceLabel.font = [UIFont systemFontOfSize:10]; 46 | [barForegroundView addSubview:seviceLabel]; 47 | 48 | // 设置网络信号 49 | UIView *networkView = barForegroundView.subviews[1]; 50 | networkView.backgroundColor = [UIColor greenColor]; 51 | 52 | // 设置电池 53 | UIView *batteryView = barForegroundView.subviews[2]; 54 | batteryView.hidden = YES; 55 | CGRect batteryFrame = batteryView.frame; 56 | UILabel *batteryLabel = [[UILabel alloc] init]; 57 | batteryLabel.frame = batteryFrame; 58 | batteryLabel.text = @"电池"; 59 | batteryLabel.font = [UIFont systemFontOfSize:10]; 60 | [barForegroundView addSubview:batteryLabel]; 61 | 62 | // 设置时间 63 | UIView *timeView = barForegroundView.subviews[3]; 64 | timeView.hidden = YES; 65 | CGRect timeFrame = timeView.frame; 66 | UILabel *timeLabel = [[UILabel alloc] init]; 67 | timeLabel.frame = timeFrame; 68 | timeLabel.text = @"时间去哪儿"; 69 | timeLabel.font = [UIFont systemFontOfSize:10]; 70 | [barForegroundView addSubview:timeLabel]; 71 | } 72 | 73 | @end -------------------------------------------------------------------------------- /HQYModules/HQYModules/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 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 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 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/Main/HQYTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // HQYTableViewCell.h 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/5/15. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HQYTableViewCell : UITableViewCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/Main/HQYTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // HQYTableViewCell.m 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/5/15. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import "HQYTableViewCell.h" 10 | 11 | @implementation HQYTableViewCell 12 | 13 | - (void)setFrame:(CGRect)frame{ 14 | 15 | frame.origin.x += 10; 16 | frame.origin.y += 10; 17 | frame.size.height -= 10; 18 | frame.size.width -= 20; 19 | 20 | [super setFrame:frame]; 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/Main/HQYTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HQYTableViewController.h 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/5/15. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HQYTableViewController : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HQYModules/HQYModules/Main/HQYTableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HQYTableViewController.m 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/5/15. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import "HQYTableViewController.h" 10 | #import "HQYTableViewCell.h" 11 | #import "HQYReorderingController.h" 12 | #import "HQYCascadingMenuController.h" 13 | #import "HQYStatusBarController.h" 14 | #import "HQYDownMenuController.h" 15 | 16 | @interface HQYTableViewController () 17 | 18 | @end 19 | 20 | @implementation HQYTableViewController 21 | 22 | static NSString * const HQYID = @"cell"; 23 | 24 | - (void)viewDidLoad { 25 | [super viewDidLoad]; 26 | 27 | self.title = @"江城程序猿"; 28 | self.tableView.rowHeight = 66; 29 | 30 | // 设置背景视图 31 | [self setUpBackgroundView]; 32 | } 33 | 34 | #pragma - mark 添加背景视图 35 | - (void)setUpBackgroundView{ 36 | 37 | UIImageView *imageView = [[UIImageView alloc] init]; 38 | imageView.image = [UIImage imageNamed:@"bg"]; 39 | self.tableView.backgroundView = imageView; 40 | } 41 | 42 | #pragma - mark UITableViewDataSource 43 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 44 | return 8; 45 | } 46 | 47 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 48 | 49 | HQYTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:HQYID]; 50 | if (cell == nil) { 51 | cell = [[HQYTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:HQYID]; 52 | } 53 | cell.textLabel.font = [UIFont systemFontOfSize:25]; 54 | 55 | NSString *text = nil; 56 | switch (indexPath.row) { 57 | case 0: 58 | { 59 | // HQYCollectionView Reordering 60 | text = @"UICollectionView重排"; 61 | break; 62 | } 63 | case 1: 64 | { 65 | // HQYCascadingMenu 66 | text = @"级联菜单"; 67 | break; 68 | } 69 | case 2: 70 | { 71 | // HQYStatusBar 72 | text = @"自定义系统状态栏(服务商,网络信号,时间,电池)"; 73 | cell.textLabel.font = [UIFont systemFontOfSize:15]; 74 | break; 75 | } 76 | case 3: 77 | { 78 | // HQYDownMenu 79 | text = @"自定义下拉菜单"; 80 | break; 81 | } 82 | case 4: 83 | { 84 | text = @"照片选择器"; 85 | break; 86 | } 87 | case 5: 88 | { 89 | text = @"待续 😄😄😄😄😄😄"; 90 | break; 91 | } 92 | case 6: 93 | { 94 | text = @"待续 😄😄😄😄😄😄"; 95 | break; 96 | } 97 | case 7: 98 | { 99 | text = @"待续 😄😄😄😄😄😄"; 100 | break; 101 | } 102 | case 8: 103 | { 104 | text = @"待续 😄😄😄😄😄😄"; 105 | break; 106 | } 107 | case 9: 108 | { 109 | text = @"待续 😄😄😄😄😄😄"; 110 | break; 111 | } 112 | 113 | default: 114 | break; 115 | } 116 | 117 | cell.textLabel.text = text; 118 | 119 | return cell; 120 | } 121 | 122 | #pragma - mark UITableViewDelegate 123 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 124 | 125 | switch (indexPath.row) { 126 | case 0: 127 | { 128 | HQYReorderingController *reorderingVc = [[HQYReorderingController alloc] init]; 129 | reorderingVc.title = @"UICollectionView重排"; 130 | [self.navigationController pushViewController:reorderingVc animated:YES]; 131 | 132 | break; 133 | } 134 | case 1: 135 | { 136 | HQYCascadingMenuController *cascadingMenuVc = [[HQYCascadingMenuController alloc] init]; 137 | cascadingMenuVc.title = @"级联菜单"; 138 | [self.navigationController pushViewController:cascadingMenuVc animated:YES]; 139 | break; 140 | } 141 | case 2: 142 | { 143 | HQYStatusBarController *statusBarVc = [[HQYStatusBarController alloc] init]; 144 | statusBarVc.title = @"自定义系统状态栏"; 145 | [self.navigationController pushViewController:statusBarVc animated:YES]; 146 | break; 147 | } 148 | case 3: 149 | { 150 | HQYDownMenuController *downMenuVc = [[HQYDownMenuController alloc] init]; 151 | downMenuVc.title = @"自定义下拉菜单"; 152 | [self.navigationController pushViewController:downMenuVc animated:YES]; 153 | break; 154 | } 155 | 156 | 157 | default: 158 | break; 159 | } 160 | } 161 | 162 | @end -------------------------------------------------------------------------------- /HQYModules/HQYModules/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // HQYModules 4 | // 5 | // Created by 江城程序猿 on 16/8/15. 6 | // Copyright © 2016年 江城程序猿. 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 | -------------------------------------------------------------------------------- /HQYModules/HQYModulesTests/HQYModulesTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // HQYModulesTests.m 3 | // HQYModulesTests 4 | // 5 | // Created by 江城程序猿 on 16/8/15. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HQYModulesTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation HQYModulesTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /HQYModules/HQYModulesTests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /HQYModules/HQYModulesUITests/HQYModulesUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // HQYModulesUITests.m 3 | // HQYModulesUITests 4 | // 5 | // Created by 江城程序猿 on 16/8/15. 6 | // Copyright © 2016年 江城程序猿. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HQYModulesUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation HQYModulesUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /HQYModules/HQYModulesUITests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 何青云 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 | # HQYModules 2 | 集成iOS开发中常用功能模块. 3 | 4 | GitHub:[何青云](https://github.com/qingyunhe) | Blog:[江城程序猿](http://www.heqingyun.com) | Contact me: 5 | 6 | --- 7 | ##目录 8 | * [UICollectionView重排](#UICollectionView重排) 9 | * [级联菜单](#级联菜单) 10 | * [HQYStatusBar自定义状态栏](#级联菜单) 11 | * [HQYDownMenu自定义下拉菜单](#下拉菜单) 12 | * [动画组](#动画组) 13 | * [照片选择器](#照片选择器) 14 | 15 | 16 | 17 | 18 | 备注:浏览时,gif图偶尔会有非代码原因的卡顿. 19 | 20 | --- 21 | 22 | ###UICollectionView重排 23 | 24 | ![Mou icon](https://github.com/qingyunhe/HQYModules/blob/master/UICollectionView重排%20.gif) 25 | 26 | --- 27 | ###级联菜单 28 | ![Mou icon](https://github.com/qingyunhe/HQYModules/blob/master/级联菜单.gif) 29 | 30 | ####实现思路: 31 | 32 | 1 分别使用两个继承于`UITableViewController`的控制器管理左右两侧菜单,分别命名为`HQYMainCategoryController`(左菜单控制器)和`HQYSubCategoryController`(右菜单控制器). 33 | 34 | 2 使用导航控制器`push`出来的控制器(命名为`HQYCascadingMenuController`)来管理`HQYMainCategoryController`和`HQYSubCategoryController`,将`HQYMainCategoryController`和`HQYSubCategoryController`添加为`HQYCascadingMenuController`的子控制器,并将子控制器的`view`作为子控件添加到`HQYCascadingMenuController`的`view`中. 35 | 36 | 3 使用代理传值,将`HQYMainCategoryController`中的数据传递给`HQYSubCategoryController`. 37 | 38 | ####注意事项: 39 | 1 默认`HQYMainCategoryController`的`view`第0行`cell`应该处于选中状态,该业务逻辑应该在`viewWillAppear`方法中实现,而非在`viewDidLoad`方法中实现. 40 | 41 | ```objc 42 | - (void)viewWillAppear:(BOOL)animated{ 43 | 44 | [self.tableView selectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] animated:NO scrollPosition:(UITableViewScrollPositionTop)]; 45 | // 显示第0行数据 46 | [self showSubCategoriesDataOfArrowZero]; 47 | } 48 | 49 | ``` 50 | 51 | 2 默认`HQYSubCategoryController`的`view`展示`HQYMainCategoryController`的`view`第0行`cell`对应的数据. 52 | 53 | ```objc 54 | - (void)showSubCategoriesDataOfArrowZero{ 55 | 56 | if ([self.delegate respondsToSelector:@selector(categoryViewController:didSelectSubCategories:)]) { 57 | NSDictionary *dict = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"health.plist" ofType:nil]][0]; 58 | HYQHealthItem *item = [HYQHealthItem categoryWithDict:dict]; 59 | [self.delegate categoryViewController:self didSelectSubCategories:item.subcategories]; 60 | } 61 | } 62 | 63 | ``` 64 | --- 65 | ### HQYStatusBar自定义状态栏 66 | 67 | ![Mou icon](https://github.com/qingyunhe/HQYModules/blob/master/statusBar.gif) 68 | 69 | ####实现过程: 70 | 1 拿到`UIStatusBarForegroundView`对象 71 | 72 | ```objc 73 | 74 | UIApplication *app = [UIApplication sharedApplication]; 75 | UIView *statusBar = [app valueForKeyPath:@"statusBar"]; 76 | statusBar.frame = (CGRect){0, 100, 350, 50}; 77 | statusBar.center = self.view.center; 78 | statusBar.backgroundColor = [UIColor orangeColor]; 79 | UIView *barForegroundView = statusBar.subviews[1]; 80 | 81 | ``` 82 | 2 对系统状态栏的私有属性进行个性化设置(以网络服务商为例) ```objc 83 | 84 | UIView *seviceView = barForegroundView.subviews[0]; 85 | CGRect seviceFrame = seviceView.frame; 86 | seviceFrame.size.width = 2 * seviceFrame.size.width; 87 | seviceView.frame = seviceFrame; 88 | seviceView.hidden = YES; 89 | UILabel *seviceLabel = [[UILabel alloc] init]; 90 | seviceLabel.frame = seviceFrame; 91 | seviceLabel.text = @"66666"; 92 | seviceLabel.font = [UIFont systemFontOfSize:10]; 93 | [barForegroundView addSubview:seviceLabel]; 94 | 95 | ``` 96 | ### HQYDownMenu自定义下拉菜单 97 | ####注意事项: 98 | 1 不能将downMenuView添加到主窗口中 99 | 100 | ```objc 101 | [[UIApplication sharedApplication].keyWindow addSubview:downMenuView]; 102 | ``` 103 | 104 | 而应该添加到HQYDownMenu中 105 | 106 | --- 107 | 108 | 109 | ### 动画组 110 | ####实现过程: 111 | 112 | 113 | ### 照片选择器 114 | 115 | 116 | --- 117 | 118 | 待续 😄 119 | -------------------------------------------------------------------------------- /UICollectionView重排 .gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingyunhe/HQYModules/6974461aee91816951475608ab3a14e5a65a55cd/UICollectionView重排 .gif -------------------------------------------------------------------------------- /statusBar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingyunhe/HQYModules/6974461aee91816951475608ab3a14e5a65a55cd/statusBar.gif -------------------------------------------------------------------------------- /级联菜单.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qingyunhe/HQYModules/6974461aee91816951475608ab3a14e5a65a55cd/级联菜单.gif --------------------------------------------------------------------------------