├── 0.gif ├── 1.gif ├── 2.gif ├── 3.gif ├── PopView ├── PopView.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ ├── apple.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ │ │ └── lilin.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ ├── apple.xcuserdatad │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ │ └── xcschememanagement.plist │ │ └── lilin.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ └── xcschememanagement.plist ├── PopView │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── addFriend_icon.imageset │ │ │ ├── Contents.json │ │ │ └── addFriend_icon@2x.png │ │ ├── album_icon.imageset │ │ │ ├── Contents.json │ │ │ └── album_icon@2x.png │ │ ├── arrow_icon.imageset │ │ │ ├── Contents.json │ │ │ └── arrow_icon@2x.png │ │ ├── arrow_seletedIcon.imageset │ │ │ ├── Contents.json │ │ │ └── arrow_seletedIcon@2x.png │ │ ├── backIcon.imageset │ │ │ ├── Contents.json │ │ │ └── backIcon@2x.png │ │ ├── close_icon.imageset │ │ │ ├── Contents.json │ │ │ └── close_icon@2x.png │ │ ├── codesign.imageset │ │ │ ├── Contents.json │ │ │ └── codesign.png │ │ ├── collection_icon.imageset │ │ │ ├── Contents.json │ │ │ └── collection_icon@2x.png │ │ ├── delete_icon.imageset │ │ │ ├── Contents.json │ │ │ └── delete_icon@2x.png │ │ ├── elementSelect_icon.imageset │ │ │ ├── Contents.json │ │ │ ├── elementSelect_icon@2x.png │ │ │ └── elementSelect_icon@3x.png │ │ ├── face_icon.imageset │ │ │ ├── Contents.json │ │ │ └── face_icon@2x.png │ │ ├── file_icon.imageset │ │ │ ├── Contents.json │ │ │ └── file_icon@2x.png │ │ ├── liudehua.imageset │ │ │ ├── Contents.json │ │ │ └── liudehua.jpg │ │ ├── message_icon.imageset │ │ │ ├── Contents.json │ │ │ └── message_icon@2x.png │ │ ├── monye_icon.imageset │ │ │ ├── Contents.json │ │ │ └── monye_icon@2x.png │ │ ├── moon_icon.imageset │ │ │ ├── Contents.json │ │ │ └── moon_icon@2x.png │ │ ├── payMoney_icon.imageset │ │ │ ├── Contents.json │ │ │ └── payMoney_icon@2x.png │ │ ├── photo_icon.imageset │ │ │ ├── Contents.json │ │ │ └── photo_icon@2x.png │ │ ├── qq_icon.imageset │ │ │ ├── Contents.json │ │ │ └── qq_icon@2x.png │ │ ├── saoyisao_icon.imageset │ │ │ ├── Contents.json │ │ │ └── saoyisao_icon@2x.png │ │ ├── selected_icon.imageset │ │ │ ├── Contents.json │ │ │ └── selected_icon@2x.png │ │ ├── setting_icon.imageset │ │ │ ├── Contents.json │ │ │ └── setting_icon@2x.png │ │ ├── sign_icon.imageset │ │ │ ├── Contents.json │ │ │ └── sign_icon@2x.png │ │ ├── triangle_icon.imageset │ │ │ ├── Contents.json │ │ │ └── triangle_icon@2x.png │ │ ├── videoTip_close_button_vc.imageset │ │ │ ├── Contents.json │ │ │ └── 关闭-拷贝@2x.png │ │ ├── video_icon.imageset │ │ │ ├── Contents.json │ │ │ └── video_icon@2x.png │ │ ├── weibo_icon.imageset │ │ │ ├── Contents.json │ │ │ └── weibo_icon@2x.png │ │ └── weichat_icon.imageset │ │ │ ├── Contents.json │ │ │ └── weichat_icon@2x.png │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── CustomView │ │ ├── PopSliderBelowViewDemo │ │ │ ├── ConditionChooseListView.h │ │ │ ├── ConditionChooseListView.m │ │ │ ├── HouseChooseView.h │ │ │ ├── HouseChooseView.m │ │ │ ├── HouseConditionFilterView.h │ │ │ ├── HouseConditionFilterView.m │ │ │ ├── HouseConditionFilterView.xib │ │ │ ├── MoreChooseView.h │ │ │ ├── MoreChooseView.m │ │ │ ├── PopSliderBelowStaticVar.h │ │ │ ├── PopSliderBelowStaticVar.m │ │ │ ├── PriceChooseToolView.h │ │ │ ├── PriceChooseToolView.m │ │ │ ├── PriceChooseToolView.xib │ │ │ ├── PriceChooseView.h │ │ │ ├── PriceChooseView.m │ │ │ ├── RegionChooseView.h │ │ │ └── RegionChooseView.m │ │ ├── PopSliderViewDemo │ │ │ ├── ConditionFilterView.h │ │ │ ├── ConditionFilterView.m │ │ │ ├── CusttomDatePickView.h │ │ │ ├── CusttomDatePickView.m │ │ │ ├── CusttomDatePickView.xib │ │ │ ├── LoginView.h │ │ │ ├── LoginView.m │ │ │ ├── LoginView.xib │ │ │ ├── QZoneView.h │ │ │ ├── QZoneView.m │ │ │ ├── QZoneView.xib │ │ │ ├── RegisterView.h │ │ │ ├── RegisterView.m │ │ │ ├── RegisterView.xib │ │ │ ├── SharePanelView.h │ │ │ ├── SharePanelView.m │ │ │ ├── SharePanelView.xib │ │ │ ├── SideLeftBarView.h │ │ │ ├── SideLeftBarView.m │ │ │ └── SideLeftBarView.xib │ │ ├── PopTableListView.h │ │ ├── PopTableListView.m │ │ ├── YLButton.h │ │ └── YLButton.m │ ├── Info.plist │ ├── PopListViewController.h │ ├── PopListViewController.m │ ├── PopSiderViewController.h │ ├── PopSiderViewController.m │ ├── PopSliderBelowViewViewController.h │ ├── PopSliderBelowViewViewController.m │ ├── PopView │ │ ├── PopAnimationTool.h │ │ ├── PopAnimationTool.m │ │ ├── PopView.h │ │ └── PopView.m │ ├── ViewController.h │ ├── ViewController.m │ ├── main.m │ └── moreFilter.plist ├── PopViewTests │ ├── Info.plist │ └── PopViewTests.m └── PopViewUITests │ ├── Info.plist │ └── PopViewUITests.m └── README.md /0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/0.gif -------------------------------------------------------------------------------- /1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/1.gif -------------------------------------------------------------------------------- /2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/2.gif -------------------------------------------------------------------------------- /3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/3.gif -------------------------------------------------------------------------------- /PopView/PopView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PopView/PopView.xcodeproj/project.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView.xcodeproj/project.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /PopView/PopView.xcodeproj/project.xcworkspace/xcuserdata/lilin.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView.xcodeproj/project.xcworkspace/xcuserdata/lilin.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /PopView/PopView.xcodeproj/xcuserdata/apple.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /PopView/PopView.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | PopView.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /PopView/PopView.xcodeproj/xcuserdata/lilin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /PopView/PopView.xcodeproj/xcuserdata/lilin.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | PopView.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /PopView/PopView/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/2/27. 6 | // Copyright © 2018年 李林. 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 | -------------------------------------------------------------------------------- /PopView/PopView/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/2/27. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/addFriend_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "addFriend_icon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/addFriend_icon.imageset/addFriend_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/addFriend_icon.imageset/addFriend_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/album_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "album_icon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/album_icon.imageset/album_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/album_icon.imageset/album_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/arrow_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "arrow_icon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/arrow_icon.imageset/arrow_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/arrow_icon.imageset/arrow_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/arrow_seletedIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "arrow_seletedIcon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/arrow_seletedIcon.imageset/arrow_seletedIcon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/arrow_seletedIcon.imageset/arrow_seletedIcon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/backIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "backIcon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/backIcon.imageset/backIcon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/backIcon.imageset/backIcon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/close_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "close_icon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/close_icon.imageset/close_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/close_icon.imageset/close_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/codesign.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "codesign.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/codesign.imageset/codesign.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/codesign.imageset/codesign.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/collection_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "collection_icon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/collection_icon.imageset/collection_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/collection_icon.imageset/collection_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/delete_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "delete_icon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/delete_icon.imageset/delete_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/delete_icon.imageset/delete_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/elementSelect_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "elementSelect_icon@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "elementSelect_icon@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/elementSelect_icon.imageset/elementSelect_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/elementSelect_icon.imageset/elementSelect_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/elementSelect_icon.imageset/elementSelect_icon@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/elementSelect_icon.imageset/elementSelect_icon@3x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/face_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "face_icon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/face_icon.imageset/face_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/face_icon.imageset/face_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/file_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "file_icon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/file_icon.imageset/file_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/file_icon.imageset/file_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/liudehua.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "liudehua.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/liudehua.imageset/liudehua.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/liudehua.imageset/liudehua.jpg -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/message_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "message_icon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/message_icon.imageset/message_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/message_icon.imageset/message_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/monye_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "monye_icon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/monye_icon.imageset/monye_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/monye_icon.imageset/monye_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/moon_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "moon_icon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/moon_icon.imageset/moon_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/moon_icon.imageset/moon_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/payMoney_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "payMoney_icon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/payMoney_icon.imageset/payMoney_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/payMoney_icon.imageset/payMoney_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/photo_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "photo_icon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/photo_icon.imageset/photo_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/photo_icon.imageset/photo_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/qq_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "qq_icon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/qq_icon.imageset/qq_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/qq_icon.imageset/qq_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/saoyisao_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "saoyisao_icon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/saoyisao_icon.imageset/saoyisao_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/saoyisao_icon.imageset/saoyisao_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/selected_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "selected_icon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/selected_icon.imageset/selected_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/selected_icon.imageset/selected_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/setting_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "setting_icon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/setting_icon.imageset/setting_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/setting_icon.imageset/setting_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/sign_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "sign_icon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/sign_icon.imageset/sign_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/sign_icon.imageset/sign_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/triangle_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "triangle_icon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/triangle_icon.imageset/triangle_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/triangle_icon.imageset/triangle_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/videoTip_close_button_vc.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "关闭-拷贝@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/videoTip_close_button_vc.imageset/关闭-拷贝@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/videoTip_close_button_vc.imageset/关闭-拷贝@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/video_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "video_icon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/video_icon.imageset/video_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/video_icon.imageset/video_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/weibo_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "weibo_icon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/weibo_icon.imageset/weibo_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/weibo_icon.imageset/weibo_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/weichat_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "weichat_icon@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 | } -------------------------------------------------------------------------------- /PopView/PopView/Assets.xcassets/weichat_icon.imageset/weichat_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderLinLee/PopView/1dc90321bc94b7c5d646d6dddfd7d399a193dd45/PopView/PopView/Assets.xcassets/weichat_icon.imageset/weichat_icon@2x.png -------------------------------------------------------------------------------- /PopView/PopView/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 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderBelowViewDemo/ConditionChooseListView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ConditionChooseListView.h 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/9. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ConditionChooseListView : UIView 12 | @property (nonatomic ,copy) void (^chooseComplete)(NSString *title); 13 | @end 14 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderBelowViewDemo/ConditionChooseListView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ConditionChooseListView.m 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/9. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import "ConditionChooseListView.h" 10 | #import "PopSliderBelowStaticVar.h" 11 | 12 | @interface ConditionChooseListView() 13 | @property (nonatomic ,strong) UITableView *tableView; 14 | @property (nonatomic ,copy) NSArray *titles; 15 | 16 | @end 17 | 18 | @implementation ConditionChooseListView 19 | - (instancetype)initWithFrame:(CGRect)frame 20 | { 21 | self = [super initWithFrame:frame]; 22 | if (self) { 23 | [self addSubview:self.tableView]; 24 | self.tableView.frame = self.bounds; 25 | } 26 | return self; 27 | } 28 | 29 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 30 | static NSString *cellIdentifier = @"cellIdentifier"; 31 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; 32 | UILabel *titleLabel = [cell.contentView viewWithTag:999]; 33 | if (cell == nil) { 34 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellIdentifier]; 35 | 36 | titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, 43)]; 37 | [cell.contentView addSubview:titleLabel]; 38 | titleLabel.textAlignment = NSTextAlignmentCenter; 39 | titleLabel.tag = 999; 40 | } 41 | titleLabel.text = [self.titles objectAtIndex:indexPath.row]; 42 | return cell; 43 | } 44 | 45 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 46 | return self.titles.count; 47 | } 48 | 49 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 50 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 51 | if (self.chooseComplete) { 52 | self.chooseComplete([self.titles objectAtIndex:indexPath.row]); 53 | } 54 | } 55 | 56 | - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{ 57 | [cell setSeparatorInset:UIEdgeInsetsZero]; 58 | [cell setLayoutMargins:UIEdgeInsetsZero]; 59 | } 60 | 61 | - (UITableView *)tableView{ 62 | if (_tableView == nil) { 63 | _tableView = [[UITableView alloc] initWithFrame:self.bounds style:UITableViewStylePlain]; 64 | _tableView.delegate = self; 65 | _tableView.dataSource = self; 66 | _tableView.backgroundColor = [UIColor clearColor]; 67 | _tableView.rowHeight = 44; 68 | _tableView.scrollEnabled = NO; 69 | } 70 | return _tableView; 71 | } 72 | 73 | - (NSArray *)titles{ 74 | if (_titles == nil) { 75 | _titles = @[@"0-100米",@"100-500米",@"500-1000米",@"1000-2000米",@"2000-5000米",@"5000-10000米"]; 76 | } 77 | return _titles; 78 | } 79 | @end 80 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderBelowViewDemo/HouseChooseView.h: -------------------------------------------------------------------------------- 1 | // 2 | // HouseChooseView.h 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/9. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HouseChooseView : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderBelowViewDemo/HouseChooseView.m: -------------------------------------------------------------------------------- 1 | // 2 | // HouseChooseView.m 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/9. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import "HouseChooseView.h" 10 | #import "MoreChooseView.h" 11 | #import "PopSliderBelowStaticVar.h" 12 | #import "PopView.h" 13 | 14 | @interface HouseChooseView() 15 | @property (nonatomic ,strong) UITableView *tableView; 16 | @property (nonatomic ,copy) NSArray *titles; 17 | 18 | @property (nonatomic ,strong) UIView *toolView; 19 | @property (nonatomic ,assign) NSInteger selectedIndex; 20 | 21 | @end 22 | @implementation HouseChooseView 23 | 24 | - (instancetype)initWithFrame:(CGRect)frame 25 | { 26 | self = [super initWithFrame:frame]; 27 | if (self) { 28 | [self addSubview:self.tableView]; 29 | [self addSubview:self.toolView]; 30 | } 31 | return self; 32 | } 33 | 34 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 35 | static NSString *cellIdentifier = @"cellIdentifier"; 36 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; 37 | UILabel *titleLabel = [cell.contentView viewWithTag:999]; 38 | if (cell == nil) { 39 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellIdentifier]; 40 | 41 | titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 0, self.bounds.size.width, tableView.rowHeight - segmentingLineHeight)]; 42 | [cell.contentView addSubview:titleLabel]; 43 | titleLabel.tag = 999; 44 | } 45 | MoreChooseItemModel *item = [self.titles objectAtIndex:indexPath.row]; 46 | titleLabel.text = item.itemName; 47 | titleLabel.textColor = item.seleted ? [UIColor redColor] : [UIColor blackColor]; 48 | UIImageView *accessoryView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"selected_icon"]]; 49 | cell.accessoryView = item.seleted ? accessoryView : nil; 50 | 51 | return cell; 52 | } 53 | 54 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 55 | return self.titles.count; 56 | } 57 | 58 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 59 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 60 | MoreChooseItemModel *item = [self.titles objectAtIndex:indexPath.row]; 61 | if (indexPath.row == 0) { 62 | for (MoreChooseItemModel *item in self.titles) { 63 | item.seleted = NO; 64 | } 65 | item.seleted = YES; 66 | }else{ 67 | self.titles.firstObject.seleted = NO; 68 | item.seleted = !item.seleted; 69 | NSInteger selectCount = 0; 70 | for (MoreChooseItemModel *item in self.titles) { 71 | if (item.seleted) { 72 | selectCount++; 73 | } 74 | } 75 | self.titles.firstObject.seleted = selectCount==0; 76 | } 77 | [self.tableView reloadData]; 78 | } 79 | 80 | - (void)sureClick{ 81 | [PopView hidenPopView]; 82 | } 83 | 84 | - (UITableView *)tableView{ 85 | if (_tableView == nil) { 86 | _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height - self.toolView.bounds.size.height) style:UITableViewStylePlain]; 87 | _tableView.delegate = self; 88 | _tableView.dataSource = self; 89 | _tableView.backgroundColor = [UIColor clearColor]; 90 | _tableView.rowHeight = 44; 91 | } 92 | return _tableView; 93 | } 94 | 95 | - (NSArray *)titles{ 96 | if (_titles == nil) { 97 | MoreChooseItemModel *item0 = [[MoreChooseItemModel alloc] init]; 98 | item0.itemName = @"不限"; 99 | item0.seleted = YES; 100 | MoreChooseItemModel *item1 = [[MoreChooseItemModel alloc] init]; 101 | item1.itemName = @"一室"; 102 | MoreChooseItemModel *item2 = [[MoreChooseItemModel alloc] init]; 103 | item2.itemName = @"二室"; 104 | MoreChooseItemModel *item3 = [[MoreChooseItemModel alloc] init]; 105 | item3.itemName = @"三室"; 106 | MoreChooseItemModel *item4 = [[MoreChooseItemModel alloc] init]; 107 | item4.itemName = @"四室"; 108 | MoreChooseItemModel *item5 = [[MoreChooseItemModel alloc] init]; 109 | item5.itemName = @"五室及以上"; 110 | _titles = @[item0,item1,item2,item3,item4,item5]; 111 | } 112 | return _titles; 113 | } 114 | - (UIView *)toolView{ 115 | if (_toolView == nil) { 116 | _toolView = [[UIView alloc] initWithFrame:CGRectMake(0, self.bounds.size.height - 60, self.bounds.size.width, 60)]; 117 | CGFloat margin = 10; 118 | 119 | 120 | UIButton *sureBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 121 | [sureBtn setTitle:@"确定" forState:UIControlStateNormal]; 122 | [sureBtn addTarget:self action:@selector(sureClick) forControlEvents:UIControlEventTouchUpInside]; 123 | sureBtn.frame = CGRectMake (margin, margin, self.bounds.size.width - 2*margin, _toolView.bounds.size.height - 2*margin); 124 | sureBtn.backgroundColor = [UIColor colorWithRed:99/255.0 green:213/255.0 blue:99/255.0 alpha:1];; 125 | [_toolView addSubview:sureBtn]; 126 | sureBtn.layer.cornerRadius = 2; 127 | 128 | 129 | UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, segmentingLineHeight)]; 130 | [_toolView addSubview:lineView]; 131 | lineView.backgroundColor = segmentingLineColor; 132 | 133 | 134 | } 135 | return _toolView; 136 | } 137 | @end 138 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderBelowViewDemo/HouseConditionFilterView.h: -------------------------------------------------------------------------------- 1 | // 2 | // HouseConditionFilterView.h 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/9. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HouseConditionFilterView : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderBelowViewDemo/HouseConditionFilterView.m: -------------------------------------------------------------------------------- 1 | // 2 | // HouseConditionFilterView.m 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/9. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import "HouseConditionFilterView.h" 10 | #import "YLButton.h" 11 | #import "PopView.h" 12 | 13 | #import "RegionChooseView.h" 14 | #import "PriceChooseView.h" 15 | #import "HouseChooseView.h" 16 | #import "MoreChooseView.h" 17 | #import "PopSliderBelowStaticVar.h" 18 | 19 | @interface HouseConditionFilterView() 20 | @property (weak, nonatomic) IBOutlet YLButton *regionBtn; 21 | @property (weak, nonatomic) IBOutlet YLButton *priceBtn; 22 | @property (weak, nonatomic) IBOutlet YLButton *houseNumBtn; 23 | @property (weak, nonatomic) IBOutlet YLButton *moreBtn; 24 | 25 | 26 | @property (strong, nonatomic) RegionChooseView *regionChooseView; 27 | @property (strong, nonatomic) PriceChooseView *priceChooseView; 28 | @property (strong, nonatomic) HouseChooseView *houseChooseView; 29 | @property (strong, nonatomic) MoreChooseView *moreChooseView; 30 | @property (strong, nonatomic) UIButton *currentSeletedBtn; 31 | 32 | @property (weak, nonatomic) IBOutlet UIView *lineView; 33 | @property (weak, nonatomic) IBOutlet NSLayoutConstraint *linViewHeightConstraint; 34 | @property (assign, nonatomic) BOOL initBtn; 35 | 36 | @end 37 | 38 | @implementation HouseConditionFilterView 39 | 40 | #define conditionChooseViewHight 300 41 | - (void)awakeFromNib{ 42 | [super awakeFromNib]; 43 | self.linViewHeightConstraint.constant = segmentingLineHeight; 44 | self.lineView.backgroundColor = segmentingLineColor; 45 | self.initBtn = NO; 46 | self.backgroundColor = [UIColor clearColor]; 47 | } 48 | - (void)layoutSubviews{ 49 | [super layoutSubviews]; 50 | if (!self.initBtn) { 51 | self.initBtn = YES; 52 | [self layoutBtn:self.regionBtn]; 53 | [self layoutBtn:self.priceBtn]; 54 | [self layoutBtn:self.houseNumBtn]; 55 | [self layoutBtn:self.moreBtn]; 56 | } 57 | } 58 | 59 | - (void)layoutBtn:(YLButton *)btn{ 60 | [btn layoutIfNeeded]; 61 | CGRect titleFrame = btn.titleLabel.frame; 62 | CGRect imageViewFrame = btn.imageView.frame; 63 | 64 | titleFrame.origin.x = imageViewFrame.origin.x; 65 | imageViewFrame.origin.x = CGRectGetMaxX(titleFrame); 66 | 67 | [btn setTitleRect:titleFrame]; 68 | [btn setImageRect:imageViewFrame]; 69 | } 70 | 71 | - (IBAction)regionBtnClick:(UIButton *)sender { 72 | [self btnClick:sender conditionView:self.regionChooseView]; 73 | } 74 | 75 | - (IBAction)priceBtnClick:(UIButton *)sender { 76 | [self btnClick:sender conditionView:self.priceChooseView]; 77 | } 78 | 79 | - (IBAction)houseNumBtnClick:(UIButton *)sender { 80 | [self btnClick:sender conditionView:self.houseChooseView]; 81 | } 82 | 83 | - (IBAction)moreBtnClick:(UIButton *)sender { 84 | [self btnClick:sender conditionView:self.moreChooseView]; 85 | } 86 | 87 | - (void)btnClick:(UIButton *)btn conditionView:(UIView *)conditionView{ 88 | btn.selected = !btn.selected; 89 | if (btn.selected) { 90 | PopView *popView = [PopView popSideContentView:conditionView belowView:self ]; 91 | popView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.2]; 92 | __weak typeof(self) weakSelf = self; 93 | [popView setWillRemovedFromeSuperView:^{ 94 | weakSelf.currentSeletedBtn.selected = NO; 95 | weakSelf.currentSeletedBtn.imageView.transform = CGAffineTransformIdentity; 96 | }]; 97 | [self showBtnAnimation:btn]; 98 | }else{ 99 | [PopView hidenPopView]; 100 | } 101 | } 102 | 103 | - (void)showBtnAnimation:(UIButton *)btn{ 104 | self.currentSeletedBtn = btn; 105 | CGAffineTransform transform = btn.selected ? CGAffineTransformRotate(btn.transform, M_PI) : CGAffineTransformIdentity; 106 | btn.imageView.transform = transform; 107 | } 108 | 109 | - (RegionChooseView *)regionChooseView{ 110 | if (_regionChooseView == nil) { 111 | _regionChooseView = [[RegionChooseView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, conditionChooseViewHight)]; 112 | _regionChooseView.backgroundColor = [UIColor whiteColor]; 113 | } 114 | return _regionChooseView; 115 | } 116 | 117 | - (PriceChooseView *)priceChooseView{ 118 | if (_priceChooseView == nil) { 119 | _priceChooseView = [[PriceChooseView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, conditionChooseViewHight)]; 120 | _priceChooseView.backgroundColor = [UIColor whiteColor]; 121 | } 122 | return _priceChooseView; 123 | } 124 | 125 | - (HouseChooseView *)houseChooseView{ 126 | if (_houseChooseView == nil) { 127 | _houseChooseView = [[HouseChooseView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, conditionChooseViewHight)]; 128 | _houseChooseView.backgroundColor = [UIColor whiteColor]; 129 | } 130 | return _houseChooseView; 131 | } 132 | 133 | - (MoreChooseView *)moreChooseView{ 134 | if (_moreChooseView == nil) { 135 | _moreChooseView = [[MoreChooseView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, [UIScreen mainScreen].bounds.size.height - CGRectGetMaxY(self.frame))]; 136 | _moreChooseView.backgroundColor = [UIColor whiteColor]; 137 | } 138 | return _moreChooseView; 139 | } 140 | 141 | @end 142 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderBelowViewDemo/HouseConditionFilterView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 36 | 50 | 64 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderBelowViewDemo/MoreChooseView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MoreChooseView.h 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/9. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | @interface MoreChooseItemModel:NSObject 11 | @property(nonatomic ,copy) NSString *itemName; 12 | @property(nonatomic ,assign) BOOL seleted; 13 | @end 14 | 15 | @interface MoreChooseDataModel:NSObject 16 | @property(nonatomic ,copy) NSString *type; 17 | @property(nonatomic ,assign) BOOL radio; 18 | @property(nonatomic ,strong) NSArray *items; 19 | @end 20 | 21 | 22 | @interface MoreChooseView : UIView 23 | @end 24 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderBelowViewDemo/MoreChooseView.m: -------------------------------------------------------------------------------- 1 | // 2 | // MoreChooseView.m 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/9. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import "MoreChooseView.h" 10 | #import "PopSliderBelowStaticVar.h" 11 | #import "PopView.h" 12 | 13 | @implementation MoreChooseItemModel 14 | @end 15 | 16 | @implementation MoreChooseDataModel 17 | @end 18 | 19 | 20 | 21 | @interface MoreChooseViewCellectionCell:UICollectionViewCell 22 | @property (nonatomic ,strong) UIButton *btn; 23 | @property (nonatomic ,strong) MoreChooseItemModel *itemModel; 24 | 25 | @end 26 | @implementation MoreChooseViewCellectionCell 27 | - (instancetype)initWithFrame:(CGRect)frame{ 28 | self = [super initWithFrame:frame]; 29 | if (self) { 30 | self.btn = [UIButton buttonWithType:UIButtonTypeCustom]; 31 | self.btn.frame = self.bounds; 32 | [self.contentView addSubview:self.btn]; 33 | [self.btn setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal]; 34 | [self.btn setTitleColor:[UIColor greenColor] forState:UIControlStateSelected]; 35 | [self.btn setImage:nil forState:UIControlStateNormal]; 36 | [self.btn setImage:[UIImage imageNamed:@"selected_icon"] forState:UIControlStateSelected]; 37 | self.btn.titleLabel.font = [UIFont systemFontOfSize:13]; 38 | self.btn.layer.cornerRadius = 3; 39 | self.btn.layer.borderColor = [UIColor greenColor].CGColor; 40 | self.btn.userInteractionEnabled = NO; 41 | [self.btn setTitleEdgeInsets:UIEdgeInsetsMake(0, 5, 0, 0)]; 42 | } 43 | return self; 44 | } 45 | - (void)setItemModel:(MoreChooseItemModel *)itemModel{ 46 | _itemModel = itemModel; 47 | [self.btn setTitle:itemModel.itemName forState:UIControlStateNormal]; 48 | self.btn.selected = itemModel.seleted; 49 | self.btn.layer.borderWidth = itemModel.seleted ? 0.5 : 0; 50 | self.btn.backgroundColor = itemModel.seleted ? [UIColor colorWithRed:237.0/255 green:251.0/255 blue:238.0/255 alpha:1] : [UIColor colorWithRed:246.0/255 green:246.0/255 blue:246.0/255 alpha:1]; 51 | } 52 | @end 53 | 54 | @interface MoreChooseView() 55 | @property(nonatomic ,strong)UICollectionView *collectionView; 56 | @property(nonatomic ,strong) UIView *toolView; 57 | @property(nonatomic ,strong) NSArray *dataArr; 58 | @property(nonatomic ,strong) UICollectionViewFlowLayout *layout; 59 | @end 60 | 61 | @implementation MoreChooseView 62 | - (instancetype)initWithFrame:(CGRect)frame 63 | { 64 | self = [super initWithFrame:frame]; 65 | if (self) { 66 | [self addSubview:self.toolView]; 67 | [self addSubview:self.collectionView]; 68 | } 69 | return self; 70 | } 71 | 72 | 73 | -(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{ 74 | return self.dataArr.count; 75 | } 76 | 77 | -(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{ 78 | NSArray *items = [self.dataArr objectAtIndex:section].items; 79 | return items.count; 80 | } 81 | 82 | 83 | -(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ 84 | MoreChooseViewCellectionCell *cell=[collectionView dequeueReusableCellWithReuseIdentifier:@"MoreChooseViewCellectionCell" forIndexPath:indexPath]; 85 | cell.itemModel = [[self.dataArr objectAtIndex:indexPath.section].items objectAtIndex:indexPath.row]; 86 | return cell; 87 | } 88 | 89 | -(UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath{ 90 | 91 | UICollectionReusableView *view=[collectionView dequeueReusableSupplementaryViewOfKind:kind withReuseIdentifier:@"CollectionReusableView" forIndexPath:indexPath]; 92 | if ([kind isEqualToString:UICollectionElementKindSectionHeader]) { 93 | UILabel *label = [view viewWithTag:11]; 94 | if (label == nil) { 95 | label = [[UILabel alloc]initWithFrame:CGRectMake(15, 0, 100, 60)]; 96 | label.tag = 11; 97 | [view addSubview:label]; 98 | label.textColor = [UIColor darkGrayColor]; 99 | label.font = [UIFont systemFontOfSize:15]; 100 | } 101 | label.text = [self.dataArr objectAtIndex:indexPath.section].type; 102 | }else{ 103 | UIView *lineView = [view viewWithTag:12]; 104 | if (lineView == nil) { 105 | lineView = [[UIView alloc]initWithFrame:CGRectMake(15, 0, self.bounds.size.width - 30, 0.5)]; 106 | lineView.tag = 12; 107 | [view addSubview:lineView]; 108 | } 109 | if (indexPath.section == self.dataArr.count-1) { 110 | lineView.backgroundColor = [UIColor clearColor]; 111 | }else{ 112 | lineView.backgroundColor = segmentingLineColor; 113 | } 114 | } 115 | return view; 116 | } 117 | 118 | 119 | //头部试图的大小 120 | -(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section{ 121 | return CGSizeMake(50, 60); 122 | } 123 | 124 | -(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForFooterInSection:(NSInteger)section{ 125 | return CGSizeMake(50, 1); 126 | } 127 | 128 | //设置每个item的尺寸 129 | - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { 130 | CGFloat col = 4; 131 | CGFloat itemWidth = (self.bounds.size.width - self.layout.sectionInset.left - self.layout.sectionInset.right - (col-1)*self.layout.minimumInteritemSpacing)/col; 132 | return CGSizeMake(itemWidth, 30); 133 | } 134 | 135 | 136 | //cell的点击事件 137 | -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ 138 | //cell被电击后移动的动画 139 | MoreChooseDataModel *sectionItems = [self.dataArr objectAtIndex:indexPath.section]; 140 | MoreChooseItemModel *item = [sectionItems.items objectAtIndex:indexPath.row]; 141 | if (sectionItems.radio) { 142 | for (MoreChooseItemModel *item in sectionItems.items) { 143 | item.seleted = NO; 144 | } 145 | } 146 | item.seleted = !item.seleted; 147 | [self.collectionView reloadData]; 148 | } 149 | 150 | - (void)resetClick{ 151 | for (MoreChooseDataModel *sectionsModel in self.dataArr) { 152 | for (MoreChooseItemModel *model in sectionsModel.items) { 153 | model.seleted = NO; 154 | } 155 | } 156 | [self.collectionView reloadData]; 157 | } 158 | 159 | - (void)sureClick{ 160 | [PopView hidenPopView]; 161 | } 162 | 163 | - (UIView *)toolView{ 164 | if (_toolView == nil) { 165 | _toolView = [[UIView alloc] initWithFrame:CGRectMake(0, self.bounds.size.height - 60, self.bounds.size.width, 60)]; 166 | UIButton *resetBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 167 | [resetBtn setTitle:@"重置" forState:UIControlStateNormal]; 168 | [resetBtn addTarget:self action:@selector(resetClick) forControlEvents:UIControlEventTouchUpInside]; 169 | CGFloat margin = 10; 170 | resetBtn.frame = CGRectMake(margin, margin, self.bounds.size.width/2 - 2*margin, _toolView.bounds.size.height - 2*margin); 171 | resetBtn.backgroundColor = [UIColor colorWithRed:245.0/255 green:245.0/255 blue:245.0/255 alpha:1]; 172 | [resetBtn setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal]; 173 | [_toolView addSubview:resetBtn]; 174 | resetBtn.layer.cornerRadius = 2; 175 | 176 | UIButton *sureBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 177 | [sureBtn setTitle:@"确定" forState:UIControlStateNormal]; 178 | [sureBtn addTarget:self action:@selector(sureClick) forControlEvents:UIControlEventTouchUpInside]; 179 | sureBtn.frame = CGRectMake(self.bounds.size.width/2 + margin, margin, self.bounds.size.width/2 - 2*margin, _toolView.bounds.size.height - 2*margin); 180 | sureBtn.backgroundColor = [UIColor colorWithRed:99/255.0 green:213/255.0 blue:99/255.0 alpha:1];; 181 | [_toolView addSubview:sureBtn]; 182 | sureBtn.layer.cornerRadius = 2; 183 | 184 | 185 | UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, segmentingLineHeight)]; 186 | [_toolView addSubview:lineView]; 187 | lineView.backgroundColor = segmentingLineColor; 188 | } 189 | return _toolView; 190 | } 191 | 192 | - (UICollectionView *)collectionView{ 193 | if (_collectionView == nil) { 194 | UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc]init]; 195 | layout.minimumInteritemSpacing = 10; 196 | layout.minimumLineSpacing = 15; 197 | layout.sectionInset = UIEdgeInsetsMake(0, 15, 20, 15); 198 | self.layout = layout; 199 | 200 | 201 | _collectionView=[[UICollectionView alloc]initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height - self.toolView.bounds.size.height) collectionViewLayout:layout]; 202 | _collectionView.backgroundColor=[UIColor whiteColor]; 203 | _collectionView.delegate=self; 204 | _collectionView.dataSource=self; 205 | [_collectionView registerClass:[MoreChooseViewCellectionCell class] forCellWithReuseIdentifier:@"MoreChooseViewCellectionCell"]; 206 | [_collectionView registerClass:[UICollectionReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"CollectionReusableView"]; 207 | [_collectionView registerClass:[UICollectionReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionFooter withReuseIdentifier:@"CollectionReusableView"]; 208 | 209 | } 210 | return _collectionView; 211 | } 212 | 213 | - (NSArray *)dataArr{ 214 | if (_dataArr == nil) { 215 | NSString *path = [[NSBundle mainBundle] pathForResource:@"moreFilter" ofType:@"plist"]; 216 | NSArray *arr = [NSArray arrayWithContentsOfFile:path]; 217 | NSMutableArray *dataArr = [[NSMutableArray alloc] init]; 218 | for (NSDictionary *sectionDict in arr) { 219 | MoreChooseDataModel *sections = [[MoreChooseDataModel alloc] init]; 220 | sections.type = sectionDict[@"type"]; 221 | sections.radio = [sectionDict[@"radio"] boolValue]; 222 | NSArray *items = sectionDict[@"items"]; 223 | NSMutableArray *itemsArr = [[NSMutableArray alloc] init]; 224 | for (NSDictionary *itemDict in items) { 225 | MoreChooseItemModel *item = [[MoreChooseItemModel alloc] init]; 226 | item.itemName = itemDict[@"itemName"]; 227 | item.seleted = [itemDict[@"seleted"] boolValue]; 228 | [itemsArr addObject:item]; 229 | } 230 | sections.items = itemsArr; 231 | [dataArr addObject:sections]; 232 | } 233 | _dataArr = dataArr; 234 | } 235 | return _dataArr; 236 | } 237 | @end 238 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderBelowViewDemo/PopSliderBelowStaticVar.h: -------------------------------------------------------------------------------- 1 | // 2 | // PopSliderBelowStaticVar.h 3 | // PopView 4 | // 5 | // Created by apple on 2018/3/10. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | #define segmentingLineHeight 0.3 13 | #define segmentingLineColor [UIColor lightGrayColor] 14 | 15 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderBelowViewDemo/PopSliderBelowStaticVar.m: -------------------------------------------------------------------------------- 1 | // 2 | // PopSliderBelowStaticVar.m 3 | // PopView 4 | // 5 | // Created by apple on 2018/3/10. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import "PopSliderBelowStaticVar.h" 10 | 11 | 12 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderBelowViewDemo/PriceChooseToolView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PriceChooseToolView.h 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/9. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PriceChooseToolView : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderBelowViewDemo/PriceChooseToolView.m: -------------------------------------------------------------------------------- 1 | // 2 | // PriceChooseToolView.m 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/9. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import "PriceChooseToolView.h" 10 | #import "PopView.h" 11 | 12 | @interface PriceChooseToolView() 13 | @property (weak, nonatomic) IBOutlet UIButton *sureBtn; 14 | 15 | @end 16 | @implementation PriceChooseToolView 17 | 18 | - (void)awakeFromNib{ 19 | [super awakeFromNib]; 20 | self.sureBtn.layer.cornerRadius = 2; 21 | } 22 | - (IBAction)sureClick{ 23 | [PopView hidenPopView]; 24 | } 25 | @end 26 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderBelowViewDemo/PriceChooseToolView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 25 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderBelowViewDemo/PriceChooseView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PriceChooseView.h 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/9. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PriceChooseView : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderBelowViewDemo/PriceChooseView.m: -------------------------------------------------------------------------------- 1 | // 2 | // PriceChooseView.m 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/9. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import "PriceChooseView.h" 10 | #import "PriceChooseToolView.h" 11 | #import "PopSliderBelowStaticVar.h" 12 | #import "PopView.h" 13 | 14 | 15 | @interface PriceChooseView() 16 | @property (nonatomic ,strong) UITableView *tableView; 17 | @property (nonatomic ,copy) NSArray *titles; 18 | 19 | @property (nonatomic ,strong) PriceChooseToolView *toolView; 20 | @property (nonatomic ,assign) NSInteger selectedIndex; 21 | 22 | 23 | @end 24 | 25 | @implementation PriceChooseView 26 | 27 | - (instancetype)initWithFrame:(CGRect)frame 28 | { 29 | self = [super initWithFrame:frame]; 30 | if (self) { 31 | [self addSubview:self.tableView]; 32 | [self addSubview:self.toolView]; 33 | self.selectedIndex = 0; 34 | } 35 | return self; 36 | } 37 | 38 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 39 | static NSString *cellIdentifier = @"cellIdentifier"; 40 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; 41 | UILabel *titleLabel = [cell.contentView viewWithTag:999]; 42 | if (cell == nil) { 43 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellIdentifier]; 44 | 45 | titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, self.bounds.size.width, 43)]; 46 | [cell.contentView addSubview:titleLabel]; 47 | titleLabel.tag = 999; 48 | } 49 | titleLabel.text = [self.titles objectAtIndex:indexPath.row]; 50 | titleLabel.textColor = self.selectedIndex == indexPath.row ? [UIColor redColor] : [UIColor blackColor]; 51 | UIImageView *accessoryView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"selected_icon"]]; 52 | cell.accessoryView = self.selectedIndex==indexPath.row ? accessoryView : nil; 53 | return cell; 54 | } 55 | 56 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 57 | return self.titles.count; 58 | } 59 | 60 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 61 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 62 | self.selectedIndex = indexPath.row; 63 | [self.tableView reloadData]; 64 | } 65 | 66 | 67 | 68 | - (UITableView *)tableView{ 69 | if (_tableView == nil) { 70 | _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height - self.toolView.bounds.size.height) style:UITableViewStylePlain]; 71 | _tableView.delegate = self; 72 | _tableView.dataSource = self; 73 | _tableView.rowHeight = 44; 74 | } 75 | return _tableView; 76 | } 77 | - (PriceChooseToolView *)toolView{ 78 | if (_toolView == nil) { 79 | _toolView = [[NSBundle mainBundle] loadNibNamed:@"PriceChooseToolView" owner:nil options:nil].firstObject; 80 | _toolView.frame = CGRectMake(0, self.bounds.size.height - 50, self.bounds.size.width, 50); 81 | 82 | UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, segmentingLineHeight)]; 83 | [_toolView addSubview:lineView]; 84 | lineView.backgroundColor = [UIColor darkGrayColor]; 85 | } 86 | return _toolView; 87 | } 88 | - (NSArray *)titles{ 89 | if (_titles == nil) { 90 | _titles = @[@"不限",@"1000元以下",@"1000-1500元",@"1500-1800元",@"1800-2000元",@"2000-2500元",@"2500-3000元",@"3000-4000元",@"4000-5000元",@"5000-6000元"]; 91 | } 92 | return _titles; 93 | } 94 | 95 | 96 | @end 97 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderBelowViewDemo/RegionChooseView.h: -------------------------------------------------------------------------------- 1 | // 2 | // RegionChooseView.h 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/9. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RegionChooseView : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderBelowViewDemo/RegionChooseView.m: -------------------------------------------------------------------------------- 1 | // 2 | // RegionChooseView.m 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/9. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import "RegionChooseView.h" 10 | #import "PopSliderBelowStaticVar.h" 11 | #import "PopView.h" 12 | 13 | @interface RegionChooseView() 14 | @property (nonatomic ,strong) UITableView *leftTableView; 15 | @property (nonatomic ,strong) UITableView *rightTableView; 16 | @property (nonatomic ,strong) UIView *toolView; 17 | 18 | 19 | @property (nonatomic ,copy) NSArray *leftArr; 20 | @property (nonatomic ,copy) NSArray *rightArr; 21 | 22 | @property (nonatomic ,assign) NSInteger selectLeftIndex; 23 | @property (nonatomic ,assign) NSInteger selectRightIndex; 24 | 25 | @end 26 | @implementation RegionChooseView 27 | - (instancetype)initWithFrame:(CGRect)frame 28 | { 29 | self = [super initWithFrame:frame]; 30 | if (self) { 31 | [self addSubview:self.leftTableView]; 32 | [self addSubview:self.rightTableView]; 33 | [self addSubview:self.toolView]; 34 | self.selectLeftIndex = 0; 35 | } 36 | return self; 37 | } 38 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 39 | static NSString *cellIdentifier = @"cellIdentifier"; 40 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; 41 | UILabel *titleLabel = [cell.contentView viewWithTag:999]; 42 | if (cell == nil) { 43 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellIdentifier]; 44 | cell.backgroundColor = [UIColor clearColor]; 45 | 46 | titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, self.bounds.size.width, 43)]; 47 | [cell.contentView addSubview:titleLabel]; 48 | titleLabel.tag = 999; 49 | } 50 | 51 | if (tableView == self.leftTableView) { 52 | titleLabel.text = [self.leftArr objectAtIndex:indexPath.row]; 53 | if (self.selectLeftIndex == indexPath.row) { 54 | titleLabel.textColor = [UIColor redColor] ; 55 | cell.accessoryView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"arrow_seletedIcon"]]; 56 | }else{ 57 | titleLabel.textColor = [UIColor blackColor]; 58 | cell.accessoryView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"arrow_icon"]]; 59 | } 60 | }else{ 61 | NSArray *sectionDetailArr = [self.rightArr objectAtIndex:self.selectLeftIndex]; 62 | titleLabel.text = [sectionDetailArr objectAtIndex:indexPath.row]; 63 | titleLabel.textColor = self.selectRightIndex == indexPath.row ? [UIColor redColor] : [UIColor blackColor]; 64 | cell.accessoryView = nil; 65 | } 66 | return cell; 67 | } 68 | 69 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 70 | if (tableView == self.leftTableView) { 71 | return self.leftArr.count; 72 | }else{ 73 | return [self.rightArr objectAtIndex:self.selectLeftIndex].count; 74 | } 75 | } 76 | 77 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 78 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 79 | if (tableView == self.leftTableView) { 80 | self.selectLeftIndex = indexPath.row; 81 | self.selectRightIndex = 0; 82 | [self.leftTableView reloadData]; 83 | [self.rightTableView reloadData]; 84 | }else if (tableView == self.rightTableView){ 85 | self.selectRightIndex = indexPath.row; 86 | [self.rightTableView reloadData]; 87 | } 88 | } 89 | - (void)resetClick{ 90 | 91 | } 92 | 93 | - (void)sureClick{ 94 | [PopView hidenPopView]; 95 | } 96 | 97 | - (UITableView *)rightTableView{ 98 | if (_rightTableView == nil) { 99 | _rightTableView = [[UITableView alloc] initWithFrame:self.bounds style:UITableViewStylePlain]; 100 | _rightTableView.frame = CGRectMake(self.bounds.size.width/2, 0, self.bounds.size.width/2, self.bounds.size.height - self.toolView.bounds.size.height); 101 | _rightTableView.delegate = self; 102 | _rightTableView.dataSource = self; 103 | _rightTableView.backgroundColor = [UIColor colorWithRed:242.0/255 green:242.0/255 blue:242.0/255 alpha:1]; 104 | 105 | } 106 | return _rightTableView; 107 | } 108 | 109 | - (UITableView *)leftTableView{ 110 | if (_leftTableView == nil) { 111 | _leftTableView = [[UITableView alloc] initWithFrame:self.bounds style:UITableViewStylePlain]; 112 | _leftTableView.frame = CGRectMake(0, 0, self.bounds.size.width/2, self.bounds.size.height - self.toolView.bounds.size.height); 113 | _leftTableView.delegate = self; 114 | _leftTableView.dataSource = self; 115 | _leftTableView.backgroundColor = [UIColor clearColor]; 116 | _leftTableView.showsVerticalScrollIndicator = NO; 117 | _leftTableView.tableFooterView = [UIView new]; 118 | } 119 | return _leftTableView; 120 | } 121 | - (NSArray *)leftArr{ 122 | if (_leftArr == nil) { 123 | _leftArr = @[ 124 | @"区域", 125 | @"地铁", 126 | @"附近" 127 | ]; 128 | } 129 | return _leftArr; 130 | } 131 | - (NSArray *)rightArr{ 132 | if (_rightArr == nil) { 133 | NSArray *arr1 = @[@"不限",@"南山",@"福田",@"罗湖",@"龙岗",@"龙华",@"宝安",@"坪山",@"盐田"]; 134 | NSArray *arr2 = @[@"1号线",@"2号线",@"3号线",@"4号线",@"5号线",@"7号线",@"9号线",@"11号线"]; 135 | NSArray *arr3 = @[@"不限",@"1000米内",@"2000米内",@"3000米内",@"4000米内"]; 136 | _rightArr = @[ 137 | arr1, 138 | arr2, 139 | arr3 140 | ]; 141 | } 142 | return _rightArr; 143 | } 144 | 145 | - (UIView *)toolView{ 146 | if (_toolView == nil) { 147 | _toolView = [[UIView alloc] initWithFrame:CGRectMake(0, self.bounds.size.height - 60, self.bounds.size.width, 60)]; 148 | UIButton *resetBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 149 | [resetBtn setTitle:@"重置" forState:UIControlStateNormal]; 150 | [resetBtn addTarget:self action:@selector(resetClick) forControlEvents:UIControlEventTouchUpInside]; 151 | CGFloat margin = 10; 152 | resetBtn.frame = CGRectMake(margin, margin, self.bounds.size.width/2 - 2*margin, _toolView.bounds.size.height - 2*margin); 153 | resetBtn.backgroundColor = [UIColor colorWithRed:245.0/255 green:245.0/255 blue:245.0/255 alpha:1]; 154 | [resetBtn setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal]; 155 | [_toolView addSubview:resetBtn]; 156 | resetBtn.layer.cornerRadius = 2; 157 | 158 | UIButton *sureBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 159 | [sureBtn setTitle:@"确定" forState:UIControlStateNormal]; 160 | [sureBtn addTarget:self action:@selector(sureClick) forControlEvents:UIControlEventTouchUpInside]; 161 | sureBtn.frame = CGRectMake(self.bounds.size.width/2 + margin, margin, self.bounds.size.width/2 - 2*margin, _toolView.bounds.size.height - 2*margin); 162 | sureBtn.backgroundColor = [UIColor colorWithRed:99/255.0 green:213/255.0 blue:99/255.0 alpha:1];; 163 | [_toolView addSubview:sureBtn]; 164 | sureBtn.layer.cornerRadius = 2; 165 | 166 | 167 | UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, 0.3)]; 168 | [_toolView addSubview:lineView]; 169 | lineView.backgroundColor = [UIColor lightGrayColor]; 170 | 171 | 172 | } 173 | return _toolView; 174 | } 175 | @end 176 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderViewDemo/ConditionFilterView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ConditionFilterView.h 3 | // PopView 4 | // 5 | // Created by apple on 2018/2/28. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ConditionFilterView : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderViewDemo/ConditionFilterView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ConditionFilterView.m 3 | // PopView 4 | // 5 | // Created by apple on 2018/2/28. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import "ConditionFilterView.h" 10 | 11 | @implementation ConditionFilterView 12 | 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderViewDemo/CusttomDatePickView.h: -------------------------------------------------------------------------------- 1 | // 2 | // CusttomDatePickView.h 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/1. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CusttomDatePickView : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderViewDemo/CusttomDatePickView.m: -------------------------------------------------------------------------------- 1 | // 2 | // CusttomDatePickView.m 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/1. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import "CusttomDatePickView.h" 10 | #import "PopView.h" 11 | 12 | @implementation CusttomDatePickView 13 | 14 | - (IBAction)closeClick:(id)sender { 15 | [PopView hidenPopView]; 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderViewDemo/CusttomDatePickView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 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 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderViewDemo/LoginView.h: -------------------------------------------------------------------------------- 1 | // 2 | // LoginView.h 3 | // PopView 4 | // 5 | // Created by apple on 2018/2/28. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LoginView : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderViewDemo/LoginView.m: -------------------------------------------------------------------------------- 1 | // 2 | // LoginView.m 3 | // PopView 4 | // 5 | // Created by apple on 2018/2/28. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import "LoginView.h" 10 | #import "PopView.h" 11 | #import "RegisterView.h" 12 | 13 | @implementation LoginView 14 | - (IBAction)closeClick:(id)sender { 15 | [PopView hidenPopView]; 16 | } 17 | - (IBAction)forgetPWClick:(id)sender { 18 | RegisterView *registerView = [[NSBundle mainBundle] loadNibNamed:@"RegisterView" owner:nil options:nil].firstObject; 19 | registerView.center = self.center; 20 | PopView *popView = [PopView getCurrentPopView]; 21 | [UIView transitionWithView:popView.popContainerView duration:0.65 options:UIViewAnimationOptionTransitionFlipFromLeft animations:^{ 22 | [popView.popContainerView addSubview:registerView]; 23 | [self removeFromSuperview]; 24 | } completion:^(BOOL finished) { 25 | }]; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderViewDemo/LoginView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 47 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 76 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderViewDemo/QZoneView.h: -------------------------------------------------------------------------------- 1 | // 2 | // QZoneView.h 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/1. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface QZoneView : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderViewDemo/QZoneView.m: -------------------------------------------------------------------------------- 1 | // 2 | // QZoneView.m 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/1. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import "QZoneView.h" 10 | #import "YLButton.h" 11 | #import "PopView.h" 12 | 13 | @interface QZoneView() 14 | @property (weak, nonatomic) IBOutlet YLButton *photeBtn; 15 | @property (weak, nonatomic) IBOutlet YLButton *videoBtn; 16 | @property (weak, nonatomic) IBOutlet YLButton *signBtn; 17 | @property (weak, nonatomic) IBOutlet YLButton *faceBtn; 18 | @property (weak, nonatomic) IBOutlet YLButton *messageBtn; 19 | 20 | @end 21 | @implementation QZoneView 22 | - (IBAction)closeBtnClick:(id)sender { 23 | [PopView hidenPopView]; 24 | } 25 | 26 | 27 | 28 | - (void)layoutSubviews{ 29 | [super layoutSubviews]; 30 | [self.photeBtn setImageRect:CGRectMake(0, 0, 60, 60)]; 31 | [self.photeBtn setTitleRect:CGRectMake(0, 60, 60, 20)]; 32 | self.photeBtn.titleLabel.textAlignment = NSTextAlignmentCenter; 33 | self.photeBtn.imageView.contentMode = UIViewContentModeCenter; 34 | 35 | [self.videoBtn setImageRect:CGRectMake(0, 0, 60, 60)]; 36 | [self.videoBtn setTitleRect:CGRectMake(0, 60, 60, 20)]; 37 | self.videoBtn.titleLabel.textAlignment = NSTextAlignmentCenter; 38 | self.videoBtn.imageView.contentMode = UIViewContentModeCenter; 39 | 40 | 41 | [self.signBtn setImageRect:CGRectMake(0, 0, 60, 60)]; 42 | [self.signBtn setTitleRect:CGRectMake(0, 60, 60, 20)]; 43 | self.signBtn.titleLabel.textAlignment = NSTextAlignmentCenter; 44 | self.signBtn.imageView.contentMode = UIViewContentModeCenter; 45 | 46 | 47 | [self.faceBtn setImageRect:CGRectMake(0, 0, 60, 60)]; 48 | [self.faceBtn setTitleRect:CGRectMake(0, 60, 60, 20)]; 49 | self.faceBtn.titleLabel.textAlignment = NSTextAlignmentCenter; 50 | self.faceBtn.imageView.contentMode = UIViewContentModeCenter; 51 | 52 | 53 | [self.messageBtn setImageRect:CGRectMake(0, 0, 60, 60)]; 54 | [self.messageBtn setTitleRect:CGRectMake(0, 60, 60, 20)]; 55 | self.messageBtn.titleLabel.textAlignment = NSTextAlignmentCenter; 56 | self.messageBtn.imageView.contentMode = UIViewContentModeCenter; 57 | 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderViewDemo/QZoneView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 30 | 36 | 47 | 54 | 61 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderViewDemo/RegisterView.h: -------------------------------------------------------------------------------- 1 | // 2 | // RegisterView.h 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/7. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RegisterView : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderViewDemo/RegisterView.m: -------------------------------------------------------------------------------- 1 | // 2 | // RegisterView.m 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/7. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import "RegisterView.h" 10 | #import "PopView.h" 11 | #import "LoginView.h" 12 | 13 | @implementation RegisterView 14 | - (IBAction)backClick:(id)sender { 15 | LoginView *loginView = [[NSBundle mainBundle] loadNibNamed:@"LoginView" owner:nil options:nil].firstObject; 16 | loginView.center = self.center; 17 | PopView *popView = [PopView getCurrentPopView]; 18 | [UIView transitionWithView:popView.popContainerView duration:0.65 options:UIViewAnimationOptionTransitionFlipFromRight animations:^{ 19 | [popView.popContainerView addSubview:loginView]; 20 | [self removeFromSuperview]; 21 | } completion:^(BOOL finished) { 22 | }]; 23 | } 24 | 25 | 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderViewDemo/RegisterView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 33 | 41 | 47 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderViewDemo/SharePanelView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SharePanelView.h 3 | // PopView 4 | // 5 | // Created by apple on 2018/2/28. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SharePanelView : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderViewDemo/SharePanelView.m: -------------------------------------------------------------------------------- 1 | // 2 | // SharePanelView.m 3 | // PopView 4 | // 5 | // Created by apple on 2018/2/28. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import "SharePanelView.h" 10 | #import "YLButton.h" 11 | #import "PopView.h" 12 | 13 | @interface SharePanelView() 14 | @property (weak, nonatomic) IBOutlet YLButton *qqBtn; 15 | @property (weak, nonatomic) IBOutlet YLButton *weichatBtn; 16 | @property (weak, nonatomic) IBOutlet YLButton *weiboBtn; 17 | 18 | @end 19 | @implementation SharePanelView 20 | - (IBAction)cancelBtnClick:(id)sender { 21 | [PopView hidenPopView]; 22 | } 23 | 24 | - (void)layoutSubviews{ 25 | [super layoutSubviews]; 26 | [self.qqBtn setImageRect:CGRectMake(10, 10, 50, 50)]; 27 | [self.qqBtn setTitleRect:CGRectMake(0, 60, 60, 20)]; 28 | self.qqBtn.titleLabel.textAlignment = NSTextAlignmentCenter; 29 | 30 | [self.weichatBtn setImageRect:CGRectMake(10, 10, 50, 50)]; 31 | [self.weichatBtn setTitleRect:CGRectMake(0, 60, 60, 20)]; 32 | self.weichatBtn.titleLabel.textAlignment = NSTextAlignmentCenter; 33 | 34 | 35 | [self.weiboBtn setImageRect:CGRectMake(10, 10, 50, 50)]; 36 | [self.weiboBtn setTitleRect:CGRectMake(0, 60, 60, 20)]; 37 | self.weiboBtn.titleLabel.textAlignment = NSTextAlignmentCenter; 38 | } 39 | @end 40 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderViewDemo/SharePanelView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 26 | 37 | 44 | 55 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderViewDemo/SideLeftBarView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SideLeftBarView.h 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/1. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SideLeftBarView : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderViewDemo/SideLeftBarView.m: -------------------------------------------------------------------------------- 1 | // 2 | // SideLeftBarView.m 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/1. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import "SideLeftBarView.h" 10 | 11 | @implementation SideLeftBarView 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 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopSliderViewDemo/SideLeftBarView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 26 | 33 | 40 | 47 | 54 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopTableListView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PopTableListView.h 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/2/28. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PopTableListView : UIView 12 | - (instancetype)initWithTitles:(NSArray *)titles imgNames:(NSArray *)imgNames; 13 | @end 14 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/PopTableListView.m: -------------------------------------------------------------------------------- 1 | // 2 | // PopTableListView.m 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/2/28. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import "PopTableListView.h" 10 | 11 | 12 | @interface PopTableListView() 13 | @property (nonatomic ,strong) UITableView *tableView; 14 | @property (nonatomic ,copy) NSArray *titles; 15 | @property (nonatomic ,copy) NSArray *imgNames; 16 | 17 | @end 18 | @implementation PopTableListView 19 | - (instancetype)initWithTitles:(NSArray *)titles imgNames:(NSArray *)imgNames 20 | { 21 | CGRect frame = CGRectMake(0, 0, 150, titles.count*44); 22 | self = [super initWithFrame:frame]; 23 | if (self) { 24 | self.titles = titles; 25 | self.imgNames = imgNames; 26 | 27 | [self addSubview:self.tableView]; 28 | } 29 | return self; 30 | } 31 | 32 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 33 | static NSString *cellIdentifier = @"cellIdentifier"; 34 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; 35 | if (cell == nil) { 36 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellIdentifier]; 37 | cell.backgroundColor = [UIColor clearColor]; 38 | cell.textLabel.textColor = [UIColor whiteColor]; 39 | UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0, 43.5, 150, .5)]; 40 | lineView.backgroundColor = [UIColor lightGrayColor]; 41 | [cell.contentView addSubview:lineView]; 42 | } 43 | cell.textLabel.text = [self.titles objectAtIndex:indexPath.row]; 44 | if (self.imgNames.count>indexPath.row) { 45 | cell.imageView.image = [UIImage imageNamed:self.imgNames[indexPath.row]]; 46 | } 47 | return cell; 48 | } 49 | 50 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 51 | return self.titles.count; 52 | } 53 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 54 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 55 | } 56 | 57 | 58 | 59 | 60 | - (UITableView *)tableView{ 61 | if (_tableView == nil) { 62 | _tableView = [[UITableView alloc] initWithFrame:self.bounds style:UITableViewStylePlain]; 63 | _tableView.delegate = self; 64 | _tableView.dataSource = self; 65 | _tableView.backgroundColor = [UIColor clearColor]; 66 | _tableView.scrollEnabled = NO; 67 | _tableView.showsVerticalScrollIndicator = NO; 68 | _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; 69 | } 70 | return _tableView; 71 | } 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/YLButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // YLButton.h 3 | // iPad-Education 4 | // 5 | // Created by Sumbo on 2017/10/19. 6 | // Copyright © 2017年 iLaihua. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface YLButton : UIButton 12 | /* 13 | *提示:先设置titleRect和imageRect,再设置frame,否则iOS9.0会有布局问题 14 | */ 15 | @property (nonatomic,assign) CGRect titleRect; 16 | @property (nonatomic,assign) CGRect imageRect; 17 | @end 18 | -------------------------------------------------------------------------------- /PopView/PopView/CustomView/YLButton.m: -------------------------------------------------------------------------------- 1 | // 2 | // YLButton.m 3 | // iPad-Education 4 | // 5 | // Created by Sumbo on 2017/10/19. 6 | // Copyright © 2017年 iLaihua. All rights reserved. 7 | // 8 | 9 | #import "YLButton.h" 10 | 11 | @implementation YLButton 12 | - (CGRect)titleRectForContentRect:(CGRect)contentRect{ 13 | if (!CGRectIsEmpty(self.titleRect) && !CGRectEqualToRect(self.titleRect, CGRectZero)) { 14 | return self.titleRect; 15 | } 16 | return [super titleRectForContentRect:contentRect]; 17 | } 18 | 19 | - (CGRect)imageRectForContentRect:(CGRect)contentRect{ 20 | 21 | if (!CGRectIsEmpty(self.imageRect) && !CGRectEqualToRect(self.imageRect, CGRectZero)) { 22 | return self.imageRect; 23 | } 24 | return [super imageRectForContentRect:contentRect]; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /PopView/PopView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /PopView/PopView/PopListViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PopListViewController.h 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/8. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PopListViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /PopView/PopView/PopListViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // PopListViewController.m 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/8. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import "PopListViewController.h" 10 | #import "PopView.h" 11 | #import "PopTableListView.h" 12 | 13 | @interface PopListViewController () 14 | @property (nonatomic ,strong) UIView *midContentView; 15 | @property (nonatomic ,strong) PopTableListView *popListView; 16 | @end 17 | 18 | @implementation PopListViewController 19 | 20 | #define popColor [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:1.0] 21 | - (void)viewDidLoad { 22 | [super viewDidLoad]; 23 | self.title = @"可设置任意View"; 24 | 25 | } 26 | 27 | - (void)closePopView{ 28 | [PopView hidenPopView]; 29 | } 30 | 31 | - (IBAction)downClick:(id)sender { 32 | PopView *popView = [PopView popUpContentView:self.popListView direct:PopViewDirection_PopUpBottom onView:sender]; 33 | popView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3]; 34 | } 35 | 36 | - (IBAction)rightClick:(id)sender { 37 | UIImageView *triangleView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"elementSelect_icon"]]; 38 | triangleView.bounds = CGRectMake(0, 0, triangleView.image.size.width*1.5, triangleView.image.size.height*1.5); 39 | PopView *popView = [PopView popUpContentView:self.popListView direct:PopViewDirection_PopUpRight onView:sender offset:60 triangleView:triangleView animation:YES]; 40 | popView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3]; 41 | self.popListView = nil; 42 | } 43 | 44 | - (IBAction)upClick:(id)sender { 45 | [PopView popUpContentView:self.popListView direct:PopViewDirection_PopUpTop onView:sender]; 46 | } 47 | 48 | - (IBAction)leftClick:(id)sender { 49 | PopView *popView = [PopView popUpContentView:self.popListView direct:PopViewDirection_PopUpLeft onView:sender]; 50 | popView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3]; 51 | } 52 | 53 | - (IBAction)midClick:(id)sender { 54 | PopView *popView = [PopView popUpContentView:self.midContentView direct:PopViewDirection_PopUpNone onView:sender]; 55 | popView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3]; 56 | popView.clickOutHidden = NO; 57 | } 58 | 59 | - (PopTableListView *)popListView{ 60 | if (_popListView == nil) { 61 | _popListView = [[PopTableListView alloc] initWithTitles:@[@"扫一扫",@"加好友",@"收付款",@"删除"] imgNames:@[@"saoyisao_icon",@"addFriend_icon",@"payMoney_icon",@"delete_icon"]]; 62 | _popListView.backgroundColor = popColor; 63 | _popListView.layer.cornerRadius = 5; 64 | } 65 | return _popListView; 66 | } 67 | 68 | - (UIView *)midContentView{ 69 | if (_midContentView == nil) { 70 | _midContentView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 265, 300)]; 71 | 72 | UIImageView *contentView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 15, 250, 285)]; 73 | [_midContentView addSubview:contentView]; 74 | contentView.backgroundColor = [UIColor yellowColor]; 75 | [contentView setImage:[UIImage imageNamed:@"liudehua.jpg"]]; 76 | 77 | UIButton *closeBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 78 | [_midContentView addSubview:closeBtn]; 79 | closeBtn.frame = CGRectMake(230, 0, 30, 30); 80 | closeBtn.backgroundColor = [UIColor whiteColor]; 81 | closeBtn.layer.cornerRadius = 5; 82 | [closeBtn setImage:[UIImage imageNamed:@"videoTip_close_button_vc"] forState:UIControlStateNormal]; 83 | [closeBtn addTarget:self action:@selector(closePopView) forControlEvents:UIControlEventTouchUpInside]; 84 | } 85 | return _midContentView; 86 | } 87 | @end 88 | -------------------------------------------------------------------------------- /PopView/PopView/PopSiderViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PopSiderViewController.h 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/8. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PopSiderViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /PopView/PopView/PopSiderViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // PopSiderViewController.m 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/8. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import "PopSiderViewController.h" 10 | #import "PopView.h" 11 | #import "PopTableListView.h" 12 | #import "SharePanelView.h" 13 | #import "ConditionFilterView.h" 14 | #import "LoginView.h" 15 | #import "QZoneView.h" 16 | #import "CusttomDatePickView.h" 17 | #import "SideLeftBarView.h" 18 | 19 | @interface PopSiderViewController () 20 | @property (nonatomic ,strong) SharePanelView *sharePanelView; 21 | @property (nonatomic ,strong) ConditionFilterView *filterView; 22 | @property (nonatomic ,strong) LoginView *loginView; 23 | @property (nonatomic ,strong) QZoneView *qzoneView; 24 | @property (nonatomic ,strong) CusttomDatePickView *datePickView; 25 | @property (nonatomic ,strong) SideLeftBarView *sideLeftView; 26 | @end 27 | 28 | @implementation PopSiderViewController 29 | - (void)viewDidLoad { 30 | [super viewDidLoad]; 31 | 32 | } 33 | 34 | - (IBAction)customCenterAnimation:(id)sender { 35 | CABasicAnimation *showAnima = [CABasicAnimation animationWithKeyPath:@"transform"]; 36 | showAnima.duration = 0.25; 37 | showAnima.fillMode = kCAFillModeForwards; 38 | showAnima.removedOnCompletion = YES; 39 | CATransform3D tofrom = CATransform3DMakeScale(1, 1, 1); 40 | CATransform3D from = CATransform3DMakeScale(0, 0, 1); 41 | showAnima.fromValue = [NSValue valueWithCATransform3D:from]; 42 | showAnima.toValue = [NSValue valueWithCATransform3D:tofrom]; 43 | 44 | 45 | CABasicAnimation *hidenAnima = [CABasicAnimation animationWithKeyPath:@"transform"]; 46 | hidenAnima.duration = 0.25; 47 | hidenAnima.fillMode = kCAFillModeForwards; 48 | CATransform3D tofrom1 = CATransform3DMakeScale(1, 0, 1); 49 | CATransform3D from1 = CATransform3DMakeScale(1, 1, 1); 50 | hidenAnima.fromValue = [NSValue valueWithCATransform3D:from1]; 51 | hidenAnima.toValue = [NSValue valueWithCATransform3D:tofrom1]; 52 | 53 | self.loginView.center = self.view.center; 54 | self.loginView.backgroundColor = [UIColor whiteColor]; 55 | PopView *popView = [PopView popContentView:self.loginView showAnimation:showAnima hidenAnimation:hidenAnima]; 56 | popView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3]; 57 | popView.clickOutHidden = NO; 58 | } 59 | 60 | - (IBAction)customAnimation:(id)sender { 61 | self.loginView.center = self.view.center; 62 | self.loginView.backgroundColor = [UIColor whiteColor]; 63 | PopView *popView = [PopView popSideContentView:self.loginView direct:PopViewDirection_SlideInCenter ]; 64 | popView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3]; 65 | popView.clickOutHidden = NO; 66 | } 67 | 68 | 69 | - (IBAction)customUpClick:(UIButton *)sender { 70 | PopView *popView = [PopView popSideContentView:self.qzoneView direct:PopViewDirection_SlideFromUp]; 71 | popView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3]; 72 | } 73 | 74 | - (IBAction)customLeftClick:(id)sender { 75 | PopView *popView = [PopView popSideContentView:self.sideLeftView direct:PopViewDirection_SlideFromLeft]; 76 | popView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3]; 77 | 78 | } 79 | - (IBAction)shareClick:(id)sender { 80 | PopView *popView = [PopView popSideContentView:self.sharePanelView direct:PopViewDirection_SlideFromBottom]; 81 | popView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3]; 82 | 83 | } 84 | - (IBAction)customRightClick:(id)sender { 85 | PopView *popView = [PopView popSideContentView:self.filterView direct:PopViewDirection_SlideFromRight]; 86 | popView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3]; 87 | } 88 | 89 | 90 | - (IBAction)datePickClick:(id)sender { 91 | PopView *popView = [PopView popSideContentView:self.datePickView direct:PopViewDirection_SlideFromBottom]; 92 | popView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3]; 93 | } 94 | 95 | 96 | - (SharePanelView *)sharePanelView{ 97 | if (_sharePanelView == nil) { 98 | _sharePanelView = [[NSBundle mainBundle] loadNibNamed:@"SharePanelView" owner:nil options:nil].firstObject; 99 | _sharePanelView.frame = CGRectMake(0, 0, self.view.bounds.size.width, 200); 100 | } 101 | return _sharePanelView; 102 | } 103 | 104 | - (ConditionFilterView *)filterView{ 105 | if (_filterView == nil) { 106 | _filterView = [[ConditionFilterView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width - 100, self.view.bounds.size.height)]; 107 | _filterView.backgroundColor = [UIColor redColor]; 108 | } 109 | return _filterView; 110 | } 111 | 112 | - (LoginView *)loginView{ 113 | if (_loginView == nil) { 114 | _loginView = [[NSBundle mainBundle] loadNibNamed:@"LoginView" owner:nil options:nil].firstObject; 115 | } 116 | return _loginView; 117 | } 118 | 119 | -(QZoneView *)qzoneView{ 120 | if (_qzoneView==nil) { 121 | _qzoneView = [[NSBundle mainBundle] loadNibNamed:@"QZoneView" owner:nil options:nil].firstObject; 122 | _qzoneView.frame = CGRectMake(0, 0, self.view.bounds.size.width, 280); 123 | } 124 | return _qzoneView; 125 | } 126 | -(CusttomDatePickView *)datePickView{ 127 | if (_datePickView==nil) { 128 | _datePickView = [[NSBundle mainBundle] loadNibNamed:@"CusttomDatePickView" owner:nil options:nil].firstObject; 129 | _datePickView.frame = CGRectMake(0, 0, self.view.bounds.size.width, 250); 130 | } 131 | return _datePickView; 132 | } 133 | - (SideLeftBarView *)sideLeftView{ 134 | if (_sideLeftView==nil) { 135 | _sideLeftView = [[NSBundle mainBundle] loadNibNamed:@"SideLeftBarView" owner:nil options:nil].firstObject; 136 | _sideLeftView.frame = CGRectMake(0, 0, self.view.bounds.size.width-100, self.view.bounds.size.height); 137 | } 138 | return _sideLeftView; 139 | } 140 | @end 141 | -------------------------------------------------------------------------------- /PopView/PopView/PopSliderBelowViewViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PopSliderBelowViewViewController.h 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/9. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PopSliderBelowViewViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /PopView/PopView/PopSliderBelowViewViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // PopSliderBelowViewViewController.m 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/9. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import "PopSliderBelowViewViewController.h" 10 | #import "PopView.h" 11 | #import "YLButton.h" 12 | #import "PopTableListView.h" 13 | #import "HouseConditionFilterView.h" 14 | #import "ConditionChooseListView.h" 15 | 16 | @interface PopSliderBelowViewViewController () 17 | @property (nonatomic ,strong) UITableView *tableView; 18 | 19 | @property (nonatomic ,strong) YLButton *ylTitleBtn; 20 | @property (nonatomic ,strong) ConditionChooseListView *chooseListView; 21 | @property (nonatomic ,strong) HouseConditionFilterView *houseFilterView; 22 | 23 | @end 24 | 25 | @implementation PopSliderBelowViewViewController 26 | 27 | - (void)viewDidLoad { 28 | [super viewDidLoad]; 29 | self.navigationItem.titleView = self.ylTitleBtn; 30 | [self.view addSubview:self.tableView]; 31 | [self.view addSubview:self.houseFilterView]; 32 | self.view.backgroundColor = [UIColor colorWithRed:242.0/255 green:242.0/255 blue:242.0/255 alpha:1]; 33 | self.tableView.contentInsetAdjustmentBehavior = NO; 34 | self.navigationController.navigationBar.backgroundColor = [UIColor clearColor]; 35 | 36 | __weak typeof(self) weakSelf = self; 37 | [self.chooseListView setChooseComplete:^(NSString *title) { 38 | [weakSelf.ylTitleBtn setTitle:title forState:UIControlStateNormal]; 39 | }]; 40 | } 41 | 42 | -(void)viewWillAppear:(BOOL)animated{ 43 | [super viewWillAppear:animated]; 44 | [self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; 45 | [self.navigationController.navigationBar setShadowImage:[UIImage new]]; 46 | } 47 | 48 | -(void)viewWillDisappear:(BOOL)animated{ 49 | [super viewWillDisappear:animated]; 50 | [self.navigationController.navigationBar setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault]; 51 | [self.navigationController.navigationBar setShadowImage:nil]; 52 | } 53 | 54 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 55 | static NSString *cellIdentifier = @"cellIdentifier"; 56 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; 57 | if (cell == nil) { 58 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellIdentifier]; 59 | } 60 | cell.imageView.image = [UIImage imageNamed:@"liudehua"]; 61 | cell.textLabel.text = @"这里是列表数据"; 62 | return cell; 63 | } 64 | 65 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 66 | return 20; 67 | } 68 | 69 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 70 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 71 | } 72 | //实现scrollView代理 73 | - (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset{ 74 | //竖直滑动时 判断是上滑还是下滑 75 | if(velocity.y>0){ 76 | //上滑 77 | [self.navigationController setNavigationBarHidden:YES animated:YES]; 78 | [UIView animateWithDuration:0.25 animations:^{ 79 | CGRect filterViewFrame = self.houseFilterView.frame; 80 | filterViewFrame.origin.y = 20; 81 | self.houseFilterView.frame = filterViewFrame; 82 | 83 | CGRect tableViewFrame = self.tableView.frame; 84 | tableViewFrame.origin.y = CGRectGetMaxY(filterViewFrame); 85 | tableViewFrame.size.height = self.view.frame.size.height - CGRectGetMaxY(filterViewFrame); 86 | self.tableView.frame = tableViewFrame; 87 | }]; 88 | }else{ 89 | //下滑 90 | [self.navigationController setNavigationBarHidden:NO animated:YES]; 91 | [UIView animateWithDuration:0.25 animations:^{ 92 | CGRect filterViewFrame = self.houseFilterView.frame; 93 | filterViewFrame.origin.y = 64; 94 | self.houseFilterView.frame = filterViewFrame; 95 | 96 | CGRect tableViewFrame = self.tableView.frame; 97 | tableViewFrame.origin.y = CGRectGetMaxY(filterViewFrame); 98 | tableViewFrame.size.height = self.view.frame.size.height - CGRectGetMaxY(filterViewFrame); 99 | self.tableView.frame = tableViewFrame; 100 | }]; 101 | } 102 | } 103 | 104 | 105 | 106 | -(void)chooseClick:(UIButton *)btn{ 107 | btn.selected = !btn.selected; 108 | if (btn.selected) { 109 | [UIView animateWithDuration:0.25 animations:^{ 110 | btn.imageView.transform = CGAffineTransformRotate(btn.transform, M_PI); 111 | }]; 112 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 64, self.view.bounds.size.width, 0)]; 113 | [self.view addSubview:view]; 114 | PopView *popView = [PopView popSideContentView:self.chooseListView belowView:view]; 115 | popView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.2]; 116 | [popView setDidRemovedFromeSuperView:^{ 117 | btn.selected = NO; 118 | [UIView animateWithDuration:0.25 animations:^{ 119 | btn.imageView.transform = CGAffineTransformIdentity; 120 | }]; 121 | }]; 122 | [view removeFromSuperview]; 123 | }else{ 124 | [UIView animateWithDuration:0.25 animations:^{ 125 | btn.imageView.transform = CGAffineTransformIdentity; 126 | }]; 127 | [PopView hidenPopView]; 128 | } 129 | } 130 | 131 | - (UITableView *)tableView{ 132 | if (_tableView == nil) { 133 | _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(self.houseFilterView.frame), self.view.bounds.size.width, self.view.frame.size.height - CGRectGetMaxY(self.houseFilterView.frame)) style:UITableViewStylePlain]; 134 | _tableView.delegate = self; 135 | _tableView.dataSource = self; 136 | _tableView.rowHeight = 80; 137 | _tableView.backgroundColor = [UIColor clearColor]; 138 | } 139 | return _tableView; 140 | } 141 | 142 | - (YLButton *)ylTitleBtn{ 143 | if (_ylTitleBtn == nil) { 144 | _ylTitleBtn = [YLButton buttonWithType:UIButtonTypeCustom]; 145 | _ylTitleBtn.frame = CGRectMake(0, 0, 100, 30); 146 | [_ylTitleBtn setTitle:@"选择" forState:UIControlStateNormal]; 147 | [_ylTitleBtn setImage:[UIImage imageNamed:@"triangle_icon"] forState:UIControlStateNormal]; 148 | [_ylTitleBtn setTitleRect:CGRectMake(0, 0, 70, 30)]; 149 | [_ylTitleBtn setImageRect:CGRectMake(70, 0, 30, 30)]; 150 | _ylTitleBtn.imageView.contentMode = UIViewContentModeCenter; 151 | [_ylTitleBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; 152 | _ylTitleBtn.titleLabel.textAlignment = NSTextAlignmentRight; 153 | [_ylTitleBtn addTarget:self action:@selector(chooseClick:) forControlEvents:UIControlEventTouchUpInside]; 154 | } 155 | return _ylTitleBtn; 156 | } 157 | 158 | - (ConditionChooseListView *)chooseListView{ 159 | if (_chooseListView == nil) { 160 | _chooseListView = [[ConditionChooseListView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 6*44)]; 161 | _chooseListView.backgroundColor = [UIColor whiteColor]; 162 | _chooseListView.layer.cornerRadius = 5; 163 | } 164 | return _chooseListView; 165 | } 166 | 167 | -(HouseConditionFilterView *)houseFilterView{ 168 | if (_houseFilterView==nil) { 169 | _houseFilterView = [[NSBundle mainBundle] loadNibNamed:@"HouseConditionFilterView" owner:nil options:nil].firstObject; 170 | _houseFilterView.frame = CGRectMake(0, 64, self.view.bounds.size.width, 50); 171 | } 172 | return _houseFilterView; 173 | } 174 | 175 | @end 176 | -------------------------------------------------------------------------------- /PopView/PopView/PopView/PopAnimationTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // PopAnimationTool.h 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/8. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PopView.h" 11 | 12 | @interface PopAnimationTool : NSObject 13 | + (CABasicAnimation *)getShowPopAnimationWithType:(PopViewDirection)popDirecton contentView:(UIView *)contentView belowView:(UIView *)belowView; 14 | + (CABasicAnimation *)getHidenPopAnimationWithType:(PopViewDirection)popDirecton contentView:(UIView *)contentView belowView:(UIView *)belowView; 15 | @end 16 | -------------------------------------------------------------------------------- /PopView/PopView/PopView/PopAnimationTool.m: -------------------------------------------------------------------------------- 1 | // 2 | // PopAnimationTool.m 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/3/8. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import "PopAnimationTool.h" 10 | 11 | @implementation PopAnimationTool 12 | + (CABasicAnimation *)getShowPopAnimationWithType:(PopViewDirection)popDirecton contentView:(UIView *)contentView belowView:(UIView *)belowView{ 13 | CABasicAnimation *showAnima = [CABasicAnimation animation]; 14 | showAnima.duration = animationDuration; 15 | showAnima.repeatCount = 1; 16 | showAnima.fillMode = kCAFillModeForwards; 17 | showAnima.removedOnCompletion = YES; 18 | 19 | 20 | CGFloat width = contentView.bounds.size.width; 21 | CGFloat height = contentView.bounds.size.height; 22 | CGFloat ScreenWidth = [UIScreen mainScreen].bounds.size.width; 23 | CGFloat ScreenHeight = [UIScreen mainScreen].bounds.size.height; 24 | 25 | switch (popDirecton) { 26 | case PopViewDirection_PopUpLeft: 27 | case PopViewDirection_PopUpRight: 28 | case PopViewDirection_PopUpTop: 29 | case PopViewDirection_PopUpBottom: 30 | case PopViewDirection_PopUpNone:{ 31 | showAnima.keyPath = @"transform"; 32 | CATransform3D tofrom = CATransform3DMakeScale(1, 1, 1); 33 | CATransform3D from = CATransform3DMakeScale(0, 0, 1); 34 | showAnima.fromValue = [NSValue valueWithCATransform3D:from]; 35 | showAnima.toValue = [NSValue valueWithCATransform3D:tofrom]; 36 | }break; 37 | case PopViewDirection_SlideInCenter:{ 38 | showAnima.keyPath = @"position"; 39 | showAnima.fromValue = [NSValue valueWithCGPoint:CGPointMake(ScreenWidth/2, -height/2)]; 40 | showAnima.toValue = [NSValue valueWithCGPoint:CGPointMake(ScreenWidth/2, ScreenHeight/2)]; 41 | showAnima.removedOnCompletion = YES; 42 | }break; 43 | case PopViewDirection_SlideFromLeft: 44 | showAnima.keyPath = @"position"; 45 | showAnima.fromValue = [NSValue valueWithCGPoint:CGPointMake(-width/2, ScreenHeight/2)]; 46 | showAnima.toValue = [NSValue valueWithCGPoint:CGPointMake(width/2, ScreenHeight/2)]; 47 | break; 48 | case PopViewDirection_SlideFromRight: 49 | showAnima.keyPath = @"position"; 50 | showAnima.fromValue = [NSValue valueWithCGPoint:CGPointMake(ScreenWidth+width/2, ScreenHeight/2)]; 51 | showAnima.toValue = [NSValue valueWithCGPoint:CGPointMake(ScreenWidth-width/2, ScreenHeight/2)]; 52 | break; 53 | case PopViewDirection_SlideFromUp: 54 | showAnima.keyPath = @"position"; 55 | showAnima.fromValue = [NSValue valueWithCGPoint:CGPointMake(ScreenWidth/2, -height/2)]; 56 | showAnima.toValue = [NSValue valueWithCGPoint:CGPointMake(ScreenWidth/2, height/2)]; 57 | break; 58 | case PopViewDirection_SlideFromBottom: 59 | showAnima.keyPath = @"position"; 60 | showAnima.fromValue = [NSValue valueWithCGPoint:CGPointMake(ScreenWidth/2, ScreenHeight+height/2)]; 61 | showAnima.toValue = [NSValue valueWithCGPoint:CGPointMake(ScreenWidth/2, ScreenHeight-height/2)]; 62 | break; 63 | case PopViewDirection_SlideBelowView: 64 | showAnima.keyPath = @"position"; 65 | showAnima.fromValue = [NSValue valueWithCGPoint:CGPointMake(belowView.bounds.size.width/2, -contentView.bounds.size.height/2)]; 66 | showAnima.toValue = [NSValue valueWithCGPoint:CGPointMake(belowView.bounds.size.width/2, contentView.bounds.size.height/2)]; 67 | break; 68 | default: 69 | break; 70 | } 71 | return showAnima; 72 | } 73 | 74 | + (CABasicAnimation *)getHidenPopAnimationWithType:(PopViewDirection)popDirecton contentView:(UIView *)contentView belowView:(UIView *)belowView{ 75 | CABasicAnimation *hidenAnima = [CABasicAnimation animation]; 76 | hidenAnima.duration = animationDuration; 77 | hidenAnima.fillMode = kCAFillModeForwards; 78 | hidenAnima.removedOnCompletion = YES; 79 | hidenAnima.repeatCount = 1; 80 | 81 | CGFloat width = contentView.bounds.size.width; 82 | CGFloat height = contentView.bounds.size.height; 83 | CGFloat ScreenWidth = [UIScreen mainScreen].bounds.size.width; 84 | CGFloat ScreenHeight = [UIScreen mainScreen].bounds.size.height; 85 | switch (popDirecton) { 86 | case PopViewDirection_PopUpLeft: 87 | case PopViewDirection_PopUpRight: 88 | case PopViewDirection_PopUpTop: 89 | case PopViewDirection_PopUpBottom: 90 | case PopViewDirection_PopUpNone:{ 91 | hidenAnima.keyPath = @"transform"; 92 | CATransform3D tofrom = CATransform3DMakeScale(0, 0, 1); 93 | CATransform3D from = CATransform3DMakeScale(1, 1, 1); 94 | hidenAnima.fromValue = [NSValue valueWithCATransform3D:from]; 95 | hidenAnima.toValue = [NSValue valueWithCATransform3D:tofrom]; 96 | }break; 97 | case PopViewDirection_SlideInCenter:{ 98 | hidenAnima.keyPath = @"position"; 99 | hidenAnima.fromValue = [NSValue valueWithCGPoint:CGPointMake(ScreenWidth/2, ScreenHeight/2)]; 100 | hidenAnima.toValue = [NSValue valueWithCGPoint:CGPointMake(ScreenWidth/2, ScreenHeight+height/2)]; 101 | }break; 102 | case PopViewDirection_SlideFromLeft: 103 | hidenAnima.keyPath = @"position"; 104 | hidenAnima.fromValue = [NSValue valueWithCGPoint:CGPointMake(width/2, ScreenHeight/2)]; 105 | hidenAnima.toValue = [NSValue valueWithCGPoint:CGPointMake(-width/2, ScreenHeight/2)]; 106 | break; 107 | case PopViewDirection_SlideFromRight: 108 | hidenAnima.keyPath = @"position"; 109 | hidenAnima.fromValue = [NSValue valueWithCGPoint:CGPointMake(ScreenWidth-width/2, ScreenHeight/2)]; 110 | hidenAnima.toValue = [NSValue valueWithCGPoint:CGPointMake(ScreenWidth+width/2, ScreenHeight/2)]; 111 | break; 112 | case PopViewDirection_SlideFromUp: 113 | hidenAnima.keyPath = @"position"; 114 | hidenAnima.fromValue = [NSValue valueWithCGPoint:CGPointMake(ScreenWidth/2, height/2)]; 115 | hidenAnima.toValue = [NSValue valueWithCGPoint:CGPointMake(ScreenWidth/2, -height/2)]; 116 | break; 117 | case PopViewDirection_SlideFromBottom: 118 | hidenAnima.keyPath = @"position"; 119 | hidenAnima.fromValue = [NSValue valueWithCGPoint:CGPointMake(ScreenWidth/2, ScreenHeight-height/2)]; 120 | hidenAnima.toValue = [NSValue valueWithCGPoint:CGPointMake(ScreenWidth/2, ScreenHeight+height/2)]; 121 | break; 122 | case PopViewDirection_SlideBelowView: 123 | hidenAnima.keyPath = @"position"; 124 | hidenAnima.fromValue = [NSValue valueWithCGPoint:CGPointMake(belowView.bounds.size.width/2, contentView.bounds.size.height/2)]; 125 | hidenAnima.toValue = [NSValue valueWithCGPoint:CGPointMake(belowView.bounds.size.width/2, -contentView.bounds.size.height/2)]; 126 | default: 127 | break; 128 | } 129 | return hidenAnima; 130 | } 131 | 132 | 133 | @end 134 | -------------------------------------------------------------------------------- /PopView/PopView/PopView/PopView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PopView.h 3 | // iPad-Education 4 | // 5 | // Created by 李林 on 2017/10/18. 6 | // Copyright © 2017年 iLaihua. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | static CGFloat const animationDuration = 0.25; 12 | static CGFloat const popViewInsert = 5; 13 | 14 | typedef NS_ENUM(NSUInteger, PopViewDirection) { 15 | PopViewDirection_PopUpLeft, 16 | PopViewDirection_PopUpBottom, 17 | PopViewDirection_PopUpRight, 18 | PopViewDirection_PopUpTop, 19 | PopViewDirection_PopUpNone, 20 | 21 | 22 | 23 | PopViewDirection_SlideFromLeft = 20, 24 | PopViewDirection_SlideFromRight = 21, 25 | PopViewDirection_SlideFromUp = 22, 26 | PopViewDirection_SlideFromBottom = 23, 27 | PopViewDirection_SlideInCenter = 24, 28 | PopViewDirection_SlideBelowView = 25, 29 | }; 30 | 31 | @interface PopView : UIView 32 | @property (nonatomic ,assign) BOOL clickOutHidden; //点击除了popContainerView的其他地方是否消失default to yes 33 | @property (nonatomic ,weak) UIView *responseOnView; //设置后事件会透过去,响应该view上的事件 34 | @property (nonatomic ,assign) CGFloat keyBoardMargin; //输入框与键盘的间隔,默认为10px 35 | @property (nonatomic ,strong) UIView *popContainerView; //包含要显示的View的父控件 36 | 37 | //popView的移除回调 38 | @property (nonatomic ,copy) void(^willRemovedFromeSuperView)(void); 39 | @property (nonatomic ,copy) void(^didRemovedFromeSuperView)(void); 40 | 41 | 42 | 43 | 44 | /* 45 | 1、可自定义显示隐藏动画 46 | @param contentView 要显示的控件内容 47 | @param showAnimation 显示动画 48 | @param hidenAnimation 消失动画 49 | **/ 50 | + (instancetype)popContentView:(UIView *)contentView 51 | showAnimation:(CABasicAnimation *)showAnimation 52 | hidenAnimation:(CABasicAnimation *)hidenAnimation; 53 | 54 | 55 | /* 56 | 2、可实现类似QQ和微信消息页面的右上角微型菜单弹窗 57 | @param contentView 要显示的控件内容 58 | @param direct 方向 59 | @param onView 一般是响应事件的按钮 60 | **/ 61 | + (instancetype)popUpContentView:(UIView *)contentView 62 | direct:(PopViewDirection)direct 63 | onView:(UIView *)onView; 64 | 65 | /* 66 | 3、可实现类似QQ和微信消息页面的右上角微型菜单弹窗 67 | @param contentView 要显示的控件内容 68 | @param direct 方向 69 | @param onView 一般是响应事件的按钮 70 | @param offset 一般是响应事件的按钮 71 | @param triangleView 可以自定义的任意的view来替代三角指示控件 72 | @param animation 是否动画 73 | **/ 74 | + (instancetype)popUpContentView:(UIView *)contentView 75 | direct:(PopViewDirection)direct 76 | onView:(UIView *)onView 77 | offset:(CGFloat)offset 78 | triangleView:(UIView *)triangleView 79 | animation:(BOOL)animation; 80 | 81 | /* 82 | 4、从屏幕外显示出控件 83 | @param contentView 要显示的控件内容 84 | @param contentView 方向 85 | **/ 86 | + (instancetype)popSideContentView:(UIView *)contentView 87 | direct:(PopViewDirection)direction; 88 | 89 | /* 90 | 5、可实现DropDownMunu类型的动画 91 | @param contentView 要显示的控件内容 92 | @param belowView 内容在belowView的下方,整个控件是添加到belowView的superview上的 93 | **/ 94 | + (instancetype)popSideContentView:(UIView *)contentView 95 | belowView:(UIView *)belowView; 96 | 97 | 98 | //隐藏当前的popView 99 | + (void)hidenPopView; 100 | 101 | //获取当前的popView 102 | + (instancetype)getCurrentPopView; 103 | @end 104 | 105 | -------------------------------------------------------------------------------- /PopView/PopView/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/2/27. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /PopView/PopView/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/2/27. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | @interface ViewController () 12 | 13 | @end 14 | 15 | @implementation ViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | } 20 | @end 21 | -------------------------------------------------------------------------------- /PopView/PopView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // PopView 4 | // 5 | // Created by 李林 on 2018/2/27. 6 | // Copyright © 2018年 李林. 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 | -------------------------------------------------------------------------------- /PopView/PopView/moreFilter.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | items 7 | 8 | 9 | itemName 10 | 视频房源 11 | selected 12 | 13 | 14 | 15 | itemName 16 | 近地铁 17 | selected 18 | 19 | 20 | 21 | radio 22 | 23 | type 24 | 特色 25 | 26 | 27 | items 28 | 29 | 30 | itemName 31 | 整租 32 | selected 33 | 34 | 35 | 36 | itemName 37 | 合租 38 | selected 39 | 40 | 41 | 42 | radio 43 | 44 | type 45 | 类型 46 | 47 | 48 | items 49 | 50 | 51 | itemName 52 | 53 | selected 54 | 55 | 56 | 57 | itemName 58 | 59 | selected 60 | 61 | 62 | 63 | itemName 64 | 南北 65 | selected 66 | 67 | 68 | 69 | itemName 70 | 东西 71 | selected 72 | 73 | 74 | 75 | radio 76 | 77 | type 78 | 朝向 79 | 80 | 81 | items 82 | 83 | 84 | itemName 85 | 毛胚 86 | selected 87 | 88 | 89 | 90 | itemName 91 | 简单装修 92 | selected 93 | 94 | 95 | 96 | itemName 97 | 中等装修 98 | selected 99 | 100 | 101 | 102 | itemName 103 | 精装修 104 | selected 105 | 106 | 107 | 108 | itemName 109 | 豪华装修 110 | selected 111 | 112 | 113 | 114 | itemName 115 | 其他 116 | selected 117 | 118 | 119 | 120 | radio 121 | 122 | type 123 | 装修 124 | 125 | 126 | items 127 | 128 | 129 | itemName 130 | 普通住宅 131 | selected 132 | 133 | 134 | 135 | itemName 136 | 公寓 137 | selected 138 | 139 | 140 | 141 | itemName 142 | 别墅 143 | selected 144 | 145 | 146 | 147 | itemName 148 | 平房 149 | selected 150 | 151 | 152 | 153 | itemName 154 | 酒店公寓 155 | selected 156 | 157 | 158 | 159 | itemName 160 | 商住两用 161 | selected 162 | 163 | 164 | 165 | radio 166 | 167 | type 168 | 房屋类型 169 | 170 | 171 | items 172 | 173 | 174 | itemName 175 | 个人 176 | selected 177 | 178 | 179 | 180 | itemName 181 | 经纪人 182 | selected 183 | 184 | 185 | 186 | itemName 187 | 品牌公寓 188 | selected 189 | 190 | 191 | 192 | radio 193 | 194 | type 195 | 来源 196 | 197 | 198 | 199 | -------------------------------------------------------------------------------- /PopView/PopViewTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /PopView/PopViewTests/PopViewTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // PopViewTests.m 3 | // PopViewTests 4 | // 5 | // Created by 李林 on 2018/2/27. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PopViewTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation PopViewTests 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 | -------------------------------------------------------------------------------- /PopView/PopViewUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /PopView/PopViewUITests/PopViewUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // PopViewUITests.m 3 | // PopViewUITests 4 | // 5 | // Created by 李林 on 2018/2/27. 6 | // Copyright © 2018年 李林. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PopViewUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation PopViewUITests 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PopView 2 | ## 弹出自定义视图控件,使用简单,耦合度小(popView) 3 | 4 | ### 0、类似实现DropDownMunu类型的动画 5 | ~~~ 6 | -(void)chooseClick:(UIButton *)btn{ 7 | btn.selected = !btn.selected; 8 | if (btn.selected) { 9 | [UIView animateWithDuration:0.25 animations:^{ 10 | btn.imageView.transform = CGAffineTransformRotate(btn.transform, M_PI); 11 | }]; 12 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 64, self.view.bounds.size.width, 0)]; 13 | [self.view addSubview:view]; 14 | PopView *popView = [PopView popSideContentView:self.chooseListView belowView:view]; 15 | popView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.2]; 16 | [popView setDidRemovedFromeSuperView:^{ 17 | btn.selected = NO; 18 | [UIView animateWithDuration:0.25 animations:^{ 19 | btn.imageView.transform = CGAffineTransformIdentity; 20 | }]; 21 | }]; 22 | [view removeFromSuperview]; 23 | }else{ 24 | [UIView animateWithDuration:0.25 animations:^{ 25 | btn.imageView.transform = CGAffineTransformIdentity; 26 | }]; 27 | [PopView hidenPopView]; 28 | } 29 | } 30 | ~~~ 31 | 32 | ![img](https://github.com/xiaohu036/PopView/blob/master/0.gif) 33 | 34 | ### 1、类似QQ和微信消息页面的右上角微型菜单弹窗 35 | ~~~ 36 | PopView *popView = [PopView showPopViewDirect:PopViewDirection_Bottom onView:sender contentView:self.popContentView]; 37 | popView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3]; 38 | ~~~ 39 | 40 | ![img](https://github.com/xiaohu036/PopView/blob/master/1.gif) 41 | 42 | 43 | 44 | 45 | ### 2、侧边栏(处理了键盘遮挡的问题) 46 | ~~~ 47 | PopView *popView = [PopView showSidePopDirect:PopViewDirection_SlideFromUp contentView:self.qzoneView]; 48 | popView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3]; 49 | ~~~ 50 | ![img](https://github.com/xiaohu036/PopView/blob/master/2.gif) 51 | 52 | 53 | 54 | 55 | ### 3、自定义显示和隐藏动画 56 | ~~~ 57 | CABasicAnimation *showAnima = [CABasicAnimation animationWithKeyPath:@"transform"]; 58 | showAnima.duration = 0.25; 59 | showAnima.fillMode = kCAFillModeForwards; 60 | showAnima.removedOnCompletion = YES; 61 | CATransform3D tofrom = CATransform3DMakeScale(1, 1, 1); 62 | CATransform3D from = CATransform3DMakeScale(0, 0, 1); 63 | showAnima.fromValue = [NSValue valueWithCATransform3D:from]; 64 | showAnima.toValue = [NSValue valueWithCATransform3D:tofrom]; 65 | 66 | 67 | CABasicAnimation *hidenAnima = [CABasicAnimation animationWithKeyPath:@"transform"]; 68 | hidenAnima.duration = 0.25; 69 | hidenAnima.fillMode = kCAFillModeForwards; 70 | CATransform3D tofrom1 = CATransform3DMakeScale(1, 0, 1); 71 | CATransform3D from1 = CATransform3DMakeScale(1, 1, 1); 72 | hidenAnima.fromValue = [NSValue valueWithCATransform3D:from1]; 73 | hidenAnima.toValue = [NSValue valueWithCATransform3D:tofrom1]; 74 | 75 | self.loginView.center = self.view.center; 76 | self.loginView.backgroundColor = [UIColor whiteColor]; 77 | PopView *popView = [PopView showPopContentView:self.loginView showAnimation:showAnima hidenAnimation:hidenAnima]; 78 | popView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3]; 79 | popView.clickOutHidden = NO; 80 | 81 | ~~~ 82 | ![img](https://github.com/xiaohu036/PopView/blob/master/3.gif) 83 | 84 | 85 | 86 | 87 | --------------------------------------------------------------------------------