├── .gitignore ├── LICENSE ├── README.md ├── ZFDropDownDemo ├── ZFDropDownDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── ZFDropDownDemo │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ ├── Animals.imageset │ │ │ ├── Animals@2x.png │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── Faded.imageset │ │ │ ├── Contents.json │ │ │ └── Faded@2x.png │ │ ├── I'll Be Fine.imageset │ │ │ ├── Contents.json │ │ │ └── I'll Be Fine@2x.png │ │ ├── Maps.imageset │ │ │ ├── Contents.json │ │ │ └── Maps@2x.png │ │ ├── See you again.imageset │ │ │ ├── Contents.json │ │ │ └── See you again@2x.png │ │ ├── Soldier.imageset │ │ │ ├── Contents.json │ │ │ └── Soldier@2x.png │ │ ├── The Lazy Song.imageset │ │ │ ├── Contents.json │ │ │ └── The Lazy Song@2x.png │ │ ├── The Phoenix.imageset │ │ │ ├── Contents.json │ │ │ └── The Phoenix@2x.png │ │ └── Untied State Of Pop 2014.imageset │ │ │ ├── Contents.json │ │ │ └── Untied State Of Pop 2014@2x.png │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── CustomView │ │ ├── MyTableViewCell.h │ │ └── MyTableViewCell.m │ ├── CustomViewController.h │ ├── CustomViewController.m │ ├── DefaultViewController.h │ ├── DefaultViewController.m │ ├── Info.plist │ ├── Songs.plist │ ├── TableViewController.h │ ├── TableViewController.m │ ├── ZFDropDown │ │ ├── Category │ │ │ ├── ZFView.h │ │ │ └── ZFView.m │ │ ├── Component │ │ │ ├── ZFTapGestureRecognizer.h │ │ │ └── ZFTapGestureRecognizer.m │ │ ├── Other │ │ │ ├── ZFConst.h │ │ │ └── ZFConst.m │ │ ├── ZFColor.h │ │ ├── ZFDropDown.h │ │ └── ZFDropDown.m │ └── main.m ├── ZFDropDownDemoTests │ ├── Info.plist │ └── ZFDropDownDemoTests.m └── ZFDropDownDemoUITests │ ├── Info.plist │ └── ZFDropDownDemoUITests.m └── _config.yml /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 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/fastlane/docs/Gitignore.md 51 | 52 | fastlane/report.xml 53 | fastlane/screenshots 54 | 55 | #Code Injection 56 | # 57 | # After new code Injection tools there's a generated folder /iOSInjectionProject 58 | # https://github.com/johnno1962/injectionforxcode 59 | 60 | iOSInjectionProject/ 61 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ZFDropDown 2 | A drop down for iOS. Designed by Kevin Hirsch. Written in OC by Zirkfied. It can also create your own custom style. 3 | 4 | 原作者Kevin Hirsch用Swift写的一个简单大气的下拉列表框,本人根据原样式写了一个OC版本,支持自定义样式。喜欢的欢迎star一个,有任何建议或问题可以加QQ群交流:451169423 5 | 6 | #### Swift : https://github.com/AssistoLab/DropDown 7 | 8 | ![](https://github.com/Zirkfied/Library/blob/master/DropDown1.gif)![](https://github.com/Zirkfied/Library/blob/master/DropDown2.gif)![](https://github.com/Zirkfied/Library/blob/master/DropDown3.gif) 9 | 10 | 11 | 12 | ### 用法: 13 | 第一步(step 1) 14 | 将项目里ZFDropDown整个文件夹拖进新项目 15 | 16 | 第二步(step 2) 17 | #import "ZFDropDown.h" 18 | 19 | 第三步(step 3) 20 | 须遵循ZFDropDownDelegate代理协议 21 | 22 | ZFDropDown * dropDown = [[ZFDropDown alloc] initWithFrame:CGRectMake(50, 100, 300, 40) pattern:kDropDownPatternDefault]; 23 | dropDown.delegate = self; 24 | [dropDown.topicButton setTitle:@"Please choose 1 continent / area" forState:UIControlStateNormal]; 25 | [self.view addSubview:dropDown]; 26 | 27 | #### @required 必须实现的方法 28 | - (NSArray *)itemArrayInDropDown:(ZFDropDown *)dropDown{ 29 | return @[@"Chinese", @"Math", @"English", @"Politics", @"Physics", @"Chemistry", @"Geography", @"History", @"Biology", @"Philosophy"]; 30 | } 31 | 32 | 33 | 34 | ### 其余说明 35 | #### 36 | 1.若是通过网络加载数据,在拿到数据后调用[dropDown reloadData]进行刷新列表 37 | 2.自定义样式请看Demo示例中的CustomViewController.m 38 | 3.其余方法和属性请查看ZFDropDown.h 39 |   40 |         41 | ### 更新日志 42 | 2017.01.15 初版发布 43 | 44 | 2017.03.27 ①修复网络加载无法刷新数据问题 45 | ②新增shadowOpacity(阴影透明度)属性 46 |         47 | ## 本人其他开源框架 48 | #### [ZFChart - 一款简单好用的图表库,目前有柱状,线状,饼图,波浪,雷达,圆环图类型](https://github.com/Zirkfied/ZFChart) 49 | #### [ZFScan - 仿微信 二维码/条形码 扫描](https://github.com/Zirkfied/ZFScan) 50 | #### [ZFDropDown - 简单大气的下拉列表框](https://github.com/Zirkfied/ZFDropDown) 51 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 184B9B631E2B53F000B7AF3A /* ZFTapGestureRecognizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 184B9B621E2B53F000B7AF3A /* ZFTapGestureRecognizer.m */; }; 11 | 184B9B641E2B53F000B7AF3A /* ZFTapGestureRecognizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 184B9B621E2B53F000B7AF3A /* ZFTapGestureRecognizer.m */; }; 12 | 186E302A1E1CD8380096C6BF /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 186E30291E1CD8380096C6BF /* main.m */; }; 13 | 186E302D1E1CD8380096C6BF /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 186E302C1E1CD8380096C6BF /* AppDelegate.m */; }; 14 | 186E30301E1CD8380096C6BF /* DefaultViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 186E302F1E1CD8380096C6BF /* DefaultViewController.m */; }; 15 | 186E30331E1CD8380096C6BF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 186E30311E1CD8380096C6BF /* Main.storyboard */; }; 16 | 186E30351E1CD8380096C6BF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 186E30341E1CD8380096C6BF /* Assets.xcassets */; }; 17 | 186E30381E1CD8380096C6BF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 186E30361E1CD8380096C6BF /* LaunchScreen.storyboard */; }; 18 | 186E30431E1CD8380096C6BF /* ZFDropDownDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 186E30421E1CD8380096C6BF /* ZFDropDownDemoTests.m */; }; 19 | 186E304E1E1CD8380096C6BF /* ZFDropDownDemoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 186E304D1E1CD8380096C6BF /* ZFDropDownDemoUITests.m */; }; 20 | 186E30601E1CDAFE0096C6BF /* ZFDropDown.m in Sources */ = {isa = PBXBuildFile; fileRef = 186E305F1E1CDAFE0096C6BF /* ZFDropDown.m */; }; 21 | 186E30611E1CDAFE0096C6BF /* ZFDropDown.m in Sources */ = {isa = PBXBuildFile; fileRef = 186E305F1E1CDAFE0096C6BF /* ZFDropDown.m */; }; 22 | 188AC1931E1DE543009CB282 /* ZFConst.m in Sources */ = {isa = PBXBuildFile; fileRef = 188AC1921E1DE543009CB282 /* ZFConst.m */; }; 23 | 188AC1941E1DE543009CB282 /* ZFConst.m in Sources */ = {isa = PBXBuildFile; fileRef = 188AC1921E1DE543009CB282 /* ZFConst.m */; }; 24 | 188AC1981E1DF1E0009CB282 /* ZFView.m in Sources */ = {isa = PBXBuildFile; fileRef = 188AC1971E1DF1E0009CB282 /* ZFView.m */; }; 25 | 188AC1991E1DF1E0009CB282 /* ZFView.m in Sources */ = {isa = PBXBuildFile; fileRef = 188AC1971E1DF1E0009CB282 /* ZFView.m */; }; 26 | 18C050CF1E278148007FD1D9 /* TableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 18C050CE1E278148007FD1D9 /* TableViewController.m */; }; 27 | 18C050D01E278148007FD1D9 /* TableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 18C050CE1E278148007FD1D9 /* TableViewController.m */; }; 28 | 18C050D31E27889D007FD1D9 /* CustomViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 18C050D21E27889D007FD1D9 /* CustomViewController.m */; }; 29 | 18C050D41E27889D007FD1D9 /* CustomViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 18C050D21E27889D007FD1D9 /* CustomViewController.m */; }; 30 | 18D63D751E237A66006D36FD /* MyTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 18D63D741E237A66006D36FD /* MyTableViewCell.m */; }; 31 | 18D63D761E237A66006D36FD /* MyTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 18D63D741E237A66006D36FD /* MyTableViewCell.m */; }; 32 | 18D63D781E238A74006D36FD /* Songs.plist in Resources */ = {isa = PBXBuildFile; fileRef = 18D63D771E238A74006D36FD /* Songs.plist */; }; 33 | 18D63D791E238A74006D36FD /* Songs.plist in Resources */ = {isa = PBXBuildFile; fileRef = 18D63D771E238A74006D36FD /* Songs.plist */; }; 34 | /* End PBXBuildFile section */ 35 | 36 | /* Begin PBXContainerItemProxy section */ 37 | 186E303F1E1CD8380096C6BF /* PBXContainerItemProxy */ = { 38 | isa = PBXContainerItemProxy; 39 | containerPortal = 186E301D1E1CD8380096C6BF /* Project object */; 40 | proxyType = 1; 41 | remoteGlobalIDString = 186E30241E1CD8380096C6BF; 42 | remoteInfo = ZFDropDownDemo; 43 | }; 44 | 186E304A1E1CD8380096C6BF /* PBXContainerItemProxy */ = { 45 | isa = PBXContainerItemProxy; 46 | containerPortal = 186E301D1E1CD8380096C6BF /* Project object */; 47 | proxyType = 1; 48 | remoteGlobalIDString = 186E30241E1CD8380096C6BF; 49 | remoteInfo = ZFDropDownDemo; 50 | }; 51 | /* End PBXContainerItemProxy section */ 52 | 53 | /* Begin PBXFileReference section */ 54 | 184B9B611E2B53F000B7AF3A /* ZFTapGestureRecognizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZFTapGestureRecognizer.h; sourceTree = ""; }; 55 | 184B9B621E2B53F000B7AF3A /* ZFTapGestureRecognizer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZFTapGestureRecognizer.m; sourceTree = ""; }; 56 | 186E30251E1CD8380096C6BF /* ZFDropDownDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ZFDropDownDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | 186E30291E1CD8380096C6BF /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 58 | 186E302B1E1CD8380096C6BF /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 59 | 186E302C1E1CD8380096C6BF /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 60 | 186E302E1E1CD8380096C6BF /* DefaultViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DefaultViewController.h; sourceTree = ""; }; 61 | 186E302F1E1CD8380096C6BF /* DefaultViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DefaultViewController.m; sourceTree = ""; }; 62 | 186E30321E1CD8380096C6BF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 63 | 186E30341E1CD8380096C6BF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 64 | 186E30371E1CD8380096C6BF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 65 | 186E30391E1CD8380096C6BF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 66 | 186E303E1E1CD8380096C6BF /* ZFDropDownDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ZFDropDownDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 67 | 186E30421E1CD8380096C6BF /* ZFDropDownDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZFDropDownDemoTests.m; sourceTree = ""; }; 68 | 186E30441E1CD8380096C6BF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 69 | 186E30491E1CD8380096C6BF /* ZFDropDownDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ZFDropDownDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 70 | 186E304D1E1CD8380096C6BF /* ZFDropDownDemoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZFDropDownDemoUITests.m; sourceTree = ""; }; 71 | 186E304F1E1CD8380096C6BF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 72 | 186E305E1E1CDAFE0096C6BF /* ZFDropDown.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZFDropDown.h; sourceTree = ""; }; 73 | 186E305F1E1CDAFE0096C6BF /* ZFDropDown.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZFDropDown.m; sourceTree = ""; }; 74 | 188AC1901E1DD352009CB282 /* ZFColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZFColor.h; path = ../ZFColor.h; sourceTree = ""; }; 75 | 188AC1911E1DE543009CB282 /* ZFConst.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZFConst.h; sourceTree = ""; }; 76 | 188AC1921E1DE543009CB282 /* ZFConst.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZFConst.m; sourceTree = ""; }; 77 | 188AC1961E1DF1E0009CB282 /* ZFView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZFView.h; path = ../Category/ZFView.h; sourceTree = ""; }; 78 | 188AC1971E1DF1E0009CB282 /* ZFView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ZFView.m; path = ../Category/ZFView.m; sourceTree = ""; }; 79 | 18C050CD1E278148007FD1D9 /* TableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableViewController.h; sourceTree = ""; }; 80 | 18C050CE1E278148007FD1D9 /* TableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TableViewController.m; sourceTree = ""; }; 81 | 18C050D11E27889D007FD1D9 /* CustomViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomViewController.h; sourceTree = ""; }; 82 | 18C050D21E27889D007FD1D9 /* CustomViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomViewController.m; sourceTree = ""; }; 83 | 18D63D731E237A66006D36FD /* MyTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyTableViewCell.h; sourceTree = ""; }; 84 | 18D63D741E237A66006D36FD /* MyTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyTableViewCell.m; sourceTree = ""; }; 85 | 18D63D771E238A74006D36FD /* Songs.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Songs.plist; sourceTree = ""; }; 86 | /* End PBXFileReference section */ 87 | 88 | /* Begin PBXFrameworksBuildPhase section */ 89 | 186E30221E1CD8380096C6BF /* Frameworks */ = { 90 | isa = PBXFrameworksBuildPhase; 91 | buildActionMask = 2147483647; 92 | files = ( 93 | ); 94 | runOnlyForDeploymentPostprocessing = 0; 95 | }; 96 | 186E303B1E1CD8380096C6BF /* Frameworks */ = { 97 | isa = PBXFrameworksBuildPhase; 98 | buildActionMask = 2147483647; 99 | files = ( 100 | ); 101 | runOnlyForDeploymentPostprocessing = 0; 102 | }; 103 | 186E30461E1CD8380096C6BF /* Frameworks */ = { 104 | isa = PBXFrameworksBuildPhase; 105 | buildActionMask = 2147483647; 106 | files = ( 107 | ); 108 | runOnlyForDeploymentPostprocessing = 0; 109 | }; 110 | /* End PBXFrameworksBuildPhase section */ 111 | 112 | /* Begin PBXGroup section */ 113 | 184B9B601E2B442C00B7AF3A /* Component */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 188AC1961E1DF1E0009CB282 /* ZFView.h */, 117 | 188AC1971E1DF1E0009CB282 /* ZFView.m */, 118 | 184B9B611E2B53F000B7AF3A /* ZFTapGestureRecognizer.h */, 119 | 184B9B621E2B53F000B7AF3A /* ZFTapGestureRecognizer.m */, 120 | ); 121 | path = Component; 122 | sourceTree = ""; 123 | }; 124 | 186E301C1E1CD8380096C6BF = { 125 | isa = PBXGroup; 126 | children = ( 127 | 186E30271E1CD8380096C6BF /* ZFDropDownDemo */, 128 | 186E30411E1CD8380096C6BF /* ZFDropDownDemoTests */, 129 | 186E304C1E1CD8380096C6BF /* ZFDropDownDemoUITests */, 130 | 186E30261E1CD8380096C6BF /* Products */, 131 | ); 132 | sourceTree = ""; 133 | }; 134 | 186E30261E1CD8380096C6BF /* Products */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | 186E30251E1CD8380096C6BF /* ZFDropDownDemo.app */, 138 | 186E303E1E1CD8380096C6BF /* ZFDropDownDemoTests.xctest */, 139 | 186E30491E1CD8380096C6BF /* ZFDropDownDemoUITests.xctest */, 140 | ); 141 | name = Products; 142 | sourceTree = ""; 143 | }; 144 | 186E30271E1CD8380096C6BF /* ZFDropDownDemo */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | 186E302B1E1CD8380096C6BF /* AppDelegate.h */, 148 | 186E302C1E1CD8380096C6BF /* AppDelegate.m */, 149 | 18C050CD1E278148007FD1D9 /* TableViewController.h */, 150 | 18C050CE1E278148007FD1D9 /* TableViewController.m */, 151 | 186E302E1E1CD8380096C6BF /* DefaultViewController.h */, 152 | 186E302F1E1CD8380096C6BF /* DefaultViewController.m */, 153 | 18C050D11E27889D007FD1D9 /* CustomViewController.h */, 154 | 18C050D21E27889D007FD1D9 /* CustomViewController.m */, 155 | 18D63D771E238A74006D36FD /* Songs.plist */, 156 | 18D63D721E237A08006D36FD /* CustomView */, 157 | 186E305B1E1CD8630096C6BF /* ZFDropDown */, 158 | 186E30311E1CD8380096C6BF /* Main.storyboard */, 159 | 186E30341E1CD8380096C6BF /* Assets.xcassets */, 160 | 186E30361E1CD8380096C6BF /* LaunchScreen.storyboard */, 161 | 186E30391E1CD8380096C6BF /* Info.plist */, 162 | 186E30281E1CD8380096C6BF /* Supporting Files */, 163 | ); 164 | path = ZFDropDownDemo; 165 | sourceTree = ""; 166 | }; 167 | 186E30281E1CD8380096C6BF /* Supporting Files */ = { 168 | isa = PBXGroup; 169 | children = ( 170 | 186E30291E1CD8380096C6BF /* main.m */, 171 | ); 172 | name = "Supporting Files"; 173 | sourceTree = ""; 174 | }; 175 | 186E30411E1CD8380096C6BF /* ZFDropDownDemoTests */ = { 176 | isa = PBXGroup; 177 | children = ( 178 | 186E30421E1CD8380096C6BF /* ZFDropDownDemoTests.m */, 179 | 186E30441E1CD8380096C6BF /* Info.plist */, 180 | ); 181 | path = ZFDropDownDemoTests; 182 | sourceTree = ""; 183 | }; 184 | 186E304C1E1CD8380096C6BF /* ZFDropDownDemoUITests */ = { 185 | isa = PBXGroup; 186 | children = ( 187 | 186E304D1E1CD8380096C6BF /* ZFDropDownDemoUITests.m */, 188 | 186E304F1E1CD8380096C6BF /* Info.plist */, 189 | ); 190 | path = ZFDropDownDemoUITests; 191 | sourceTree = ""; 192 | }; 193 | 186E305B1E1CD8630096C6BF /* ZFDropDown */ = { 194 | isa = PBXGroup; 195 | children = ( 196 | 186E305E1E1CDAFE0096C6BF /* ZFDropDown.h */, 197 | 186E305F1E1CDAFE0096C6BF /* ZFDropDown.m */, 198 | 184B9B601E2B442C00B7AF3A /* Component */, 199 | 186E305C1E1CD9250096C6BF /* Other */, 200 | ); 201 | path = ZFDropDown; 202 | sourceTree = ""; 203 | }; 204 | 186E305C1E1CD9250096C6BF /* Other */ = { 205 | isa = PBXGroup; 206 | children = ( 207 | 188AC1901E1DD352009CB282 /* ZFColor.h */, 208 | 188AC1911E1DE543009CB282 /* ZFConst.h */, 209 | 188AC1921E1DE543009CB282 /* ZFConst.m */, 210 | ); 211 | path = Other; 212 | sourceTree = ""; 213 | }; 214 | 18D63D721E237A08006D36FD /* CustomView */ = { 215 | isa = PBXGroup; 216 | children = ( 217 | 18D63D731E237A66006D36FD /* MyTableViewCell.h */, 218 | 18D63D741E237A66006D36FD /* MyTableViewCell.m */, 219 | ); 220 | path = CustomView; 221 | sourceTree = ""; 222 | }; 223 | /* End PBXGroup section */ 224 | 225 | /* Begin PBXNativeTarget section */ 226 | 186E30241E1CD8380096C6BF /* ZFDropDownDemo */ = { 227 | isa = PBXNativeTarget; 228 | buildConfigurationList = 186E30521E1CD8380096C6BF /* Build configuration list for PBXNativeTarget "ZFDropDownDemo" */; 229 | buildPhases = ( 230 | 186E30211E1CD8380096C6BF /* Sources */, 231 | 186E30221E1CD8380096C6BF /* Frameworks */, 232 | 186E30231E1CD8380096C6BF /* Resources */, 233 | ); 234 | buildRules = ( 235 | ); 236 | dependencies = ( 237 | ); 238 | name = ZFDropDownDemo; 239 | productName = ZFDropDownDemo; 240 | productReference = 186E30251E1CD8380096C6BF /* ZFDropDownDemo.app */; 241 | productType = "com.apple.product-type.application"; 242 | }; 243 | 186E303D1E1CD8380096C6BF /* ZFDropDownDemoTests */ = { 244 | isa = PBXNativeTarget; 245 | buildConfigurationList = 186E30551E1CD8380096C6BF /* Build configuration list for PBXNativeTarget "ZFDropDownDemoTests" */; 246 | buildPhases = ( 247 | 186E303A1E1CD8380096C6BF /* Sources */, 248 | 186E303B1E1CD8380096C6BF /* Frameworks */, 249 | 186E303C1E1CD8380096C6BF /* Resources */, 250 | ); 251 | buildRules = ( 252 | ); 253 | dependencies = ( 254 | 186E30401E1CD8380096C6BF /* PBXTargetDependency */, 255 | ); 256 | name = ZFDropDownDemoTests; 257 | productName = ZFDropDownDemoTests; 258 | productReference = 186E303E1E1CD8380096C6BF /* ZFDropDownDemoTests.xctest */; 259 | productType = "com.apple.product-type.bundle.unit-test"; 260 | }; 261 | 186E30481E1CD8380096C6BF /* ZFDropDownDemoUITests */ = { 262 | isa = PBXNativeTarget; 263 | buildConfigurationList = 186E30581E1CD8380096C6BF /* Build configuration list for PBXNativeTarget "ZFDropDownDemoUITests" */; 264 | buildPhases = ( 265 | 186E30451E1CD8380096C6BF /* Sources */, 266 | 186E30461E1CD8380096C6BF /* Frameworks */, 267 | 186E30471E1CD8380096C6BF /* Resources */, 268 | ); 269 | buildRules = ( 270 | ); 271 | dependencies = ( 272 | 186E304B1E1CD8380096C6BF /* PBXTargetDependency */, 273 | ); 274 | name = ZFDropDownDemoUITests; 275 | productName = ZFDropDownDemoUITests; 276 | productReference = 186E30491E1CD8380096C6BF /* ZFDropDownDemoUITests.xctest */; 277 | productType = "com.apple.product-type.bundle.ui-testing"; 278 | }; 279 | /* End PBXNativeTarget section */ 280 | 281 | /* Begin PBXProject section */ 282 | 186E301D1E1CD8380096C6BF /* Project object */ = { 283 | isa = PBXProject; 284 | attributes = { 285 | LastUpgradeCheck = 0810; 286 | ORGANIZATIONNAME = apple; 287 | TargetAttributes = { 288 | 186E30241E1CD8380096C6BF = { 289 | CreatedOnToolsVersion = 8.1; 290 | DevelopmentTeam = W6629ZPGR7; 291 | ProvisioningStyle = Automatic; 292 | }; 293 | 186E303D1E1CD8380096C6BF = { 294 | CreatedOnToolsVersion = 8.1; 295 | DevelopmentTeam = W6629ZPGR7; 296 | ProvisioningStyle = Automatic; 297 | TestTargetID = 186E30241E1CD8380096C6BF; 298 | }; 299 | 186E30481E1CD8380096C6BF = { 300 | CreatedOnToolsVersion = 8.1; 301 | DevelopmentTeam = W6629ZPGR7; 302 | ProvisioningStyle = Automatic; 303 | TestTargetID = 186E30241E1CD8380096C6BF; 304 | }; 305 | }; 306 | }; 307 | buildConfigurationList = 186E30201E1CD8380096C6BF /* Build configuration list for PBXProject "ZFDropDownDemo" */; 308 | compatibilityVersion = "Xcode 3.2"; 309 | developmentRegion = English; 310 | hasScannedForEncodings = 0; 311 | knownRegions = ( 312 | en, 313 | Base, 314 | ); 315 | mainGroup = 186E301C1E1CD8380096C6BF; 316 | productRefGroup = 186E30261E1CD8380096C6BF /* Products */; 317 | projectDirPath = ""; 318 | projectRoot = ""; 319 | targets = ( 320 | 186E30241E1CD8380096C6BF /* ZFDropDownDemo */, 321 | 186E303D1E1CD8380096C6BF /* ZFDropDownDemoTests */, 322 | 186E30481E1CD8380096C6BF /* ZFDropDownDemoUITests */, 323 | ); 324 | }; 325 | /* End PBXProject section */ 326 | 327 | /* Begin PBXResourcesBuildPhase section */ 328 | 186E30231E1CD8380096C6BF /* Resources */ = { 329 | isa = PBXResourcesBuildPhase; 330 | buildActionMask = 2147483647; 331 | files = ( 332 | 186E30381E1CD8380096C6BF /* LaunchScreen.storyboard in Resources */, 333 | 186E30351E1CD8380096C6BF /* Assets.xcassets in Resources */, 334 | 186E30331E1CD8380096C6BF /* Main.storyboard in Resources */, 335 | 18D63D781E238A74006D36FD /* Songs.plist in Resources */, 336 | ); 337 | runOnlyForDeploymentPostprocessing = 0; 338 | }; 339 | 186E303C1E1CD8380096C6BF /* Resources */ = { 340 | isa = PBXResourcesBuildPhase; 341 | buildActionMask = 2147483647; 342 | files = ( 343 | 18D63D791E238A74006D36FD /* Songs.plist in Resources */, 344 | ); 345 | runOnlyForDeploymentPostprocessing = 0; 346 | }; 347 | 186E30471E1CD8380096C6BF /* Resources */ = { 348 | isa = PBXResourcesBuildPhase; 349 | buildActionMask = 2147483647; 350 | files = ( 351 | ); 352 | runOnlyForDeploymentPostprocessing = 0; 353 | }; 354 | /* End PBXResourcesBuildPhase section */ 355 | 356 | /* Begin PBXSourcesBuildPhase section */ 357 | 186E30211E1CD8380096C6BF /* Sources */ = { 358 | isa = PBXSourcesBuildPhase; 359 | buildActionMask = 2147483647; 360 | files = ( 361 | 186E30601E1CDAFE0096C6BF /* ZFDropDown.m in Sources */, 362 | 18D63D751E237A66006D36FD /* MyTableViewCell.m in Sources */, 363 | 186E30301E1CD8380096C6BF /* DefaultViewController.m in Sources */, 364 | 188AC1981E1DF1E0009CB282 /* ZFView.m in Sources */, 365 | 18C050D31E27889D007FD1D9 /* CustomViewController.m in Sources */, 366 | 186E302D1E1CD8380096C6BF /* AppDelegate.m in Sources */, 367 | 188AC1931E1DE543009CB282 /* ZFConst.m in Sources */, 368 | 184B9B631E2B53F000B7AF3A /* ZFTapGestureRecognizer.m in Sources */, 369 | 186E302A1E1CD8380096C6BF /* main.m in Sources */, 370 | 18C050CF1E278148007FD1D9 /* TableViewController.m in Sources */, 371 | ); 372 | runOnlyForDeploymentPostprocessing = 0; 373 | }; 374 | 186E303A1E1CD8380096C6BF /* Sources */ = { 375 | isa = PBXSourcesBuildPhase; 376 | buildActionMask = 2147483647; 377 | files = ( 378 | 188AC1991E1DF1E0009CB282 /* ZFView.m in Sources */, 379 | 18C050D01E278148007FD1D9 /* TableViewController.m in Sources */, 380 | 18C050D41E27889D007FD1D9 /* CustomViewController.m in Sources */, 381 | 188AC1941E1DE543009CB282 /* ZFConst.m in Sources */, 382 | 186E30611E1CDAFE0096C6BF /* ZFDropDown.m in Sources */, 383 | 186E30431E1CD8380096C6BF /* ZFDropDownDemoTests.m in Sources */, 384 | 18D63D761E237A66006D36FD /* MyTableViewCell.m in Sources */, 385 | 184B9B641E2B53F000B7AF3A /* ZFTapGestureRecognizer.m in Sources */, 386 | ); 387 | runOnlyForDeploymentPostprocessing = 0; 388 | }; 389 | 186E30451E1CD8380096C6BF /* Sources */ = { 390 | isa = PBXSourcesBuildPhase; 391 | buildActionMask = 2147483647; 392 | files = ( 393 | 186E304E1E1CD8380096C6BF /* ZFDropDownDemoUITests.m in Sources */, 394 | ); 395 | runOnlyForDeploymentPostprocessing = 0; 396 | }; 397 | /* End PBXSourcesBuildPhase section */ 398 | 399 | /* Begin PBXTargetDependency section */ 400 | 186E30401E1CD8380096C6BF /* PBXTargetDependency */ = { 401 | isa = PBXTargetDependency; 402 | target = 186E30241E1CD8380096C6BF /* ZFDropDownDemo */; 403 | targetProxy = 186E303F1E1CD8380096C6BF /* PBXContainerItemProxy */; 404 | }; 405 | 186E304B1E1CD8380096C6BF /* PBXTargetDependency */ = { 406 | isa = PBXTargetDependency; 407 | target = 186E30241E1CD8380096C6BF /* ZFDropDownDemo */; 408 | targetProxy = 186E304A1E1CD8380096C6BF /* PBXContainerItemProxy */; 409 | }; 410 | /* End PBXTargetDependency section */ 411 | 412 | /* Begin PBXVariantGroup section */ 413 | 186E30311E1CD8380096C6BF /* Main.storyboard */ = { 414 | isa = PBXVariantGroup; 415 | children = ( 416 | 186E30321E1CD8380096C6BF /* Base */, 417 | ); 418 | name = Main.storyboard; 419 | sourceTree = ""; 420 | }; 421 | 186E30361E1CD8380096C6BF /* LaunchScreen.storyboard */ = { 422 | isa = PBXVariantGroup; 423 | children = ( 424 | 186E30371E1CD8380096C6BF /* Base */, 425 | ); 426 | name = LaunchScreen.storyboard; 427 | sourceTree = ""; 428 | }; 429 | /* End PBXVariantGroup section */ 430 | 431 | /* Begin XCBuildConfiguration section */ 432 | 186E30501E1CD8380096C6BF /* Debug */ = { 433 | isa = XCBuildConfiguration; 434 | buildSettings = { 435 | ALWAYS_SEARCH_USER_PATHS = NO; 436 | CLANG_ANALYZER_NONNULL = YES; 437 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 438 | CLANG_CXX_LIBRARY = "libc++"; 439 | CLANG_ENABLE_MODULES = YES; 440 | CLANG_ENABLE_OBJC_ARC = YES; 441 | CLANG_WARN_BOOL_CONVERSION = YES; 442 | CLANG_WARN_CONSTANT_CONVERSION = YES; 443 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 444 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 445 | CLANG_WARN_EMPTY_BODY = YES; 446 | CLANG_WARN_ENUM_CONVERSION = YES; 447 | CLANG_WARN_INFINITE_RECURSION = YES; 448 | CLANG_WARN_INT_CONVERSION = YES; 449 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 450 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 451 | CLANG_WARN_UNREACHABLE_CODE = YES; 452 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 453 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 454 | COPY_PHASE_STRIP = NO; 455 | DEBUG_INFORMATION_FORMAT = dwarf; 456 | ENABLE_STRICT_OBJC_MSGSEND = YES; 457 | ENABLE_TESTABILITY = YES; 458 | GCC_C_LANGUAGE_STANDARD = gnu99; 459 | GCC_DYNAMIC_NO_PIC = NO; 460 | GCC_NO_COMMON_BLOCKS = YES; 461 | GCC_OPTIMIZATION_LEVEL = 0; 462 | GCC_PREPROCESSOR_DEFINITIONS = ( 463 | "DEBUG=1", 464 | "$(inherited)", 465 | ); 466 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 467 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 468 | GCC_WARN_UNDECLARED_SELECTOR = YES; 469 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 470 | GCC_WARN_UNUSED_FUNCTION = YES; 471 | GCC_WARN_UNUSED_VARIABLE = YES; 472 | IPHONEOS_DEPLOYMENT_TARGET = 10.1; 473 | MTL_ENABLE_DEBUG_INFO = YES; 474 | ONLY_ACTIVE_ARCH = YES; 475 | SDKROOT = iphoneos; 476 | TARGETED_DEVICE_FAMILY = "1,2"; 477 | }; 478 | name = Debug; 479 | }; 480 | 186E30511E1CD8380096C6BF /* Release */ = { 481 | isa = XCBuildConfiguration; 482 | buildSettings = { 483 | ALWAYS_SEARCH_USER_PATHS = NO; 484 | CLANG_ANALYZER_NONNULL = YES; 485 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 486 | CLANG_CXX_LIBRARY = "libc++"; 487 | CLANG_ENABLE_MODULES = YES; 488 | CLANG_ENABLE_OBJC_ARC = YES; 489 | CLANG_WARN_BOOL_CONVERSION = YES; 490 | CLANG_WARN_CONSTANT_CONVERSION = YES; 491 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 492 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 493 | CLANG_WARN_EMPTY_BODY = YES; 494 | CLANG_WARN_ENUM_CONVERSION = YES; 495 | CLANG_WARN_INFINITE_RECURSION = YES; 496 | CLANG_WARN_INT_CONVERSION = YES; 497 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 498 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 499 | CLANG_WARN_UNREACHABLE_CODE = YES; 500 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 501 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 502 | COPY_PHASE_STRIP = NO; 503 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 504 | ENABLE_NS_ASSERTIONS = NO; 505 | ENABLE_STRICT_OBJC_MSGSEND = YES; 506 | GCC_C_LANGUAGE_STANDARD = gnu99; 507 | GCC_NO_COMMON_BLOCKS = YES; 508 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 509 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 510 | GCC_WARN_UNDECLARED_SELECTOR = YES; 511 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 512 | GCC_WARN_UNUSED_FUNCTION = YES; 513 | GCC_WARN_UNUSED_VARIABLE = YES; 514 | IPHONEOS_DEPLOYMENT_TARGET = 10.1; 515 | MTL_ENABLE_DEBUG_INFO = NO; 516 | SDKROOT = iphoneos; 517 | TARGETED_DEVICE_FAMILY = "1,2"; 518 | VALIDATE_PRODUCT = YES; 519 | }; 520 | name = Release; 521 | }; 522 | 186E30531E1CD8380096C6BF /* Debug */ = { 523 | isa = XCBuildConfiguration; 524 | buildSettings = { 525 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 526 | DEVELOPMENT_TEAM = W6629ZPGR7; 527 | INFOPLIST_FILE = ZFDropDownDemo/Info.plist; 528 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 529 | PRODUCT_BUNDLE_IDENTIFIER = Zirkfied.ZFDropDownDemo; 530 | PRODUCT_NAME = "$(TARGET_NAME)"; 531 | }; 532 | name = Debug; 533 | }; 534 | 186E30541E1CD8380096C6BF /* Release */ = { 535 | isa = XCBuildConfiguration; 536 | buildSettings = { 537 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 538 | DEVELOPMENT_TEAM = W6629ZPGR7; 539 | INFOPLIST_FILE = ZFDropDownDemo/Info.plist; 540 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 541 | PRODUCT_BUNDLE_IDENTIFIER = Zirkfied.ZFDropDownDemo; 542 | PRODUCT_NAME = "$(TARGET_NAME)"; 543 | }; 544 | name = Release; 545 | }; 546 | 186E30561E1CD8380096C6BF /* Debug */ = { 547 | isa = XCBuildConfiguration; 548 | buildSettings = { 549 | BUNDLE_LOADER = "$(TEST_HOST)"; 550 | DEVELOPMENT_TEAM = W6629ZPGR7; 551 | INFOPLIST_FILE = ZFDropDownDemoTests/Info.plist; 552 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 553 | PRODUCT_BUNDLE_IDENTIFIER = Zirkfied.ZFDropDownDemoTests; 554 | PRODUCT_NAME = "$(TARGET_NAME)"; 555 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ZFDropDownDemo.app/ZFDropDownDemo"; 556 | }; 557 | name = Debug; 558 | }; 559 | 186E30571E1CD8380096C6BF /* Release */ = { 560 | isa = XCBuildConfiguration; 561 | buildSettings = { 562 | BUNDLE_LOADER = "$(TEST_HOST)"; 563 | DEVELOPMENT_TEAM = W6629ZPGR7; 564 | INFOPLIST_FILE = ZFDropDownDemoTests/Info.plist; 565 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 566 | PRODUCT_BUNDLE_IDENTIFIER = Zirkfied.ZFDropDownDemoTests; 567 | PRODUCT_NAME = "$(TARGET_NAME)"; 568 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ZFDropDownDemo.app/ZFDropDownDemo"; 569 | }; 570 | name = Release; 571 | }; 572 | 186E30591E1CD8380096C6BF /* Debug */ = { 573 | isa = XCBuildConfiguration; 574 | buildSettings = { 575 | DEVELOPMENT_TEAM = W6629ZPGR7; 576 | INFOPLIST_FILE = ZFDropDownDemoUITests/Info.plist; 577 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 578 | PRODUCT_BUNDLE_IDENTIFIER = Zirkfied.ZFDropDownDemoUITests; 579 | PRODUCT_NAME = "$(TARGET_NAME)"; 580 | TEST_TARGET_NAME = ZFDropDownDemo; 581 | }; 582 | name = Debug; 583 | }; 584 | 186E305A1E1CD8380096C6BF /* Release */ = { 585 | isa = XCBuildConfiguration; 586 | buildSettings = { 587 | DEVELOPMENT_TEAM = W6629ZPGR7; 588 | INFOPLIST_FILE = ZFDropDownDemoUITests/Info.plist; 589 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 590 | PRODUCT_BUNDLE_IDENTIFIER = Zirkfied.ZFDropDownDemoUITests; 591 | PRODUCT_NAME = "$(TARGET_NAME)"; 592 | TEST_TARGET_NAME = ZFDropDownDemo; 593 | }; 594 | name = Release; 595 | }; 596 | /* End XCBuildConfiguration section */ 597 | 598 | /* Begin XCConfigurationList section */ 599 | 186E30201E1CD8380096C6BF /* Build configuration list for PBXProject "ZFDropDownDemo" */ = { 600 | isa = XCConfigurationList; 601 | buildConfigurations = ( 602 | 186E30501E1CD8380096C6BF /* Debug */, 603 | 186E30511E1CD8380096C6BF /* Release */, 604 | ); 605 | defaultConfigurationIsVisible = 0; 606 | defaultConfigurationName = Release; 607 | }; 608 | 186E30521E1CD8380096C6BF /* Build configuration list for PBXNativeTarget "ZFDropDownDemo" */ = { 609 | isa = XCConfigurationList; 610 | buildConfigurations = ( 611 | 186E30531E1CD8380096C6BF /* Debug */, 612 | 186E30541E1CD8380096C6BF /* Release */, 613 | ); 614 | defaultConfigurationIsVisible = 0; 615 | defaultConfigurationName = Release; 616 | }; 617 | 186E30551E1CD8380096C6BF /* Build configuration list for PBXNativeTarget "ZFDropDownDemoTests" */ = { 618 | isa = XCConfigurationList; 619 | buildConfigurations = ( 620 | 186E30561E1CD8380096C6BF /* Debug */, 621 | 186E30571E1CD8380096C6BF /* Release */, 622 | ); 623 | defaultConfigurationIsVisible = 0; 624 | defaultConfigurationName = Release; 625 | }; 626 | 186E30581E1CD8380096C6BF /* Build configuration list for PBXNativeTarget "ZFDropDownDemoUITests" */ = { 627 | isa = XCConfigurationList; 628 | buildConfigurations = ( 629 | 186E30591E1CD8380096C6BF /* Debug */, 630 | 186E305A1E1CD8380096C6BF /* Release */, 631 | ); 632 | defaultConfigurationIsVisible = 0; 633 | defaultConfigurationName = Release; 634 | }; 635 | /* End XCConfigurationList section */ 636 | }; 637 | rootObject = 186E301D1E1CD8380096C6BF /* Project object */; 638 | } 639 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // ZFDropDownDemo 4 | // 5 | // Created by apple on 2017/1/4. 6 | // Copyright © 2017年 apple. 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 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // ZFDropDownDemo 4 | // 5 | // Created by apple on 2017/1/4. 6 | // Copyright © 2017年 apple. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | 20 | 21 | 22 | return YES; 23 | } 24 | 25 | 26 | - (void)applicationWillResignActive:(UIApplication *)application { 27 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 28 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 29 | } 30 | 31 | 32 | - (void)applicationDidEnterBackground:(UIApplication *)application { 33 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 34 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 35 | } 36 | 37 | 38 | - (void)applicationWillEnterForeground:(UIApplication *)application { 39 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 40 | } 41 | 42 | 43 | - (void)applicationDidBecomeActive:(UIApplication *)application { 44 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 45 | } 46 | 47 | 48 | - (void)applicationWillTerminate:(UIApplication *)application { 49 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 50 | } 51 | 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/Animals.imageset/Animals@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zirkfied/ZFDropDown/a4a54329fd6fb83f57da3e59e5349ebdbb6b6506/ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/Animals.imageset/Animals@2x.png -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/Animals.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Animals@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/Faded.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Faded@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/Faded.imageset/Faded@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zirkfied/ZFDropDown/a4a54329fd6fb83f57da3e59e5349ebdbb6b6506/ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/Faded.imageset/Faded@2x.png -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/I'll Be Fine.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "I'll Be Fine@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/I'll Be Fine.imageset/I'll Be Fine@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zirkfied/ZFDropDown/a4a54329fd6fb83f57da3e59e5349ebdbb6b6506/ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/I'll Be Fine.imageset/I'll Be Fine@2x.png -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/Maps.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Maps@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/Maps.imageset/Maps@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zirkfied/ZFDropDown/a4a54329fd6fb83f57da3e59e5349ebdbb6b6506/ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/Maps.imageset/Maps@2x.png -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/See you again.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "See you again@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/See you again.imageset/See you again@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zirkfied/ZFDropDown/a4a54329fd6fb83f57da3e59e5349ebdbb6b6506/ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/See you again.imageset/See you again@2x.png -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/Soldier.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Soldier@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/Soldier.imageset/Soldier@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zirkfied/ZFDropDown/a4a54329fd6fb83f57da3e59e5349ebdbb6b6506/ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/Soldier.imageset/Soldier@2x.png -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/The Lazy Song.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "The Lazy Song@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/The Lazy Song.imageset/The Lazy Song@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zirkfied/ZFDropDown/a4a54329fd6fb83f57da3e59e5349ebdbb6b6506/ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/The Lazy Song.imageset/The Lazy Song@2x.png -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/The Phoenix.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "The Phoenix@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/The Phoenix.imageset/The Phoenix@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zirkfied/ZFDropDown/a4a54329fd6fb83f57da3e59e5349ebdbb6b6506/ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/The Phoenix.imageset/The Phoenix@2x.png -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/Untied State Of Pop 2014.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Untied State Of Pop 2014@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/Untied State Of Pop 2014.imageset/Untied State Of Pop 2014@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zirkfied/ZFDropDown/a4a54329fd6fb83f57da3e59e5349ebdbb6b6506/ZFDropDownDemo/ZFDropDownDemo/Assets.xcassets/Untied State Of Pop 2014.imageset/Untied State Of Pop 2014@2x.png -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/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 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/CustomView/MyTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // MyTableViewCell.h 3 | // ZFDropDownDemo 4 | // 5 | // Created by apple on 2017/1/9. 6 | // Copyright © 2017年 apple. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MyTableViewCell : UITableViewCell 12 | 13 | @property (nonatomic, strong) UIImageView * imgView; 14 | @property (nonatomic, strong) UILabel * txtLabel; 15 | @property (nonatomic, strong) UILabel * subTxtLabel; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/CustomView/MyTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // MyTableViewCell.m 3 | // ZFDropDownDemo 4 | // 5 | // Created by apple on 2017/1/9. 6 | // Copyright © 2017年 apple. All rights reserved. 7 | // 8 | 9 | #import "MyTableViewCell.h" 10 | #import "ZFColor.h" 11 | 12 | @implementation MyTableViewCell 13 | 14 | - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ 15 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 16 | if (self) { 17 | [self setUp]; 18 | } 19 | return self; 20 | } 21 | 22 | - (void)setUp{ 23 | self.imgView = [[UIImageView alloc] initWithFrame:CGRectMake(5, 5, 34, 34)]; 24 | [self.contentView addSubview:self.imgView]; 25 | 26 | self.txtLabel = [[UILabel alloc] initWithFrame:CGRectMake(44, 5, 146, 34)]; 27 | self.txtLabel.numberOfLines = 0; 28 | self.txtLabel.textColor = ZFSystemBlue; 29 | self.txtLabel.font = [UIFont systemFontOfSize:14.f]; 30 | [self.contentView addSubview:self.txtLabel]; 31 | 32 | self.subTxtLabel = [[UILabel alloc] initWithFrame:CGRectMake(200, 5, 100, 34)]; 33 | self.subTxtLabel.numberOfLines = 0; 34 | self.subTxtLabel.textColor = ZFLightGray; 35 | self.subTxtLabel.font = [UIFont systemFontOfSize:13.f]; 36 | [self.contentView addSubview:self.subTxtLabel]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/CustomViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CustomViewController.h 3 | // ZFDropDownDemo 4 | // 5 | // Created by apple on 2017/1/12. 6 | // Copyright © 2017年 apple. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CustomViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/CustomViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CustomViewController.m 3 | // ZFDropDownDemo 4 | // 5 | // Created by apple on 2017/1/12. 6 | // Copyright © 2017年 apple. All rights reserved. 7 | // 8 | 9 | #import "CustomViewController.h" 10 | #import "ZFDropDown.h" 11 | #import "MyTableViewCell.h" 12 | 13 | @interface CustomViewController () 14 | 15 | @property (nonatomic, strong) NSArray * dataSource; 16 | 17 | @property (nonatomic, strong) ZFDropDown * dropDown; 18 | @property (nonatomic, strong) ZFTapGestureRecognizer * tap; 19 | @property (nonatomic, strong) UIView * backgroundView; 20 | @property (nonatomic, strong) UIImageView * imageView; 21 | @property (nonatomic, strong) UIButton * button; 22 | @property (nonatomic, strong) UILabel * label; 23 | 24 | @end 25 | 26 | @implementation CustomViewController 27 | 28 | - (NSArray *)dataSource{ 29 | if (!_dataSource) { 30 | NSString * path = [[NSBundle mainBundle] pathForResource:@"Songs" ofType:@"plist"]; 31 | _dataSource = [NSArray arrayWithContentsOfFile:path]; 32 | } 33 | 34 | return _dataSource; 35 | } 36 | 37 | - (void)viewDidLoad { 38 | [super viewDidLoad]; 39 | 40 | self.view.backgroundColor = ZFWhite; 41 | 42 | CGFloat width = 300; 43 | CGFloat height = 40; 44 | CGFloat xPos = (SCREEN_WIDTH - width) / 2; 45 | CGFloat yPos = 100; 46 | 47 | self.dropDown = [[ZFDropDown alloc] initWithFrame:CGRectMake(xPos, yPos, width, height) pattern:kDropDownPatternCustom]; 48 | self.dropDown.delegate = self; 49 | self.dropDown.borderStyle = kDropDownTopicBorderStyleRect; 50 | [self.view addSubview:self.dropDown]; 51 | 52 | self.tap = [[ZFTapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAction)]; 53 | [self.view addGestureRecognizer:self.tap]; 54 | } 55 | 56 | /** 57 | * self.view添加手势取消dropDown第一响应 58 | */ 59 | - (void)tapAction{ 60 | [self.dropDown resignDropDownResponder]; 61 | } 62 | 63 | #pragma mark - ZFDropDownDelegate 64 | 65 | - (NSArray *)itemArrayInDropDown:(ZFDropDown *)dropDown{ 66 | return self.dataSource; 67 | } 68 | 69 | - (UIView *)viewForTopicInDropDown:(ZFDropDown *)dropDown{ 70 | self.backgroundView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 300, 40)]; 71 | 72 | self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(5, 5, 30, 30)]; 73 | self.imageView.image = [UIImage imageNamed:@""]; 74 | self.imageView.backgroundColor = ZFFicelle; 75 | [self.backgroundView addSubview:self.imageView]; 76 | 77 | self.button = [UIButton buttonWithType:UIButtonTypeSystem]; 78 | self.button.frame = CGRectMake(40, 5, 255, 30); 79 | [self.button setTitle:@"Please choose 1 song" forState:UIControlStateNormal]; 80 | [self.button setTitleColor:ZFSystemBlue forState:UIControlStateNormal]; 81 | self.button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft; 82 | //注意这里的target是dropDown, 不是self 83 | [self.button addTarget:dropDown action:@selector(show) forControlEvents:UIControlEventTouchUpInside]; 84 | [self.backgroundView addSubview:self.button]; 85 | 86 | return self.backgroundView; 87 | } 88 | 89 | - (UITableViewCell *)dropDown:(ZFDropDown *)dropDown tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 90 | static NSString * cellIndentifier = @"MyTableViewCell"; 91 | MyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:cellIndentifier]; 92 | 93 | if (!cell) { 94 | cell = [[MyTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIndentifier]; 95 | } 96 | 97 | NSDictionary * dict = self.dataSource[indexPath.row]; 98 | cell.imgView.image = [UIImage imageNamed:dict[@"cover"]]; 99 | cell.txtLabel.text = dict[@"title"]; 100 | cell.subTxtLabel.text = dict[@"singer"]; 101 | cell.backgroundColor = ZFTaupe3; 102 | return cell; 103 | } 104 | 105 | //- (CGFloat)dropDown:(ZFDropDown *)dropDown heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 106 | // return 100.f; 107 | //} 108 | 109 | - (void)dropDown:(ZFDropDown *)dropDown didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 110 | NSDictionary * dict = self.dataSource[indexPath.row]; 111 | self.imageView.image = [UIImage imageNamed:dict[@"cover"]]; 112 | [self.button setTitle:dict[@"title"] forState:UIControlStateNormal]; 113 | } 114 | 115 | //- (NSUInteger)numberOfRowsToDisplayIndropDown:(ZFDropDown *)dropDown itemArrayCount:(NSUInteger)count{ 116 | // return 4; 117 | //} 118 | 119 | @end 120 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/DefaultViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DefaultViewController.h 3 | // ZFDropDownDemo 4 | // 5 | // Created by apple on 2017/1/4. 6 | // Copyright © 2017年 apple. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DefaultViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/DefaultViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // ZFDropDownDemo 4 | // 5 | // Created by apple on 2017/1/4. 6 | // Copyright © 2017年 apple. All rights reserved. 7 | // 8 | 9 | #import "DefaultViewController.h" 10 | #import "ZFDropDown.h" 11 | 12 | @interface DefaultViewController () 13 | 14 | @property (nonatomic, strong) ZFDropDown * dropDown; 15 | @property (nonatomic, strong) ZFDropDown * dropDown2; 16 | @property (nonatomic, strong) ZFTapGestureRecognizer * tap; 17 | 18 | @end 19 | 20 | @implementation DefaultViewController 21 | 22 | - (void)viewDidLoad { 23 | [super viewDidLoad]; 24 | 25 | self.view.backgroundColor = ZFWhite; 26 | 27 | CGFloat width = 300; 28 | CGFloat height = 40; 29 | CGFloat xPos = (SCREEN_WIDTH - width) / 2; 30 | CGFloat yPos = NAVIGATIONBAR_HEIGHT + 10; 31 | 32 | self.dropDown = [[ZFDropDown alloc] initWithFrame:CGRectMake(xPos, yPos, width, height) pattern:kDropDownPatternDefault]; 33 | self.dropDown.delegate = self; 34 | [self.dropDown.topicButton setTitle:@"Please choose 1 continent / area" forState:UIControlStateNormal]; 35 | self.dropDown.topicButton.titleLabel.font = [UIFont systemFontOfSize:17.f]; 36 | self.dropDown.cornerRadius = 10.f; 37 | [self.view addSubview:self.dropDown]; 38 | 39 | 40 | self.dropDown2 = [[ZFDropDown alloc] initWithFrame:CGRectMake(xPos, yPos + 350, width, height) pattern:kDropDownPatternDefault]; 41 | self.dropDown2.delegate = self; 42 | [self.dropDown2.topicButton setTitle:@"Please choose 1 subject" forState:UIControlStateNormal]; 43 | self.dropDown2.topicButton.titleLabel.font = [UIFont systemFontOfSize:17.f]; 44 | self.dropDown2.borderStyle = kDropDownTopicBorderStyleSingleLine; 45 | self.dropDown2.separatorStyle = UITableViewCellSeparatorStyleSingleLine; 46 | self.dropDown2.cellTextFont = [UIFont boldSystemFontOfSize:20.f]; 47 | self.dropDown2.orientation = kDropDownOrientationUp; 48 | // self.dropDown2.topicButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter; 49 | [self.view addSubview:self.dropDown2]; 50 | 51 | 52 | self.tap = [[ZFTapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAction)]; 53 | [self.view addGestureRecognizer:self.tap]; 54 | } 55 | 56 | /** 57 | * self.view添加手势取消dropDown第一响应 58 | */ 59 | - (void)tapAction{ 60 | [self.dropDown resignDropDownResponder]; 61 | [self.dropDown2 resignDropDownResponder]; 62 | } 63 | 64 | #pragma mark - ZFDropDownDelegate 65 | 66 | - (NSArray *)itemArrayInDropDown:(ZFDropDown *)dropDown{ 67 | if (dropDown == self.dropDown) { 68 | return @[@"Asia", @"Europe", @"Africa", @"Oceania", @"North America", @"South America", @"Antarctica", @"Arctic"]; 69 | } 70 | 71 | return @[@"Chinese", @"Math", @"English", @"Politics", @"Physics", @"Chemistry", @"Geography", @"History", @"Biology", @"Philosophy"]; 72 | } 73 | 74 | - (NSUInteger)numberOfRowsToDisplayIndropDown:(ZFDropDown *)dropDown itemArrayCount:(NSUInteger)count{ 75 | if (dropDown == self.dropDown) { 76 | return 5; 77 | } 78 | 79 | return 6; 80 | } 81 | 82 | @end 83 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/Songs.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | cover 7 | Animals 8 | title 9 | Animals 10 | singer 11 | Maroon 5 12 | 13 | 14 | cover 15 | Faded 16 | title 17 | Faded 18 | singer 19 | N2V&Conor Maynard Remix 20 | 21 | 22 | cover 23 | I'll Be Fine 24 | title 25 | I'll Be Fine 26 | singer 27 | Stevie Hoang 28 | 29 | 30 | cover 31 | Maps 32 | title 33 | Maps 34 | singer 35 | Maroon 5 36 | 37 | 38 | cover 39 | The Lazy Song 40 | title 41 | The Lazy Song 42 | singer 43 | Bruno Mars 44 | 45 | 46 | cover 47 | The Phoenix 48 | title 49 | The Phoenix 50 | singer 51 | Fall Out Boy 52 | 53 | 54 | cover 55 | See you again 56 | title 57 | See you again 58 | singer 59 | Wiz Khalifa 60 | 61 | 62 | cover 63 | Soldier 64 | title 65 | Soldier 66 | singer 67 | Gareth Emery 68 | 69 | 70 | cover 71 | Untied State Of Pop 2014 72 | title 73 | Untied State Of Pop 2014 74 | singer 75 | DJ Earworm 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/TableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TableViewController.h 3 | // ZFDropDownDemo 4 | // 5 | // Created by apple on 2017/1/12. 6 | // Copyright © 2017年 apple. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TableViewController : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/TableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TableViewController.m 3 | // ZFDropDownDemo 4 | // 5 | // Created by apple on 2017/1/12. 6 | // Copyright © 2017年 apple. All rights reserved. 7 | // 8 | 9 | #import "TableViewController.h" 10 | #import "DefaultViewController.h" 11 | #import "CustomViewController.h" 12 | 13 | @interface TableViewController () 14 | 15 | @property (nonatomic, strong) NSArray * dataSource; 16 | @property (nonatomic, strong) NSArray * viewControllerArray; 17 | 18 | @end 19 | 20 | @implementation TableViewController 21 | 22 | - (void)viewDidLoad { 23 | [super viewDidLoad]; 24 | 25 | self.dataSource = @[@"Default", @"Custom"]; 26 | 27 | self.viewControllerArray = @[@"DefaultViewController", @"CustomViewController"]; 28 | } 29 | 30 | #pragma mark - UITableViewDataSource 31 | 32 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 33 | return self.dataSource.count; 34 | } 35 | 36 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 37 | static NSString * cellIndentifier = @"cellIndentifier"; 38 | UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:cellIndentifier]; 39 | 40 | if (!cell) { 41 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIndentifier]; 42 | } 43 | 44 | cell.textLabel.text = self.dataSource[indexPath.row]; 45 | 46 | return cell; 47 | } 48 | 49 | #pragma mark - UITableViewDelegate 50 | 51 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 52 | [self.navigationController pushViewController:[[NSClassFromString(self.viewControllerArray[indexPath.row]) alloc] init] animated:YES]; 53 | } 54 | 55 | /* 56 | #pragma mark - Navigation 57 | 58 | // In a storyboard-based application, you will often want to do a little preparation before navigation 59 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 60 | // Get the new view controller using [segue destinationViewController]. 61 | // Pass the selected object to the new view controller. 62 | } 63 | */ 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/ZFDropDown/Category/ZFView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZFView.h 3 | // ZFDropDownDemo 4 | // 5 | // Created by apple on 2017/1/5. 6 | // Copyright © 2017年 apple. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ZFView : UIView 12 | 13 | /** 点击状态 */ 14 | @property (nonatomic, assign) BOOL isSelected; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/ZFDropDown/Category/ZFView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZFTopicLabel.m 3 | // ZFDropDownDemo 4 | // 5 | // Created by apple on 2017/1/5. 6 | // Copyright © 2017年 apple. All rights reserved. 7 | // 8 | 9 | #import "ZFView.h" 10 | 11 | @implementation ZFView 12 | 13 | /* 14 | // Only override drawRect: if you perform custom drawing. 15 | // An empty implementation adversely affects performance during animation. 16 | - (void)drawRect:(CGRect)rect { 17 | // Drawing code 18 | } 19 | */ 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/ZFDropDown/Component/ZFTapGestureRecognizer.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZFTapGestureRecognizer.h 3 | // ZFDropDownDemo 4 | // 5 | // Created by apple on 2017/1/15. 6 | // Copyright © 2017年 apple. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ZFTapGestureRecognizer : UITapGestureRecognizer 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/ZFDropDown/Component/ZFTapGestureRecognizer.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZFTapGestureRecognizer.m 3 | // ZFDropDownDemo 4 | // 5 | // Created by apple on 2017/1/15. 6 | // Copyright © 2017年 apple. All rights reserved. 7 | // 8 | 9 | #import "ZFTapGestureRecognizer.h" 10 | 11 | @implementation ZFTapGestureRecognizer 12 | 13 | - (instancetype)initWithTarget:(id)target action:(SEL)action{ 14 | self = [super initWithTarget:target action:action]; 15 | if (self) { 16 | self.delegate = self; 17 | } 18 | return self; 19 | } 20 | 21 | #pragma mark - UIGestureRecognizerDelegate 22 | 23 | /** 24 | * 重写手势代理方法(添加了手势导致tableView的didSelectRowAtIndexPath方法失效) 25 | */ 26 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{ 27 | 28 | if ([NSStringFromClass([touch.view class]) isEqualToString:@"UITableViewCellContentView"]) { 29 | return NO; 30 | } 31 | return YES; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/ZFDropDown/Other/ZFConst.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZFConst.h 3 | // ZFDropDownDemo 4 | // 5 | // Created by apple on 2017/1/5. 6 | // Copyright © 2017年 apple. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "ZFColor.h" 12 | #import "ZFTapGestureRecognizer.h" 13 | 14 | #define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width 15 | #define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height 16 | 17 | /** 18 | * 导航栏高度 19 | */ 20 | extern CGFloat const NAVIGATIONBAR_HEIGHT; 21 | 22 | /** 23 | * tabBar高度 24 | */ 25 | extern CGFloat const TABBAR_HEIGHT; 26 | 27 | @interface ZFConst : NSObject 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/ZFDropDown/Other/ZFConst.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZFConst.m 3 | // ZFDropDownDemo 4 | // 5 | // Created by apple on 2017/1/5. 6 | // Copyright © 2017年 apple. All rights reserved. 7 | // 8 | 9 | #import "ZFConst.h" 10 | 11 | CGFloat const NAVIGATIONBAR_HEIGHT = 64.f; 12 | CGFloat const TABBAR_HEIGHT = 49.f; 13 | 14 | @implementation ZFConst 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/ZFDropDown/ZFColor.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 直接填写小数 3 | */ 4 | #define ZFDecimalColor(r, g, b, a) [UIColor colorWithRed:r green:g blue:b alpha:a] 5 | 6 | /** 7 | * 直接填写整数 8 | */ 9 | #define ZFColor(r, g, b, a) [UIColor colorWithRed:r / 255.f green:g / 255.f blue:b / 255.f alpha:a] 10 | 11 | /** 12 | * 随机颜色 13 | */ 14 | #define ZFRandom ZFColor(arc4random() % 256, arc4random() % 256, arc4random() % 256, 1) 15 | 16 | #define ZFBlack [UIColor blackColor] 17 | #define ZFDarkGray [UIColor darkGrayColor] 18 | #define ZFLightGray [UIColor lightGrayColor] 19 | #define ZFWhite [UIColor whiteColor] 20 | #define ZFGray [UIColor grayColor] 21 | #define ZFRed [UIColor redColor] 22 | #define ZFGreen [UIColor greenColor] 23 | #define ZFBlue [UIColor blueColor] 24 | #define ZFCyan [UIColor cyanColor] 25 | #define ZFYellow [UIColor yellowColor] 26 | #define ZFMagenta [UIColor magentaColor] 27 | #define ZFOrange [UIColor orangeColor] 28 | #define ZFPurple [UIColor purpleColor] 29 | #define ZFBrown [UIColor brownColor] 30 | #define ZFClear [UIColor clearColor] 31 | #define ZFSkyBlue ZFDecimalColor(0, 0.68, 1, 1) 32 | #define ZFLightBlue ZFColor(125, 231, 255, 1) 33 | #define ZFSystemBlue ZFColor(10, 96, 254, 1) 34 | #define ZFFicelle ZFColor(247, 247, 247, 1) 35 | #define ZFTaupe ZFColor(238, 239, 241, 1) 36 | #define ZFTaupe2 ZFColor(237, 236, 236, 1) 37 | #define ZFTaupe3 ZFColor(236, 236, 236, 1) 38 | #define ZFGrassGreen ZFColor(254, 200, 122, 1) 39 | #define ZFGold ZFColor(255, 215, 0, 1) 40 | #define ZFDeepPink ZFColor(238, 18, 137, 1) 41 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/ZFDropDown/ZFDropDown.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZFDropDown.h 3 | // ZFDropDownDemo 4 | // 5 | // Created by apple on 2017/1/4. 6 | // Copyright © 2017年 apple. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ZFConst.h" 11 | @class ZFDropDown; 12 | @class ZFTopicContainerView; 13 | 14 | @protocol ZFDropDownDelegate 15 | 16 | @required 17 | 18 | /** 19 | * 数据 20 | * 21 | * PS: ①当dropDown为kDropDownPatternDefault时, NSArray必须存储NSString类型: @[@"1", @"2", @"3"]; 22 | 23 | ②当dropDown为kDropDownPatternCustom时, NSArray可存储任意元素类型,但所有元素的类型必须一致 24 | * 25 | * @return NSArray 26 | */ 27 | - (NSArray *)itemArrayInDropDown:(ZFDropDown *)dropDown; 28 | 29 | 30 | 31 | @optional 32 | 33 | /** 34 | * 设置cell高度(默认为44.f) 35 | * 36 | * @param dropDown 当前dropDown 37 | * @param indexPath 当前cell的下标 38 | */ 39 | - (CGFloat)dropDown:(ZFDropDown *)dropDown heightForRowAtIndexPath:(NSIndexPath *)indexPath; 40 | 41 | /** 42 | * tableView展示行数(默认展示6行) 43 | * 44 | * @param dropDown 当前dropDown 45 | * @param count 可拿到数据源的个数进行特殊情况行数展示设置 46 | eg: 例如当有多个dropDown时,某个dropDown数据源的个数不够n个,则可以用此方法拿到count进行判断,当count < n,则返回当前数据源的个数,否则则返回n个 47 | * 48 | * @return 返回NSUInteger 49 | */ 50 | - (NSUInteger)numberOfRowsToDisplayIndropDown:(ZFDropDown *)dropDown itemArrayCount:(NSUInteger)count; 51 | 52 | /** 53 | * 返回自定义topic(当dropDown为kDropDownPatternDefault时,该方法无效) 54 | */ 55 | - (UIView *)viewForTopicInDropDown:(ZFDropDown *)dropDown; 56 | 57 | /** 58 | * 返回自定义cell(当dropDown为kDropDownPatternDefault时,该方法无效) 59 | 60 | * @param dropDown 当前dropDown 61 | * @param tableView tableView 62 | * @param indexPath indexPath 63 | * @return UITableViewCell 64 | */ 65 | - (UITableViewCell *)dropDown:(ZFDropDown *)dropDown tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath; 66 | 67 | /** 68 | *获取被点击的数据所在数组的下标,用于进行后续的数据传值操作 69 | 70 | * @param dropDown 当前dropDown 71 | * @param indexPath 数据所在数组的位置下标 72 | */ 73 | - (void)dropDown:(ZFDropDown *)dropDown didSelectRowAtIndexPath:(NSIndexPath *)indexPath; 74 | 75 | @end 76 | 77 | /** 78 | * dropDown样式 79 | */ 80 | typedef enum{ 81 | kDropDownPatternDefault = 0,//自带Button 82 | kDropDownPatternCustom = 1,//自定义控件 83 | }kDropDownPattern; 84 | 85 | /** 86 | * topic边框样式 87 | */ 88 | typedef enum{ 89 | kDropDownTopicBorderStyleNone = 0,//无边框(默认) 90 | kDropDownTopicBorderStyleSingleLine = 1,//底部有边线 91 | kDropDownTopicBorderStyleRect = 2//长方形边框 92 | }kDropDownTopicBorderStyle; 93 | 94 | typedef enum{ 95 | kDropDownOrientationUp = 0,//上方显示 96 | kDropDownOrientationDown = 1//下方显示(默认) 97 | }kDropDownOrientation; 98 | 99 | @interface ZFDropDown : UIView 100 | 101 | @property (nonatomic, weak) id delegate; 102 | 103 | /** Default模式下自带的主题Button */ 104 | @property (nonatomic, strong) UIButton * topicButton; 105 | 106 | /** topic背景颜色(默认为ZFClear) */ 107 | @property (nonatomic, strong) UIColor * topicBackgroundColor; 108 | /** tableView背景颜色(默认为ZFTaupe3) */ 109 | @property (nonatomic, strong) UIColor * tableViewBackgroundColor; 110 | /** cell文本颜色 */ 111 | @property (nonatomic, strong) UIColor * cellTextColor; 112 | /** cell文本Font */ 113 | @property (nonatomic, strong) UIFont * cellTextFont; 114 | /** cell文本Alignment */ 115 | @property (nonatomic, assign) NSTextAlignment cellTextAlignment; 116 | /** cell文本显示行数(默认为1行) */ 117 | @property (nonatomic, assign) NSInteger cellNumberOfLines; 118 | /** tableView展示方向(默认为kDropDownOrientationDown) */ 119 | @property (nonatomic, assign) kDropDownOrientation orientation; 120 | 121 | /** tableView的阴影透明度(默认为0.5, 范围0~1) */ 122 | @property (nonatomic, assign) CGFloat shadowOpacity; 123 | /** tableView的cornerRadius */ 124 | @property (nonatomic, assign) CGFloat cornerRadius; 125 | /** tableView分割线样式(默认为UITableViewCellSeparatorStyleNone) */ 126 | @property (nonatomic, assign) UITableViewCellSeparatorStyle separatorStyle; 127 | /** topic边框样式(默认为kDropDownTopicBorderStyleNone) */ 128 | @property (nonatomic, assign) kDropDownTopicBorderStyle borderStyle; 129 | /** topic边框颜色(默认为ZFLightGray) */ 130 | @property (nonatomic, strong) UIColor * borderColor; 131 | 132 | 133 | /** 134 | * 初始化 135 | 136 | * @param frame frame 137 | * @param pattern dropDown样式 138 | * @return self 139 | */ 140 | - (instancetype)initWithFrame:(CGRect)frame pattern:(kDropDownPattern)pattern; 141 | 142 | /** 143 | * 刷新tableView数据(网络数据加载后调用此方法进行数据刷新) 144 | */ 145 | - (void)reloadData; 146 | 147 | /** 148 | * 当dropDown为kDropDownTopicPatternForCustom自定义样式时,且viewForTopic里有UIButton或UIControl控件时,若需要通过该UIButton或UIControl弹出下拉列表,则添加下句代码: 149 | 150 | [self.button addTarget:dropDown action:@selector(show) forControlEvents:UIControlEventTouchUpInside]; 151 | 152 | target填写当前的dropDown, 切勿填self, 否则无效 153 | selector则为show 154 | 155 | 具体用法请看CustomViewController.m 156 | */ 157 | - (void)show; 158 | 159 | /** 160 | * 取消第一响应,用于手势响应事件里 161 | */ 162 | - (void)resignDropDownResponder; 163 | 164 | @end 165 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/ZFDropDown/ZFDropDown.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZFDropDown.m 3 | // ZFDropDownDemo 4 | // 5 | // Created by apple on 2017/1/4. 6 | // Copyright © 2017年 apple. All rights reserved. 7 | // 8 | 9 | #import "ZFDropDown.h" 10 | #import "ZFView.h" 11 | 12 | @interface ZFDropDown(){ 13 | 14 | } 15 | 16 | @property (nonatomic, strong) UIWindow * window; 17 | /** 主题容器view */ 18 | @property (nonatomic, strong) ZFView * topicContainerView; 19 | /** 装载tableView的背景容器 */ 20 | @property (nonatomic, strong) UIView * tableViewContainerView; 21 | /** 下拉tableView */ 22 | @property (nonatomic, strong) UITableView * tableView; 23 | /** topicBorderStyleSingleLine */ 24 | @property (nonatomic, strong) UIView * line; 25 | 26 | /** 数据 */ 27 | @property (nonatomic, strong) NSArray * itemArray; 28 | /** 记录主题控件样式 */ 29 | @property (nonatomic, assign) kDropDownPattern pattern; 30 | /** cell的高度 */ 31 | @property (nonatomic, assign) CGFloat heightForRow; 32 | /** tableView展示行数 */ 33 | @property (nonatomic, assign) NSUInteger numberOfRowsToDisplay; 34 | /** self原始的rect */ 35 | @property (nonatomic, assign) CGRect originRect; 36 | 37 | @end 38 | 39 | @implementation ZFDropDown 40 | 41 | - (void)commonInit{ 42 | _originRect = self.frame; 43 | _numberOfRowsToDisplay = 6; 44 | _heightForRow = 44.f; 45 | _shadowOpacity = 0.5f; 46 | _cornerRadius = 0.f; 47 | _topicBackgroundColor = ZFClear; 48 | _tableViewBackgroundColor = ZFTaupe3; 49 | _cellTextColor = ZFBlack; 50 | _cellTextFont = [UIFont systemFontOfSize:17.f]; 51 | _cellTextAlignment = NSTextAlignmentLeft; 52 | _cellNumberOfLines = 1; 53 | _borderStyle = kDropDownTopicBorderStyleNone; 54 | _borderColor = ZFLightGray; 55 | _separatorStyle = UITableViewCellSeparatorStyleNone; 56 | _window = [UIApplication sharedApplication].keyWindow; 57 | _orientation = kDropDownOrientationDown; 58 | } 59 | 60 | - (instancetype)initWithFrame:(CGRect)frame pattern:(kDropDownPattern)pattern{ 61 | self = [super initWithFrame:frame]; 62 | if (self) { 63 | _pattern = pattern; 64 | [self commonInit]; 65 | [self setUpUI]; 66 | } 67 | 68 | return self; 69 | } 70 | 71 | /** 72 | * 设置UI 73 | */ 74 | - (void)setUpUI{ 75 | //主题容器view 76 | self.topicContainerView = [[ZFView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.frame), CGRectGetHeight(self.frame))]; 77 | [self addSubview:self.topicContainerView]; 78 | 79 | if (_pattern == kDropDownPatternDefault) { 80 | self.topicButton = [UIButton buttonWithType:UIButtonTypeSystem]; 81 | self.topicButton.frame = CGRectMake(10, 0, CGRectGetWidth(self.topicContainerView.frame) - 20, CGRectGetHeight(self.topicContainerView.frame)); 82 | self.topicButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft; 83 | [self.topicButton addTarget:self action:@selector(show) forControlEvents:UIControlEventTouchUpInside]; 84 | [self.topicContainerView addSubview:self.topicButton]; 85 | }else if (_pattern == kDropDownPatternCustom){ 86 | UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(show)]; 87 | [self.topicContainerView addGestureRecognizer:tap]; 88 | } 89 | 90 | //装载tableView的背景容器 91 | self.tableViewContainerView = [[UIView alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(self.topicContainerView.frame) + 1, CGRectGetWidth(self.frame), _numberOfRowsToDisplay * _heightForRow)]; 92 | self.tableViewContainerView.layer.shadowPath = [UIBezierPath bezierPathWithRect:_tableViewContainerView.bounds].CGPath; 93 | self.tableViewContainerView.hidden = YES; 94 | [self addSubview:_tableViewContainerView]; 95 | 96 | //下拉tableView 97 | self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.tableViewContainerView.frame), CGRectGetHeight(self.tableViewContainerView.frame)) style:UITableViewStylePlain]; 98 | self.tableView.delegate = self; 99 | self.tableView.dataSource = self; 100 | self.tableView.backgroundColor = _tableViewBackgroundColor; 101 | self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; 102 | [self.tableViewContainerView addSubview:self.tableView]; 103 | } 104 | 105 | - (void)reset{ 106 | if ([self.delegate respondsToSelector:@selector(itemArrayInDropDown:)]) { 107 | self.itemArray = [NSArray arrayWithArray:[self.delegate itemArrayInDropDown:self]]; 108 | } 109 | 110 | if ([self.delegate respondsToSelector:@selector(numberOfRowsToDisplayIndropDown:itemArrayCount:)]) { 111 | _numberOfRowsToDisplay = [self.delegate numberOfRowsToDisplayIndropDown:self itemArrayCount:self.itemArray.count]; 112 | } 113 | } 114 | 115 | /** 116 | * 重新设置部分UI属性 117 | */ 118 | - (void)resetUI{ 119 | self.tableViewContainerView.frame = CGRectMake(0, CGRectGetMaxY(self.topicContainerView.frame) + 1, CGRectGetWidth(self.frame), _numberOfRowsToDisplay * _heightForRow); 120 | self.tableViewContainerView.layer.shadowPath = [UIBezierPath bezierPathWithRect:_tableViewContainerView.bounds].CGPath; 121 | self.tableView.frame = CGRectMake(0, 0, CGRectGetWidth(self.tableViewContainerView.frame), CGRectGetHeight(self.tableViewContainerView.frame)); 122 | 123 | if (_pattern == kDropDownPatternCustom){ 124 | if ([self.delegate respondsToSelector:@selector(viewForTopicInDropDown:)]) { 125 | [self.topicContainerView addSubview:[self.delegate viewForTopicInDropDown:self]];; 126 | 127 | }else{ 128 | NSLog(@"请通过- (UIView *)viewForTopicInDropDown:(ZFDropDown *)dropDown协议方法返回一个自定义topic view"); 129 | } 130 | } 131 | } 132 | 133 | /** 134 | * 主题点击Action 135 | */ 136 | - (void)show{ 137 | [self hideOtherDropDown]; 138 | [self.superview bringSubviewToFront:self]; 139 | self.topicContainerView.isSelected = !self.topicContainerView.isSelected; 140 | 141 | if (self.topicContainerView.isSelected) { 142 | 143 | if (_orientation == kDropDownOrientationDown) { 144 | self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, self.frame.size.width, self.frame.size.height + self.tableView.frame.size.height + 1); 145 | 146 | }else if (_orientation == kDropDownOrientationUp){ 147 | self.frame = CGRectMake(self.frame.origin.x, CGRectGetMaxY(self.frame) - self.tableView.frame.size.height, self.frame.size.width, self.tableView.frame.size.height); 148 | self.tableViewContainerView.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height); 149 | self.topicContainerView.frame = CGRectMake(0, self.frame.size.height - self.topicContainerView.frame.size.height, self.topicContainerView.frame.size.width, self.topicContainerView.frame.size.height); 150 | } 151 | 152 | self.tableViewContainerView.alpha = 1.f; 153 | self.tableViewContainerView.hidden = NO; 154 | self.tableViewContainerView.layer.shadowColor = ZFDarkGray.CGColor; 155 | self.tableViewContainerView.layer.shadowOpacity = _shadowOpacity; 156 | self.tableViewContainerView.layer.shadowOffset = CGSizeZero; 157 | self.tableViewContainerView.layer.shadowRadius = 8.f; 158 | CGAffineTransform originTransform = self.tableViewContainerView.transform; 159 | CGAffineTransform scaleTransform = CGAffineTransformScale(self.tableViewContainerView.transform, 0.9, 0.9); 160 | self.tableViewContainerView.transform = scaleTransform; 161 | 162 | [UIView animateWithDuration:0.15f delay:0.f options:UIViewAnimationOptionAllowUserInteraction &UIViewAnimationOptionCurveEaseOut animations:^{ 163 | self.tableViewContainerView.transform = originTransform; 164 | 165 | } completion:nil]; 166 | 167 | }else{ 168 | 169 | [UIView animateKeyframesWithDuration:0.1f delay:0.f options:UIViewAnimationOptionAllowUserInteraction &UIViewAnimationOptionCurveEaseIn animations:^{ 170 | self.tableViewContainerView.alpha = 0.95f; 171 | 172 | } completion:^(BOOL finished) { 173 | self.tableViewContainerView.layer.shadowColor = ZFClear.CGColor; 174 | self.tableViewContainerView.layer.shadowOpacity = 0.f; 175 | self.tableViewContainerView.layer.shadowOffset = CGSizeZero; 176 | self.tableViewContainerView.layer.shadowRadius = 0.f; 177 | self.tableViewContainerView.hidden = YES; 178 | [self.window sendSubviewToBack:self.tableViewContainerView]; 179 | self.frame = _originRect; 180 | 181 | if (_orientation == kDropDownOrientationUp){ 182 | self.topicContainerView.frame = CGRectMake(0, 0, CGRectGetWidth(self.frame), CGRectGetHeight(self.frame)); 183 | } 184 | 185 | }]; 186 | } 187 | } 188 | 189 | /** 190 | * 隐藏其他DropDown 191 | */ 192 | - (void)hideOtherDropDown{ 193 | for (UIView * subview in self.superview.subviews) { 194 | if ([subview isKindOfClass:[ZFDropDown class]]) { 195 | ZFDropDown * dropDown = (ZFDropDown *)subview; 196 | if (subview != self) { 197 | if (dropDown.topicContainerView.isSelected) { 198 | dropDown.topicContainerView.isSelected = NO; 199 | dropDown.frame = dropDown.originRect; 200 | 201 | if (dropDown.orientation == kDropDownOrientationUp){ 202 | dropDown.topicContainerView.frame = CGRectMake(0, 0, CGRectGetWidth(dropDown.frame), CGRectGetHeight(dropDown.frame)); 203 | } 204 | 205 | dropDown.tableViewContainerView.layer.shadowColor = ZFClear.CGColor; 206 | dropDown.tableViewContainerView.layer.shadowOpacity = 0.f; 207 | dropDown.tableViewContainerView.layer.shadowOffset = CGSizeZero; 208 | dropDown.tableViewContainerView.layer.shadowRadius = 0.f; 209 | dropDown.tableViewContainerView.hidden = YES; 210 | [self.window sendSubviewToBack:dropDown.tableViewContainerView]; 211 | } 212 | } 213 | } 214 | } 215 | } 216 | 217 | /** 218 | * 单独隐藏 219 | */ 220 | - (void)hide{ 221 | for (UIView * subview in self.superview.subviews) { 222 | if ([subview isKindOfClass:[ZFDropDown class]]) { 223 | ZFDropDown * dropDown = (ZFDropDown *)subview; 224 | if (dropDown.topicContainerView.isSelected) { 225 | dropDown.topicContainerView.isSelected = NO; 226 | dropDown.frame = dropDown.originRect; 227 | 228 | if (dropDown.orientation == kDropDownOrientationUp){ 229 | dropDown.topicContainerView.frame = CGRectMake(0, 0, CGRectGetWidth(dropDown.frame), CGRectGetHeight(dropDown.frame)); 230 | } 231 | 232 | dropDown.tableViewContainerView.layer.shadowColor = ZFClear.CGColor; 233 | dropDown.tableViewContainerView.layer.shadowOpacity = 0.f; 234 | dropDown.tableViewContainerView.layer.shadowOffset = CGSizeZero; 235 | dropDown.tableViewContainerView.layer.shadowRadius = 0.f; 236 | dropDown.tableViewContainerView.hidden = YES; 237 | [self.window sendSubviewToBack:dropDown.tableViewContainerView]; 238 | } 239 | } 240 | } 241 | } 242 | 243 | #pragma mark - UITableViewDataSource 244 | 245 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 246 | return self.itemArray.count; 247 | } 248 | 249 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 250 | if (_pattern == kDropDownPatternDefault) { 251 | static NSString * cellIdentifier = @"DefaultCell"; 252 | UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; 253 | 254 | if (!cell) { 255 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier]; 256 | } 257 | 258 | if ([cell respondsToSelector:@selector(setLayoutMargins:)]) { 259 | [cell setLayoutMargins:UIEdgeInsetsZero]; 260 | } 261 | 262 | if ([cell respondsToSelector:@selector(setSeparatorInset:)]){ 263 | [cell setSeparatorInset:UIEdgeInsetsZero]; 264 | } 265 | 266 | NSString * text = nil; 267 | if ([self.itemArray[indexPath.row] isKindOfClass:[NSString class]]) { 268 | text = self.itemArray[indexPath.row]; 269 | }else{ 270 | NSLog(@"当前dropDown样式为kDropDownPatternDefault, 请替换为kDropDownPatternCustom"); 271 | return [[UITableViewCell alloc] init]; 272 | } 273 | 274 | cell.textLabel.text = text; 275 | cell.textLabel.textColor = _cellTextColor; 276 | cell.textLabel.font = _cellTextFont; 277 | cell.textLabel.textAlignment = _cellTextAlignment; 278 | cell.textLabel.numberOfLines = _cellNumberOfLines; 279 | cell.backgroundColor = ZFClear; 280 | return cell; 281 | 282 | //自定义cell 283 | }else if (_pattern == kDropDownPatternCustom){ 284 | if ([self.delegate respondsToSelector:@selector(dropDown:tableView:cellForRowAtIndexPath:)]) { 285 | return [self.delegate dropDown:self tableView:tableView cellForRowAtIndexPath:indexPath]; 286 | } 287 | } 288 | 289 | return [[UITableViewCell alloc] init]; 290 | } 291 | 292 | #pragma mark - UITableViewDelegate 293 | 294 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 295 | if ([self.delegate respondsToSelector:@selector(dropDown:heightForRowAtIndexPath:)]) { 296 | _heightForRow = [self.delegate dropDown:self heightForRowAtIndexPath:indexPath]; 297 | } 298 | 299 | return _heightForRow; 300 | } 301 | 302 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 303 | [self show]; 304 | 305 | if (_pattern == kDropDownPatternDefault) { 306 | [self.topicButton setTitle:self.itemArray[indexPath.row] forState:UIControlStateNormal]; 307 | } 308 | 309 | if ([self.delegate respondsToSelector:@selector(dropDown:didSelectRowAtIndexPath:)]) { 310 | [self.delegate dropDown:self didSelectRowAtIndexPath:indexPath]; 311 | } 312 | } 313 | 314 | #pragma mark - public method 315 | 316 | - (void)reloadData{ 317 | [self reset]; 318 | [self.tableView reloadData]; 319 | [self resetUI]; 320 | } 321 | 322 | - (void)resignDropDownResponder{ 323 | [self hide]; 324 | } 325 | 326 | #pragma mark - 重写setter, getter方法 327 | 328 | - (NSArray *)itemArray{ 329 | if (!_itemArray) { 330 | _itemArray = [NSArray array]; 331 | } 332 | 333 | return _itemArray; 334 | } 335 | 336 | - (void)setDelegate:(id)delegate{ 337 | _delegate = delegate; 338 | 339 | [self reset]; 340 | [self resetUI]; 341 | } 342 | 343 | - (void)setTopicBackgroundColor:(UIColor *)topicBackgroundColor{ 344 | _topicBackgroundColor = topicBackgroundColor; 345 | self.topicContainerView.backgroundColor = _topicBackgroundColor; 346 | } 347 | 348 | - (void)setTableViewBackgroundColor:(UIColor *)tableViewBackgroundColor{ 349 | _tableViewBackgroundColor = tableViewBackgroundColor; 350 | self.tableView.backgroundColor = _tableViewBackgroundColor; 351 | } 352 | 353 | - (void)setCornerRadius:(CGFloat)cornerRadius{ 354 | _cornerRadius = cornerRadius; 355 | self.tableViewContainerView.layer.cornerRadius = _cornerRadius; 356 | self.tableView.layer.cornerRadius = _cornerRadius; 357 | } 358 | 359 | - (void)setBorderStyle:(kDropDownTopicBorderStyle)borderStyle{ 360 | _borderStyle = borderStyle; 361 | 362 | if (_borderStyle == kDropDownTopicBorderStyleSingleLine) { 363 | self.line = nil; 364 | self.line = [[UIView alloc] initWithFrame:CGRectMake(0, CGRectGetHeight(self.topicContainerView.frame) - 0.6f, CGRectGetWidth(self.topicContainerView.frame), 0.6f)]; 365 | self.line.backgroundColor = _borderColor; 366 | [self.topicContainerView addSubview:self.line]; 367 | 368 | }else if (_borderStyle == kDropDownTopicBorderStyleRect){ 369 | self.topicContainerView.layer.borderColor = _borderColor.CGColor; 370 | self.topicContainerView.layer.borderWidth = 0.6f; 371 | } 372 | } 373 | 374 | - (void)setBorderColor:(UIColor *)borderColor{ 375 | _borderColor = borderColor; 376 | if (_borderStyle == kDropDownTopicBorderStyleSingleLine) { 377 | self.line.backgroundColor = _borderColor; 378 | }else if (_borderStyle == kDropDownTopicBorderStyleRect){ 379 | self.topicContainerView.layer.borderColor = _borderColor.CGColor; 380 | } 381 | } 382 | 383 | - (void)setSeparatorStyle:(UITableViewCellSeparatorStyle)separatorStyle{ 384 | _separatorStyle = separatorStyle; 385 | self.tableView.separatorStyle = _separatorStyle; 386 | } 387 | 388 | @end 389 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ZFDropDownDemo 4 | // 5 | // Created by apple on 2017/1/4. 6 | // Copyright © 2017年 apple. 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 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemoTests/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 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemoTests/ZFDropDownDemoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZFDropDownDemoTests.m 3 | // ZFDropDownDemoTests 4 | // 5 | // Created by apple on 2017/1/4. 6 | // Copyright © 2017年 apple. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ZFDropDownDemoTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation ZFDropDownDemoTests 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 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemoUITests/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 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /ZFDropDownDemo/ZFDropDownDemoUITests/ZFDropDownDemoUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZFDropDownDemoUITests.m 3 | // ZFDropDownDemoUITests 4 | // 5 | // Created by apple on 2017/1/4. 6 | // Copyright © 2017年 apple. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ZFDropDownDemoUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation ZFDropDownDemoUITests 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 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-architect --------------------------------------------------------------------------------