├── .swift-version ├── BAPickView └── Classes │ ├── .gitkeep │ ├── PickerView │ ├── BACityModel.m │ ├── BAPickerResultModel.m │ ├── BADatePickerView.h │ ├── BACustomDatePickerView.h │ ├── BAPickerView.h │ ├── BAPickerToolBarView.h │ ├── BACityModel.h │ ├── BAPickerResultModel.h │ ├── BABasePickerView.h │ ├── BAPickerBasePopView.h │ ├── BAPickerDefine.h │ ├── BAPickerConfigModel.m │ ├── BABasePickerView.m │ ├── BAPickerConfigModel.h │ └── BAPickerBasePopView.m │ ├── BAPickView_OC.h │ └── Tools │ ├── NSBundle+BAPod.h │ ├── BAKit_DefineFormat.h │ ├── NSBundle+BAPod.m │ ├── NSDateFormatter+BAKit.h │ ├── NSDateFormatter+BAKit.m │ ├── BAPickView_Version.h │ └── BAKit_PickerViewConfig.h ├── _Pods.xcodeproj ├── Example ├── Pods │ ├── Headers │ │ ├── Private │ │ │ ├── Masonry │ │ │ │ ├── Masonry.h │ │ │ │ ├── MASConstraint.h │ │ │ │ ├── MASUtilities.h │ │ │ │ ├── MASViewAttribute.h │ │ │ │ ├── MASConstraintMaker.h │ │ │ │ ├── MASViewConstraint.h │ │ │ │ ├── View+MASAdditions.h │ │ │ │ ├── MASConstraint+Private.h │ │ │ │ ├── MASLayoutConstraint.h │ │ │ │ ├── NSArray+MASAdditions.h │ │ │ │ ├── MASCompositeConstraint.h │ │ │ │ ├── View+MASShorthandAdditions.h │ │ │ │ ├── ViewController+MASAdditions.h │ │ │ │ ├── NSArray+MASShorthandAdditions.h │ │ │ │ └── NSLayoutConstraint+MASDebugAdditions.h │ │ │ └── BAPickView │ │ │ │ ├── BAPickView_OC.h │ │ │ │ ├── NSDate+BAKit.h │ │ │ │ ├── BACityModel.h │ │ │ │ ├── BAPickerView.h │ │ │ │ ├── NSBundle+BAPod.h │ │ │ │ ├── BAPickerDefine.h │ │ │ │ ├── BAPickerManger.h │ │ │ │ ├── BABasePickerView.h │ │ │ │ ├── BADatePickerView.h │ │ │ │ ├── BAKit_DefineFormat.h │ │ │ │ ├── BAPickView_Version.h │ │ │ │ ├── BAKit_PickerViewConfig.h │ │ │ │ ├── BAPickerBasePopView.h │ │ │ │ ├── BAPickerConfigModel.h │ │ │ │ ├── BAPickerResultModel.h │ │ │ │ ├── BAPickerToolBarView.h │ │ │ │ ├── NSDateFormatter+BAKit.h │ │ │ │ ├── BACustomDatePickerView.h │ │ │ │ └── BAKit_ConfigurationDefine.h │ │ └── Public │ │ │ ├── Masonry │ │ │ ├── Masonry.h │ │ │ ├── MASConstraint.h │ │ │ ├── MASUtilities.h │ │ │ ├── MASViewAttribute.h │ │ │ ├── MASConstraintMaker.h │ │ │ ├── MASLayoutConstraint.h │ │ │ ├── MASViewConstraint.h │ │ │ ├── View+MASAdditions.h │ │ │ ├── MASConstraint+Private.h │ │ │ ├── NSArray+MASAdditions.h │ │ │ ├── MASCompositeConstraint.h │ │ │ ├── View+MASShorthandAdditions.h │ │ │ ├── NSArray+MASShorthandAdditions.h │ │ │ ├── ViewController+MASAdditions.h │ │ │ └── NSLayoutConstraint+MASDebugAdditions.h │ │ │ └── BAPickView │ │ │ ├── BAPickView_OC.h │ │ │ ├── NSDate+BAKit.h │ │ │ ├── BACityModel.h │ │ │ ├── BAPickerView.h │ │ │ ├── NSBundle+BAPod.h │ │ │ ├── BAPickerDefine.h │ │ │ ├── BAPickerManger.h │ │ │ ├── BABasePickerView.h │ │ │ ├── BADatePickerView.h │ │ │ ├── BAKit_DefineFormat.h │ │ │ ├── BAPickView_Version.h │ │ │ ├── BAKit_PickerViewConfig.h │ │ │ ├── BAPickerBasePopView.h │ │ │ ├── BAPickerConfigModel.h │ │ │ ├── BAPickerResultModel.h │ │ │ ├── BAPickerToolBarView.h │ │ │ ├── NSDateFormatter+BAKit.h │ │ │ ├── BACustomDatePickerView.h │ │ │ └── BAKit_ConfigurationDefine.h │ ├── Target Support Files │ │ ├── Masonry │ │ │ ├── Masonry.modulemap │ │ │ ├── Masonry-dummy.m │ │ │ ├── Masonry-prefix.pch │ │ │ ├── Masonry.debug.xcconfig │ │ │ ├── Masonry.release.xcconfig │ │ │ ├── Masonry-umbrella.h │ │ │ └── Masonry-Info.plist │ │ ├── BAPickView │ │ │ ├── BAPickView-dummy.m │ │ │ ├── BAPickView-prefix.pch │ │ │ ├── BAPickView.debug.xcconfig │ │ │ ├── BAPickView.release.xcconfig │ │ │ ├── ResourceBundle-BAPickView-BAPickView-Info.plist │ │ │ ├── BAPickView-Info.plist │ │ │ └── BAPickView-umbrella.h │ │ └── Pods-BAPickView_Example │ │ │ ├── Pods-BAPickView_Example-dummy.m │ │ │ ├── Pods-BAPickView_Example.debug.xcconfig │ │ │ ├── Pods-BAPickView_Example.release.xcconfig │ │ │ ├── Pods-BAPickView_Example-acknowledgements.markdown │ │ │ └── Pods-BAPickView_Example-acknowledgements.plist │ ├── BAPickView │ │ ├── BAPickView │ │ │ └── Classes │ │ │ │ ├── PickerView │ │ │ │ ├── BACityModel.m │ │ │ │ ├── BAPickerResultModel.m │ │ │ │ ├── BADatePickerView.h │ │ │ │ ├── BACustomDatePickerView.h │ │ │ │ ├── BAPickerView.h │ │ │ │ ├── BAPickerToolBarView.h │ │ │ │ ├── BACityModel.h │ │ │ │ ├── BAPickerBasePopView.h │ │ │ │ ├── BAPickerResultModel.h │ │ │ │ ├── BABasePickerView.h │ │ │ │ ├── BAPickerDefine.h │ │ │ │ ├── BAPickerConfigModel.m │ │ │ │ ├── BAPickerBasePopView.m │ │ │ │ ├── BABasePickerView.m │ │ │ │ └── BAPickerConfigModel.h │ │ │ │ ├── BAPickView_OC.h │ │ │ │ └── Tools │ │ │ │ ├── NSBundle+BAPod.h │ │ │ │ ├── BAKit_DefineFormat.h │ │ │ │ ├── NSBundle+BAPod.m │ │ │ │ ├── NSDateFormatter+BAKit.h │ │ │ │ ├── NSDateFormatter+BAKit.m │ │ │ │ ├── BAPickView_Version.h │ │ │ │ └── BAKit_PickerViewConfig.h │ │ └── LICENSE │ ├── Masonry │ │ ├── Masonry │ │ │ ├── MASLayoutConstraint.m │ │ │ ├── NSLayoutConstraint+MASDebugAdditions.h │ │ │ ├── MASLayoutConstraint.h │ │ │ ├── MASCompositeConstraint.h │ │ │ ├── Masonry.h │ │ │ ├── ViewController+MASAdditions.h │ │ │ ├── NSArray+MASShorthandAdditions.h │ │ │ ├── MASViewAttribute.m │ │ │ ├── MASViewAttribute.h │ │ │ ├── ViewController+MASAdditions.m │ │ │ ├── MASViewConstraint.h │ │ │ ├── MASConstraint+Private.h │ │ │ ├── NSArray+MASAdditions.h │ │ │ ├── View+MASAdditions.h │ │ │ ├── View+MASShorthandAdditions.h │ │ │ ├── MASCompositeConstraint.m │ │ │ ├── MASConstraintMaker.h │ │ │ └── NSLayoutConstraint+MASDebugAdditions.m │ │ └── LICENSE │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ └── xcuserdata │ │ │ └── sunboyan.xcuserdatad │ │ │ └── xcschemes │ │ │ ├── xcschememanagement.plist │ │ │ ├── BAPickView-BAPickView.xcscheme │ │ │ ├── Masonry.xcscheme │ │ │ ├── BAPickView.xcscheme │ │ │ └── Pods-BAPickView_Example.xcscheme │ └── Local Podspecs │ │ └── BAPickView.podspec.json ├── BAPickView │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── BAAppDelegate.h │ ├── BAViewController.h │ ├── main.m │ ├── BAPickView-Prefix.pch │ ├── BAPickView-Info.plist │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── BAAppDelegate.m │ ├── Main.storyboard │ └── LaunchScreen.storyboard ├── Podfile ├── BAPickView.xcworkspace │ ├── xcuserdata │ │ └── sunboyan.xcuserdatad │ │ │ ├── UserInterfaceState.xcuserstate │ │ │ └── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── BAPickView.xcodeproj │ ├── xcuserdata │ │ └── sunboyan.xcuserdatad │ │ │ └── xcschemes │ │ │ └── xcschememanagement.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── BAPickView-Example.xcscheme └── Podfile.lock ├── Images ├── BAPickView.gif ├── BAPickView.png └── BAPickView1.png ├── LICENSE ├── .gitignore └── BAPickView.podspec /.swift-version: -------------------------------------------------------------------------------- 1 | 2.3 2 | -------------------------------------------------------------------------------- /BAPickView/Classes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/Masonry/Masonry.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/Masonry.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/Masonry/Masonry.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/Masonry.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/Masonry/MASConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/Masonry/MASUtilities.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASUtilities.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/Masonry/MASConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/Masonry/MASUtilities.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASUtilities.h -------------------------------------------------------------------------------- /Example/BAPickView/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/Masonry/MASViewAttribute.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewAttribute.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/Masonry/MASViewAttribute.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewAttribute.h -------------------------------------------------------------------------------- /Images/BAPickView.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BAHome/BAPickView/HEAD/Images/BAPickView.gif -------------------------------------------------------------------------------- /Images/BAPickView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BAHome/BAPickView/HEAD/Images/BAPickView.png -------------------------------------------------------------------------------- /Images/BAPickView1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BAHome/BAPickView/HEAD/Images/BAPickView1.png -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/Masonry/MASConstraintMaker.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraintMaker.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/Masonry/MASViewConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewConstraint.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/Masonry/View+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASAdditions.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/BAPickView/BAPickView_OC.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/BAPickView_OC.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/Masonry/MASConstraintMaker.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraintMaker.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/Masonry/MASLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASLayoutConstraint.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/Masonry/MASViewConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewConstraint.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/Masonry/View+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASAdditions.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/BAPickView/BAPickView_OC.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/BAPickView_OC.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/BAPickView/NSDate+BAKit.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/Tools/NSDate+BAKit.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/Masonry/MASConstraint+Private.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint+Private.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/Masonry/MASLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASLayoutConstraint.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/Masonry/NSArray+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASAdditions.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/BAPickView/NSDate+BAKit.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/Tools/NSDate+BAKit.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/Masonry/MASConstraint+Private.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint+Private.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/Masonry/NSArray+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASAdditions.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/BAPickView/BACityModel.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/PickerView/BACityModel.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/BAPickView/BAPickerView.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/PickerView/BAPickerView.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/BAPickView/NSBundle+BAPod.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/Tools/NSBundle+BAPod.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/Masonry/MASCompositeConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASCompositeConstraint.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/BAPickView/BACityModel.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/PickerView/BACityModel.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/BAPickView/BAPickerView.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/PickerView/BAPickerView.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/BAPickView/NSBundle+BAPod.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/Tools/NSBundle+BAPod.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/Masonry/MASCompositeConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASCompositeConstraint.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/BAPickView/BAPickerDefine.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/PickerView/BAPickerDefine.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/BAPickView/BAPickerManger.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/PickerView/BAPickerManger.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/Masonry/View+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASShorthandAdditions.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/BAPickView/BAPickerDefine.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/PickerView/BAPickerDefine.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/BAPickView/BAPickerManger.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/PickerView/BAPickerManger.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/Masonry/View+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASShorthandAdditions.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/BAPickView/BABasePickerView.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/PickerView/BABasePickerView.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/BAPickView/BADatePickerView.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/PickerView/BADatePickerView.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/BAPickView/BAKit_DefineFormat.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/Tools/BAKit_DefineFormat.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/BAPickView/BAPickView_Version.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/Tools/BAPickView_Version.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/Masonry/ViewController+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/ViewController+MASAdditions.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/BAPickView/BABasePickerView.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/PickerView/BABasePickerView.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/BAPickView/BADatePickerView.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/PickerView/BADatePickerView.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/BAPickView/BAKit_DefineFormat.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/Tools/BAKit_DefineFormat.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/BAPickView/BAPickView_Version.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/Tools/BAPickView_Version.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/Masonry/NSArray+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/Masonry/ViewController+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/ViewController+MASAdditions.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/BAPickView/BAKit_PickerViewConfig.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/Tools/BAKit_PickerViewConfig.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/BAPickView/BAPickerBasePopView.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/PickerView/BAPickerBasePopView.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/BAPickView/BAPickerConfigModel.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/PickerView/BAPickerConfigModel.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/BAPickView/BAPickerResultModel.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/PickerView/BAPickerResultModel.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/BAPickView/BAPickerToolBarView.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/PickerView/BAPickerToolBarView.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/BAPickView/NSDateFormatter+BAKit.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/Tools/NSDateFormatter+BAKit.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/Masonry/NSArray+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/BAPickView/BAKit_PickerViewConfig.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/Tools/BAKit_PickerViewConfig.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/BAPickView/BAPickerBasePopView.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/PickerView/BAPickerBasePopView.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/BAPickView/BAPickerConfigModel.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/PickerView/BAPickerConfigModel.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/BAPickView/BAPickerResultModel.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/PickerView/BAPickerResultModel.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/BAPickView/BAPickerToolBarView.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/PickerView/BAPickerToolBarView.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/BAPickView/NSDateFormatter+BAKit.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/Tools/NSDateFormatter+BAKit.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/BAPickView/BACustomDatePickerView.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/PickerView/BACustomDatePickerView.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/BAPickView/BACustomDatePickerView.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/PickerView/BACustomDatePickerView.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/BAPickView/BAKit_ConfigurationDefine.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/Tools/BAKit_ConfigurationDefine.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/BAPickView/BAKit_ConfigurationDefine.h: -------------------------------------------------------------------------------- 1 | ../../../../../BAPickView/Classes/Tools/BAKit_ConfigurationDefine.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/Masonry/NSLayoutConstraint+MASDebugAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/Masonry/NSLayoutConstraint+MASDebugAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Masonry/Masonry.modulemap: -------------------------------------------------------------------------------- 1 | framework module Masonry { 2 | umbrella header "Masonry-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Masonry/Masonry-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Masonry : NSObject 3 | @end 4 | @implementation PodsDummy_Masonry 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/BAPickView/BAPickView-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_BAPickView : NSObject 3 | @end 4 | @implementation PodsDummy_BAPickView 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios,'9.0' 2 | 3 | #source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git' 4 | 5 | target 'BAPickView_Example' do 6 | pod 'BAPickView'#, :path => '../' 7 | 8 | end 9 | -------------------------------------------------------------------------------- /BAPickView/Classes/PickerView/BACityModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // BACityModel.m 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/2. 6 | // 7 | 8 | #import "BACityModel.h" 9 | 10 | @implementation BACityModel 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Example/BAPickView.xcworkspace/xcuserdata/sunboyan.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BAHome/BAPickView/HEAD/Example/BAPickView.xcworkspace/xcuserdata/sunboyan.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/PickerView/BACityModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // BACityModel.m 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/2. 6 | // 7 | 8 | #import "BACityModel.h" 9 | 10 | @implementation BACityModel 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAPickView_Example/Pods-BAPickView_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_BAPickView_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_BAPickView_Example 5 | @end 6 | -------------------------------------------------------------------------------- /BAPickView/Classes/PickerView/BAPickerResultModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // BAPickerResultModel.m 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/6. 6 | // 7 | 8 | #import "BAPickerResultModel.h" 9 | 10 | @implementation BAPickerResultModel 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/PickerView/BAPickerResultModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // BAPickerResultModel.m 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/6. 6 | // 7 | 8 | #import "BAPickerResultModel.h" 9 | 10 | @implementation BAPickerResultModel 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Masonry/Masonry-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/BAPickView.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/BAPickView.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/Pods/Masonry/Masonry/MASLayoutConstraint.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASLayoutConstraint.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASLayoutConstraint.h" 10 | 11 | @implementation MASLayoutConstraint 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/BAPickView/BAAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // BAAppDelegate.h 3 | // BAPickView 4 | // 5 | // Created by boai on 11/27/2018. 6 | // Copyright (c) 2018 boai. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface BAAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Example/BAPickView/BAViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // BAViewController.h 3 | // BAPickView_Example 4 | // 5 | // Created by 博爱 on 2021/4/1. 6 | // Copyright © 2021 boai. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface BAViewController : UIViewController 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /BAPickView/Classes/BAPickView_OC.h: -------------------------------------------------------------------------------- 1 | // 2 | // BAPickView_OC.h 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/12. 6 | // 7 | 8 | #ifndef BAPickView_OC_h 9 | #define BAPickView_OC_h 10 | 11 | #import "BAPickerManger.h" 12 | #import "BAPickerView.h" 13 | #import "BADatePickerView.h" 14 | #import "BACustomDatePickerView.h" 15 | #import "NSDate+BAKit.h" 16 | 17 | #endif /* BAPickView_OC_h */ 18 | -------------------------------------------------------------------------------- /Example/BAPickView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // BAPickView 4 | // 5 | // Created by boai on 11/27/2018. 6 | // Copyright (c) 2018 boai. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | #import "BAAppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([BAAppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/BAPickView/BAPickView-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import 14 | #import 15 | #import "BAKit_ConfigurationDefine.h" 16 | -------------------------------------------------------------------------------- /Example/BAPickView/BAPickView-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | @import UIKit; 15 | @import Foundation; 16 | #endif 17 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/BAPickView_OC.h: -------------------------------------------------------------------------------- 1 | // 2 | // BAPickView_OC.h 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/12. 6 | // 7 | 8 | #ifndef BAPickView_OC_h 9 | #define BAPickView_OC_h 10 | 11 | #import "BAPickerManger.h" 12 | #import "BAPickerView.h" 13 | #import "BADatePickerView.h" 14 | #import "BACustomDatePickerView.h" 15 | #import "NSDate+BAKit.h" 16 | 17 | #endif /* BAPickView_OC_h */ 18 | -------------------------------------------------------------------------------- /Example/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSLayoutConstraint+MASDebugAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * makes debug and log output of NSLayoutConstraints more readable 13 | */ 14 | @interface NSLayoutConstraint (MASDebugAdditions) 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Example/BAPickView.xcodeproj/xcuserdata/sunboyan.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | BAPickView-Example.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /BAPickView/Classes/PickerView/BADatePickerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // BADatePickerView.h 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/1. 6 | // 7 | 8 | #import "BAPickerBasePopView.h" 9 | 10 | #import "BAPickerConfigModel.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface BADatePickerView : BAPickerBasePopView 15 | 16 | @property(nonatomic, strong) BADatePickerModel *configModel; 17 | 18 | @property(nonatomic, copy) BAPickerResultBlock selectDatePicker; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/PickerView/BADatePickerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // BADatePickerView.h 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/1. 6 | // 7 | 8 | #import "BAPickerBasePopView.h" 9 | 10 | #import "BAPickerConfigModel.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface BADatePickerView : BAPickerBasePopView 15 | 16 | @property(nonatomic, strong) BADatePickerModel *configModel; 17 | 18 | @property(nonatomic, copy) BAPickerResultBlock selectDatePicker; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /BAPickView/Classes/PickerView/BACustomDatePickerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // BACustomDatePickerView.h 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/6. 6 | // 7 | 8 | #import "BAPickerBasePopView.h" 9 | #import "BAPickerDefine.h" 10 | #import "BAPickerConfigModel.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface BACustomDatePickerView : BAPickerBasePopView 15 | 16 | @property(nonatomic, strong) BADatePickerModel *configModel; 17 | 18 | @property(nonatomic, copy) BAPickerResultBlock selectDatePicker; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/PickerView/BACustomDatePickerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // BACustomDatePickerView.h 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/6. 6 | // 7 | 8 | #import "BAPickerBasePopView.h" 9 | #import "BAPickerDefine.h" 10 | #import "BAPickerConfigModel.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface BACustomDatePickerView : BAPickerBasePopView 15 | 16 | @property(nonatomic, strong) BADatePickerModel *configModel; 17 | 18 | @property(nonatomic, copy) BAPickerResultBlock selectDatePicker; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /BAPickView/Classes/PickerView/BAPickerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // BAPickerView.h 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/1. 6 | // 7 | 8 | #import "BAPickerBasePopView.h" 9 | #import "BAPickerDefine.h" 10 | #import "BAPickerConfigModel.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface BAPickerView : BAPickerBasePopView 15 | 16 | @property(nonatomic, strong) BAPickerModel *configModel; 17 | 18 | @property(nonatomic, copy) BAPickerResultBlock selectPicker; 19 | @property(nonatomic, copy) BAPickerCityResultBlock selectCityPicker; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /BAPickView/Classes/PickerView/BAPickerToolBarView.h: -------------------------------------------------------------------------------- 1 | // 2 | // BAPickerToolBarView.h 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/1. 6 | // 7 | 8 | #import 9 | #import "BAPickerConfigModel.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface BAPickerToolBarView : UIView 14 | 15 | @property(nonatomic, strong) BAPickerToolBarModel *toolBarModel; 16 | 17 | @property(nonatomic, copy) NSString *result; 18 | 19 | @property(nonatomic, copy) void (^onCancleButton)(void); 20 | @property(nonatomic, copy) void (^onSureButton)(void); 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/PickerView/BAPickerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // BAPickerView.h 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/1. 6 | // 7 | 8 | #import "BAPickerBasePopView.h" 9 | #import "BAPickerDefine.h" 10 | #import "BAPickerConfigModel.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface BAPickerView : BAPickerBasePopView 15 | 16 | @property(nonatomic, strong) BAPickerModel *configModel; 17 | 18 | @property(nonatomic, copy) BAPickerResultBlock selectPicker; 19 | @property(nonatomic, copy) BAPickerCityResultBlock selectCityPicker; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/PickerView/BAPickerToolBarView.h: -------------------------------------------------------------------------------- 1 | // 2 | // BAPickerToolBarView.h 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/1. 6 | // 7 | 8 | #import 9 | #import "BAPickerConfigModel.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface BAPickerToolBarView : UIView 14 | 15 | @property(nonatomic, strong) BAPickerToolBarModel *toolBarModel; 16 | 17 | @property(nonatomic, copy) NSString *result; 18 | 19 | @property(nonatomic, copy) void (^onCancleButton)(void); 20 | @property(nonatomic, copy) void (^onSureButton)(void); 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /Example/Pods/Masonry/Masonry/MASLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASLayoutConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * When you are debugging or printing the constraints attached to a view this subclass 13 | * makes it easier to identify which constraints have been created via Masonry 14 | */ 15 | @interface MASLayoutConstraint : NSLayoutConstraint 16 | 17 | /** 18 | * a key to associate with this constraint 19 | */ 20 | @property (nonatomic, strong) id mas_key; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Example/Pods/Masonry/Masonry/MASCompositeConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASCompositeConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASConstraint.h" 10 | #import "MASUtilities.h" 11 | 12 | /** 13 | * A group of MASConstraint objects 14 | */ 15 | @interface MASCompositeConstraint : MASConstraint 16 | 17 | /** 18 | * Creates a composite with a predefined array of children 19 | * 20 | * @param children child MASConstraints 21 | * 22 | * @return a composite constraint 23 | */ 24 | - (id)initWithChildren:(NSArray *)children; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /BAPickView/Classes/Tools/NSBundle+BAPod.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSBundle+BAPod.h 3 | // BAAlert_Example 4 | // 5 | // Created by 孙博岩 on 2018/11/15. 6 | // Copyright © 2018 boai. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSBundle (BAPod) 14 | 15 | /** 16 | 获取文件所在name,默认情况下podName和bundlename相同,传一个即可 17 | 18 | @param bundleName bundle名字,就是在resource_bundles里面的名字 19 | @param podName pod的名字 20 | @return bundle 21 | */ 22 | + (NSBundle *)ba_bundleWithBundleName:(NSString *)bundleName 23 | podName:(NSString *)podName; 24 | 25 | @end 26 | 27 | NS_ASSUME_NONNULL_END 28 | -------------------------------------------------------------------------------- /BAPickView/Classes/PickerView/BACityModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // BACityModel.h 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/2. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface BACityModel : NSObject 14 | 15 | /** 16 | 省 17 | */ 18 | @property (nonatomic, copy) NSString *province; 19 | 20 | /** 21 | 市 22 | */ 23 | @property (nonatomic, copy) NSString *city; 24 | 25 | /** 26 | 区 27 | */ 28 | @property (nonatomic, copy) NSString *area; 29 | 30 | /** 31 | 经纬度 32 | */ 33 | @property (nonatomic, assign) CLLocationCoordinate2D coordie; 34 | 35 | @end 36 | 37 | NS_ASSUME_NONNULL_END 38 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/Tools/NSBundle+BAPod.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSBundle+BAPod.h 3 | // BAAlert_Example 4 | // 5 | // Created by 孙博岩 on 2018/11/15. 6 | // Copyright © 2018 boai. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSBundle (BAPod) 14 | 15 | /** 16 | 获取文件所在name,默认情况下podName和bundlename相同,传一个即可 17 | 18 | @param bundleName bundle名字,就是在resource_bundles里面的名字 19 | @param podName pod的名字 20 | @return bundle 21 | */ 22 | + (NSBundle *)ba_bundleWithBundleName:(NSString *)bundleName 23 | podName:(NSString *)podName; 24 | 25 | @end 26 | 27 | NS_ASSUME_NONNULL_END 28 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/PickerView/BACityModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // BACityModel.h 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/2. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface BACityModel : NSObject 14 | 15 | /** 16 | 省 17 | */ 18 | @property (nonatomic, copy) NSString *province; 19 | 20 | /** 21 | 市 22 | */ 23 | @property (nonatomic, copy) NSString *city; 24 | 25 | /** 26 | 区 27 | */ 28 | @property (nonatomic, copy) NSString *area; 29 | 30 | /** 31 | 经纬度 32 | */ 33 | @property (nonatomic, assign) CLLocationCoordinate2D coordie; 34 | 35 | @end 36 | 37 | NS_ASSUME_NONNULL_END 38 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Masonry/Masonry.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Masonry 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Masonry" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Masonry" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Masonry 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Masonry/Masonry.release.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Masonry 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Masonry" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Masonry" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Masonry 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 11 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - BAPickView (1.2.2): 3 | - BAPickView/PickerView (= 1.2.2) 4 | - BAPickView/Tools (= 1.2.2) 5 | - Masonry 6 | - BAPickView/PickerView (1.2.2): 7 | - BAPickView/Tools 8 | - Masonry 9 | - BAPickView/Tools (1.2.2): 10 | - Masonry 11 | - Masonry (1.1.0) 12 | 13 | DEPENDENCIES: 14 | - BAPickView (from `../`) 15 | 16 | SPEC REPOS: 17 | trunk: 18 | - Masonry 19 | 20 | EXTERNAL SOURCES: 21 | BAPickView: 22 | :path: "../" 23 | 24 | SPEC CHECKSUMS: 25 | BAPickView: adcf90dea514c1128c1cf5df78acddc95f07d7f0 26 | Masonry: 678fab65091a9290e40e2832a55e7ab731aad201 27 | 28 | PODFILE CHECKSUM: 66ec998834369603c88bcac4f5c4bd5bc35661c1 29 | 30 | COCOAPODS: 1.9.3 31 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - BAPickView (1.2.2): 3 | - BAPickView/PickerView (= 1.2.2) 4 | - BAPickView/Tools (= 1.2.2) 5 | - Masonry 6 | - BAPickView/PickerView (1.2.2): 7 | - BAPickView/Tools 8 | - Masonry 9 | - BAPickView/Tools (1.2.2): 10 | - Masonry 11 | - Masonry (1.1.0) 12 | 13 | DEPENDENCIES: 14 | - BAPickView (from `../`) 15 | 16 | SPEC REPOS: 17 | trunk: 18 | - Masonry 19 | 20 | EXTERNAL SOURCES: 21 | BAPickView: 22 | :path: "../" 23 | 24 | SPEC CHECKSUMS: 25 | BAPickView: adcf90dea514c1128c1cf5df78acddc95f07d7f0 26 | Masonry: 678fab65091a9290e40e2832a55e7ab731aad201 27 | 28 | PODFILE CHECKSUM: 66ec998834369603c88bcac4f5c4bd5bc35661c1 29 | 30 | COCOAPODS: 1.9.3 31 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/BAPickView/BAPickView.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/BAPickView 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/BAPickView" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BAPickView" "${PODS_ROOT}/Headers/Public/Masonry" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/BAPickView/BAPickView.release.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/BAPickView 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/BAPickView" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BAPickView" "${PODS_ROOT}/Headers/Public/Masonry" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAPickView_Example/Pods-BAPickView_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BAPickView" "${PODS_ROOT}/Headers/Public/Masonry" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BAPickView" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" 4 | OTHER_LDFLAGS = $(inherited) -ObjC -l"BAPickView" -l"Masonry" -framework "Foundation" -framework "UIKit" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAPickView_Example/Pods-BAPickView_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BAPickView" "${PODS_ROOT}/Headers/Public/Masonry" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/BAPickView" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" 4 | OTHER_LDFLAGS = $(inherited) -ObjC -l"BAPickView" -l"Masonry" -framework "Foundation" -framework "UIKit" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 10 | -------------------------------------------------------------------------------- /Example/BAPickView.xcworkspace/xcuserdata/sunboyan.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 9 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/PickerView/BAPickerBasePopView.h: -------------------------------------------------------------------------------- 1 | // 2 | // BAPickerBasePopView.h 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/1. 6 | // 7 | 8 | #import 9 | #import "BAPickerDefine.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface BAPickerBasePopView : UIView 14 | 15 | /** 16 | BAPickerBasePopView:父类 view,可以在上面加载任意 view 17 | */ 18 | @property(nonatomic, strong) UIView *contentView; 19 | /// 默认:[UIColor.blackColor colorWithAlphaComponent:0.3] 20 | @property(nonatomic, strong) UIColor *maskViewBackgroundColor; 21 | 22 | /// 默认 yes 23 | @property(nonatomic, assign) BOOL enableTouchDismiss; 24 | 25 | @property(nonatomic, copy) void (^onDismiss)(void); 26 | 27 | - (void)show; 28 | - (void)showOnView:(UIView *)view; 29 | 30 | - (void)dismiss; 31 | 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/sunboyan.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | BAPickView-BAPickView.xcscheme 8 | 9 | isShown 10 | 11 | 12 | BAPickView.xcscheme 13 | 14 | isShown 15 | 16 | 17 | Masonry.xcscheme 18 | 19 | isShown 20 | 21 | 22 | Pods-BAPickView_Example.xcscheme 23 | 24 | isShown 25 | 26 | 27 | 28 | SuppressBuildableAutocreation 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/BAPickView/ResourceBundle-BAPickView-BAPickView-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleIdentifier 8 | ${PRODUCT_BUNDLE_IDENTIFIER} 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | ${PRODUCT_NAME} 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.2.2 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Pods/Masonry/Masonry/Masonry.h: -------------------------------------------------------------------------------- 1 | // 2 | // Masonry.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Masonry. 12 | FOUNDATION_EXPORT double MasonryVersionNumber; 13 | 14 | //! Project version string for Masonry. 15 | FOUNDATION_EXPORT const unsigned char MasonryVersionString[]; 16 | 17 | #import "MASUtilities.h" 18 | #import "View+MASAdditions.h" 19 | #import "View+MASShorthandAdditions.h" 20 | #import "ViewController+MASAdditions.h" 21 | #import "NSArray+MASAdditions.h" 22 | #import "NSArray+MASShorthandAdditions.h" 23 | #import "MASConstraint.h" 24 | #import "MASCompositeConstraint.h" 25 | #import "MASViewAttribute.h" 26 | #import "MASViewConstraint.h" 27 | #import "MASConstraintMaker.h" 28 | #import "MASLayoutConstraint.h" 29 | #import "NSLayoutConstraint+MASDebugAdditions.h" 30 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Masonry/Masonry-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "MASCompositeConstraint.h" 14 | #import "MASConstraint+Private.h" 15 | #import "MASConstraint.h" 16 | #import "MASConstraintMaker.h" 17 | #import "MASLayoutConstraint.h" 18 | #import "Masonry.h" 19 | #import "MASUtilities.h" 20 | #import "MASViewAttribute.h" 21 | #import "MASViewConstraint.h" 22 | #import "NSArray+MASAdditions.h" 23 | #import "NSArray+MASShorthandAdditions.h" 24 | #import "NSLayoutConstraint+MASDebugAdditions.h" 25 | #import "View+MASAdditions.h" 26 | #import "View+MASShorthandAdditions.h" 27 | #import "ViewController+MASAdditions.h" 28 | 29 | FOUNDATION_EXPORT double MasonryVersionNumber; 30 | FOUNDATION_EXPORT const unsigned char MasonryVersionString[]; 31 | 32 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Masonry/Masonry-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/BAPickView/BAPickView-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.1.9 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Masonry/Masonry/ViewController+MASAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+MASAdditions.h 3 | // Masonry 4 | // 5 | // Created by Craig Siemens on 2015-06-23. 6 | // 7 | // 8 | 9 | #import "MASUtilities.h" 10 | #import "MASConstraintMaker.h" 11 | #import "MASViewAttribute.h" 12 | 13 | #ifdef MAS_VIEW_CONTROLLER 14 | 15 | @interface MAS_VIEW_CONTROLLER (MASAdditions) 16 | 17 | /** 18 | * following properties return a new MASViewAttribute with appropriate UILayoutGuide and NSLayoutAttribute 19 | */ 20 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuide; 21 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuide; 22 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideTop; 23 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideBottom; 24 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideTop; 25 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideBottom; 26 | 27 | 28 | @end 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 boai 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/PickerView/BAPickerResultModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // BAPickerResultModel.h 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/6. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface BAPickerResultModel : NSObject 13 | 14 | // 选中结果保存 15 | 16 | #pragma mark - common 17 | @property(nonatomic, copy) NSString *resultString; 18 | 19 | @property(nonatomic, assign) NSInteger selectRow; 20 | @property(nonatomic, assign) NSInteger selectComponent; 21 | 22 | #pragma mark - picker 23 | @property(nonatomic, strong) NSArray *resultArray; 24 | 25 | #pragma mark - 日期选择器 26 | @property(nonatomic, strong) NSDate *resultDate; 27 | 28 | @property(nonatomic, copy) NSString *selectedYear; 29 | @property(nonatomic, copy) NSString *selectedMounth; 30 | @property(nonatomic, copy) NSString *selectedDay; 31 | @property(nonatomic, copy) NSString *selectedHours; 32 | @property(nonatomic, copy) NSString *selectedMinutes; 33 | @property(nonatomic, copy) NSString *selectedSeconds; 34 | @property(nonatomic, copy) NSString *selectedWeek; 35 | 36 | @end 37 | 38 | NS_ASSUME_NONNULL_END 39 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/PickerView/BABasePickerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // BABasePickerView.h 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/6. 6 | // 7 | 8 | #import 9 | #import "BAPickerDefine.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface BABasePickerView : UIView 14 | 15 | @property(nonatomic, strong) UIPickerView *pickerView; 16 | 17 | // 返回需要展示的列(columns)的数目 18 | @property(nonatomic, copy) NSInteger (^onNumberOfComponentsInPickerView)(UIPickerView *pickerView); 19 | // 返回每一列的行(rows)数 20 | @property(nonatomic, copy) NSInteger (^onNumberOfRowsInComponent)(NSInteger component, UIPickerView *pickerView); 21 | // 返回每一行的标题 22 | @property(nonatomic, copy) NSString *(^onTitleForRowAndComponent)(NSInteger row, NSInteger component, UIPickerView *pickerView); 23 | // 选中每一行的标题 24 | @property(nonatomic, copy) void (^onDidSelectRowAndComponent)(NSInteger row, NSInteger component, UIPickerView *pickerView); 25 | // 自定义文本 26 | @property(nonatomic, copy) UIView *(^onViewForRowAndComponent)(NSInteger row, NSInteger component, UIView *reusingView, UIPickerView *pickerView); 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /BAPickView/Classes/PickerView/BAPickerResultModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // BAPickerResultModel.h 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/6. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface BAPickerResultModel : NSObject 13 | 14 | // 选中结果保存 15 | 16 | #pragma mark - common 17 | @property(nonatomic, copy) NSString *resultString; 18 | 19 | @property(nonatomic, assign) NSInteger selectRow; 20 | @property(nonatomic, assign) NSInteger selectComponent; 21 | 22 | #pragma mark - picker 23 | @property(nonatomic, strong) NSArray *resultArray; 24 | 25 | #pragma mark - 日期选择器 26 | /// 只有系统日期选择器才会返回 27 | @property(nonatomic, strong) NSDate *resultDate; 28 | 29 | @property(nonatomic, assign) NSInteger selectedYear; 30 | @property(nonatomic, assign) NSInteger selectedMonth; 31 | @property(nonatomic, assign) NSInteger selectedDay; 32 | @property(nonatomic, assign) NSInteger selectedHours; 33 | @property(nonatomic, assign) NSInteger selectedMinutes; 34 | @property(nonatomic, assign) NSInteger selectedSeconds; 35 | @property(nonatomic, assign) NSInteger selectedWeek; 36 | 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 boai 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Example/Pods/Masonry/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/BAPickView/BAPickView-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "BADatePickerView.h" 14 | #import "BAPickerBasePopView.h" 15 | #import "BAPickerConfigerModel.h" 16 | #import "BAPickerDefine.h" 17 | #import "BAPickerToolBarView.h" 18 | #import "BAPickerView.h" 19 | #import "BAKit_ConfigurationDefine.h" 20 | #import "BAKit_DatePicker.h" 21 | #import "BAKit_DefineCurrent.h" 22 | #import "BAKit_DefineFormat.h" 23 | #import "BAKit_PickerToolBarView.h" 24 | #import "BAKit_PickerView.h" 25 | #import "BAKit_PickerViewConfig.h" 26 | #import "BAPickView_OC.h" 27 | #import "BAPickView_Version.h" 28 | #import "NSBundle+BAPod.h" 29 | #import "NSDate+BAKit.h" 30 | #import "NSDateFormatter+BAKit.h" 31 | #import "NSString+BATime.h" 32 | #import "UIView+BAAnimation.h" 33 | #import "UIView+BARectCorner_pick.h" 34 | 35 | FOUNDATION_EXPORT double BAPickViewVersionNumber; 36 | FOUNDATION_EXPORT const unsigned char BAPickViewVersionString[]; 37 | 38 | -------------------------------------------------------------------------------- /Example/Pods/Masonry/Masonry/NSArray+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MASShorthandAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 22/07/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "NSArray+MASAdditions.h" 10 | 11 | #ifdef MAS_SHORTHAND 12 | 13 | /** 14 | * Shorthand array additions without the 'mas_' prefixes, 15 | * only enabled if MAS_SHORTHAND is defined 16 | */ 17 | @interface NSArray (MASShorthandAdditions) 18 | 19 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; 20 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; 21 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; 22 | 23 | @end 24 | 25 | @implementation NSArray (MASShorthandAdditions) 26 | 27 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block { 28 | return [self mas_makeConstraints:block]; 29 | } 30 | 31 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block { 32 | return [self mas_updateConstraints:block]; 33 | } 34 | 35 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block { 36 | return [self mas_remakeConstraints:block]; 37 | } 38 | 39 | @end 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /BAPickView/Classes/PickerView/BABasePickerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // BABasePickerView.h 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/6. 6 | // 7 | 8 | #import 9 | #import "BAPickerDefine.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface BABasePickerView : UIView 14 | 15 | @property(nonatomic, strong) UIPickerView *pickerView; 16 | 17 | // 返回需要展示的列(columns)的数目 18 | @property(nonatomic, copy) NSInteger (^onNumberOfComponentsInPickerView)(UIPickerView *pickerView); 19 | // 返回每一列的行(rows)数 20 | @property(nonatomic, copy) NSInteger (^onNumberOfRowsInComponent)(NSInteger component, UIPickerView *pickerView); 21 | // 返回每一行的标题 22 | @property(nonatomic, copy) NSString *(^onTitleForRowAndComponent)(NSInteger row, NSInteger component, UIPickerView *pickerView); 23 | // 选中每一行的标题 24 | @property(nonatomic, copy) void (^onDidSelectRowAndComponent)(NSInteger row, NSInteger component, UIPickerView *pickerView); 25 | // 每一行的高度 26 | @property(nonatomic, copy) CGFloat (^onRowHeightForComponent)(NSInteger component, UIPickerView *pickerView); 27 | // 自定义文本 28 | @property(nonatomic, copy) UIView *(^onViewForRowAndComponent)(NSInteger row, NSInteger component, UIView *reusingView, UIPickerView *pickerView); 29 | 30 | @end 31 | 32 | NS_ASSUME_NONNULL_END 33 | -------------------------------------------------------------------------------- /BAPickView/Classes/PickerView/BAPickerBasePopView.h: -------------------------------------------------------------------------------- 1 | // 2 | // BAPickerBasePopView.h 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/1. 6 | // 7 | 8 | #import 9 | #import "BAPickerDefine.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | typedef NS_ENUM(NSUInteger, BAPickerBasePopViewAnimationStyle) { 14 | BAPickerBasePopViewAnimationStyle_None, 15 | BAPickerBasePopViewAnimationStyle_Bottom, 16 | }; 17 | 18 | @interface BAPickerBasePopView : UIView 19 | 20 | /** 21 | LYBasePopView:父类 view,可以在上面加载任意 view 22 | */ 23 | @property(nonatomic, strong) UIView *contentView; 24 | /// 默认:[UIColor.blackColor colorWithAlphaComponent:0.3] 25 | @property(nonatomic, strong) UIColor *maskViewBackgroundColor; 26 | 27 | @property(nonatomic, assign) CGFloat contentViewHeight; 28 | 29 | /// 是否支持触摸边缘地区隐藏 popView,默认 NO 30 | @property(nonatomic, assign) BOOL enableTouchDismiss; 31 | 32 | @property(nonatomic, assign) CGFloat contentViewCorners; 33 | @property(nonatomic, assign) BOOL needContentViewTopCorner; 34 | // 动画样式 35 | @property(nonatomic, assign) BAPickerBasePopViewAnimationStyle animationStyle; 36 | 37 | @property(nonatomic, copy) void (^onDismiss)(void); 38 | 39 | - (void)show; 40 | - (void)showOnView:(UIView *)view; 41 | 42 | - (void)dismiss; 43 | 44 | @end 45 | 46 | NS_ASSUME_NONNULL_END 47 | -------------------------------------------------------------------------------- /BAPickView/Classes/Tools/BAKit_DefineFormat.h: -------------------------------------------------------------------------------- 1 | // 2 | // BAKit_DefineFormat.h 3 | // BAKit 4 | // 5 | // Created by boai on 2017/6/9. 6 | // Copyright © 2017年 boai. All rights reserved. 7 | // 8 | 9 | #ifndef BAKit_DefineFormat_h 10 | #define BAKit_DefineFormat_h 11 | 12 | 13 | #define BAKit_FormatString_YMD @"yyyy-MM-dd" 14 | #define BAKit_FormatString_YMDHM @"yyyy-MM-dd HH:mm" 15 | #define BAKit_FormatString_YMDHMS @"yyyy-MM-dd HH:mm:ss" 16 | #define BAKit_FormatString_YMDEHMS @"yyyy-MM-dd, EEE, HH:mm:ss" 17 | #define BAKit_FormatString_YM @"yyyy-MM" 18 | #define BAKit_FormatString_MDHM @"MM-dd HH:mm" 19 | 20 | #define BAKit_FormatString_YMD2 @"yyyy/MM/dd" 21 | #define BAKit_FormatString_YMDHM2 @"yyyy/MM/dd HH:mm" 22 | #define BAKit_FormatString_YMDHMS2 @"yyyy/MM/dd HH:mm:ss" 23 | #define BAKit_FormatString_YMDEHMS2 @"yyyy/MM/dd, EEE, HH:mm:ss" 24 | #define BAKit_FormatString_YM2 @"yyyy/MM" 25 | 26 | #define BAKit_FormatString_YMD3 @"yyyy年MM月dd日" 27 | 28 | #define BAKit_FormatString_Y @"yyyy" 29 | #define BAKit_FormatString_M @"MM" 30 | #define BAKit_FormatString_D @"dd" 31 | #define BAKit_FormatString_HM @"HH:mm" 32 | #define BAKit_FormatString_HMS @"HH:mm:ss" 33 | 34 | 35 | 36 | 37 | 38 | #endif /* BAKit_DefineFormat_h */ 39 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/Tools/BAKit_DefineFormat.h: -------------------------------------------------------------------------------- 1 | // 2 | // BAKit_DefineFormat.h 3 | // BAKit 4 | // 5 | // Created by boai on 2017/6/9. 6 | // Copyright © 2017年 boai. All rights reserved. 7 | // 8 | 9 | #ifndef BAKit_DefineFormat_h 10 | #define BAKit_DefineFormat_h 11 | 12 | 13 | #define BAKit_FormatString_YMD @"yyyy-MM-dd" 14 | #define BAKit_FormatString_YMDHM @"yyyy-MM-dd HH:mm" 15 | #define BAKit_FormatString_YMDHMS @"yyyy-MM-dd HH:mm:ss" 16 | #define BAKit_FormatString_YMDEHMS @"yyyy-MM-dd, EEE, HH:mm:ss" 17 | #define BAKit_FormatString_YM @"yyyy-MM" 18 | #define BAKit_FormatString_MDHM @"MM-dd HH:mm" 19 | 20 | #define BAKit_FormatString_YMD2 @"yyyy/MM/dd" 21 | #define BAKit_FormatString_YMDHM2 @"yyyy/MM/dd HH:mm" 22 | #define BAKit_FormatString_YMDHMS2 @"yyyy/MM/dd HH:mm:ss" 23 | #define BAKit_FormatString_YMDEHMS2 @"yyyy/MM/dd, EEE, HH:mm:ss" 24 | #define BAKit_FormatString_YM2 @"yyyy/MM" 25 | 26 | #define BAKit_FormatString_YMD3 @"yyyy年MM月dd日" 27 | 28 | #define BAKit_FormatString_Y @"yyyy" 29 | #define BAKit_FormatString_M @"MM" 30 | #define BAKit_FormatString_D @"dd" 31 | #define BAKit_FormatString_HM @"HH:mm" 32 | #define BAKit_FormatString_HMS @"HH:mm:ss" 33 | 34 | 35 | 36 | 37 | 38 | #endif /* BAKit_DefineFormat_h */ 39 | -------------------------------------------------------------------------------- /Example/Pods/Masonry/Masonry/MASViewAttribute.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASViewAttribute.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASViewAttribute.h" 10 | 11 | @implementation MASViewAttribute 12 | 13 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute { 14 | self = [self initWithView:view item:view layoutAttribute:layoutAttribute]; 15 | return self; 16 | } 17 | 18 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute { 19 | self = [super init]; 20 | if (!self) return nil; 21 | 22 | _view = view; 23 | _item = item; 24 | _layoutAttribute = layoutAttribute; 25 | 26 | return self; 27 | } 28 | 29 | - (BOOL)isSizeAttribute { 30 | return self.layoutAttribute == NSLayoutAttributeWidth 31 | || self.layoutAttribute == NSLayoutAttributeHeight; 32 | } 33 | 34 | - (BOOL)isEqual:(MASViewAttribute *)viewAttribute { 35 | if ([viewAttribute isKindOfClass:self.class]) { 36 | return self.view == viewAttribute.view 37 | && self.layoutAttribute == viewAttribute.layoutAttribute; 38 | } 39 | return [super isEqual:viewAttribute]; 40 | } 41 | 42 | - (NSUInteger)hash { 43 | return MAS_NSUINTROTATE([self.view hash], MAS_NSUINT_BIT / 2) ^ self.layoutAttribute; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/BAPickView.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BAPickView", 3 | "version": "1.2.2", 4 | "summary": "BAPickView 精简高效的选择器!", 5 | "description": "V1.2.2 全新改版,优化一些小问题", 6 | "homepage": "https://github.com/BAHome/BAPickView", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "boai": "sunboyan@outlook.com" 13 | }, 14 | "source": { 15 | "git": "https://github.com/BAHome/BAPickView.git", 16 | "tag": "1.2.2" 17 | }, 18 | "platforms": { 19 | "ios": "9.0" 20 | }, 21 | "source_files": "BAPickView/Classes/BAPickView_OC.h", 22 | "resource_bundles": { 23 | "BAPickView": [ 24 | "BAPickView/Resources/*.{bundle}" 25 | ] 26 | }, 27 | "dependencies": { 28 | "Masonry": [ 29 | 30 | ] 31 | }, 32 | "frameworks": [ 33 | "UIKit", 34 | "Foundation" 35 | ], 36 | "requires_arc": true, 37 | "subspecs": [ 38 | { 39 | "name": "Tools", 40 | "source_files": "BAPickView/Classes/Tools/*.{h,m}", 41 | "prefix_header_contents": [ 42 | "#import ", 43 | "#import ", 44 | "#import \"BAKit_ConfigurationDefine.h\"" 45 | ] 46 | }, 47 | { 48 | "name": "PickerView", 49 | "dependencies": { 50 | "BAPickView/Tools": [ 51 | 52 | ] 53 | }, 54 | "source_files": "BAPickView/Classes/PickerView/*.{h,m}" 55 | } 56 | ] 57 | } 58 | -------------------------------------------------------------------------------- /Example/Pods/Masonry/Masonry/MASViewAttribute.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASViewAttribute.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * An immutable tuple which stores the view and the related NSLayoutAttribute. 13 | * Describes part of either the left or right hand side of a constraint equation 14 | */ 15 | @interface MASViewAttribute : NSObject 16 | 17 | /** 18 | * The view which the reciever relates to. Can be nil if item is not a view. 19 | */ 20 | @property (nonatomic, weak, readonly) MAS_VIEW *view; 21 | 22 | /** 23 | * The item which the reciever relates to. 24 | */ 25 | @property (nonatomic, weak, readonly) id item; 26 | 27 | /** 28 | * The attribute which the reciever relates to 29 | */ 30 | @property (nonatomic, assign, readonly) NSLayoutAttribute layoutAttribute; 31 | 32 | /** 33 | * Convenience initializer. 34 | */ 35 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute; 36 | 37 | /** 38 | * The designated initializer. 39 | */ 40 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute; 41 | 42 | /** 43 | * Determine whether the layoutAttribute is a size attribute 44 | * 45 | * @return YES if layoutAttribute is equal to NSLayoutAttributeWidth or NSLayoutAttributeHeight 46 | */ 47 | - (BOOL)isSizeAttribute; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Example/Pods/Masonry/Masonry/ViewController+MASAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+MASAdditions.m 3 | // Masonry 4 | // 5 | // Created by Craig Siemens on 2015-06-23. 6 | // 7 | // 8 | 9 | #import "ViewController+MASAdditions.h" 10 | 11 | #ifdef MAS_VIEW_CONTROLLER 12 | 13 | @implementation MAS_VIEW_CONTROLLER (MASAdditions) 14 | 15 | - (MASViewAttribute *)mas_topLayoutGuide { 16 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; 17 | } 18 | - (MASViewAttribute *)mas_topLayoutGuideTop { 19 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeTop]; 20 | } 21 | - (MASViewAttribute *)mas_topLayoutGuideBottom { 22 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; 23 | } 24 | 25 | - (MASViewAttribute *)mas_bottomLayoutGuide { 26 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop]; 27 | } 28 | - (MASViewAttribute *)mas_bottomLayoutGuideTop { 29 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop]; 30 | } 31 | - (MASViewAttribute *)mas_bottomLayoutGuideBottom { 32 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; 33 | } 34 | 35 | 36 | 37 | @end 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /Example/Pods/Masonry/Masonry/MASViewConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASViewConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASViewAttribute.h" 10 | #import "MASConstraint.h" 11 | #import "MASLayoutConstraint.h" 12 | #import "MASUtilities.h" 13 | 14 | /** 15 | * A single constraint. 16 | * Contains the attributes neccessary for creating a NSLayoutConstraint and adding it to the appropriate view 17 | */ 18 | @interface MASViewConstraint : MASConstraint 19 | 20 | /** 21 | * First item/view and first attribute of the NSLayoutConstraint 22 | */ 23 | @property (nonatomic, strong, readonly) MASViewAttribute *firstViewAttribute; 24 | 25 | /** 26 | * Second item/view and second attribute of the NSLayoutConstraint 27 | */ 28 | @property (nonatomic, strong, readonly) MASViewAttribute *secondViewAttribute; 29 | 30 | /** 31 | * initialises the MASViewConstraint with the first part of the equation 32 | * 33 | * @param firstViewAttribute view.mas_left, view.mas_width etc. 34 | * 35 | * @return a new view constraint 36 | */ 37 | - (id)initWithFirstViewAttribute:(MASViewAttribute *)firstViewAttribute; 38 | 39 | /** 40 | * Returns all MASViewConstraints installed with this view as a first item. 41 | * 42 | * @param view A view to retrieve constraints for. 43 | * 44 | * @return An array of MASViewConstraints. 45 | */ 46 | + (NSArray *)installedConstraintsForView:(MAS_VIEW *)view; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Example/BAPickView/BAPickView-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(CURRENT_PROJECT_VERSION) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /BAPickView/Classes/Tools/NSBundle+BAPod.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSBundle+BAPod.m 3 | // BAAlert_Example 4 | // 5 | // Created by 孙博岩 on 2018/11/15. 6 | // Copyright © 2018 boai. All rights reserved. 7 | // 8 | 9 | #import "NSBundle+BAPod.h" 10 | 11 | @implementation NSBundle (BAPod) 12 | 13 | /** 14 | 获取文件所在name,默认情况下podName和bundlename相同,传一个即可 15 | 16 | @param bundleName bundle名字,就是在resource_bundles里面的名字 17 | @param podName pod的名字 18 | @return bundle 19 | */ 20 | + (NSBundle *)ba_bundleWithBundleName:(NSString *)bundleName 21 | podName:(NSString *)podName { 22 | if (bundleName == nil && podName == nil) { 23 | @throw @"bundleName和podName不能同时为空"; 24 | }else if (bundleName == nil ) { 25 | bundleName = podName; 26 | }else if (podName == nil) { 27 | podName = bundleName; 28 | } 29 | 30 | if ([bundleName containsString:@".bundle"]) { 31 | bundleName = [bundleName componentsSeparatedByString:@".bundle"].firstObject; 32 | } 33 | //没使用framwork的情况下 34 | NSURL *associateBundleURL = [[NSBundle mainBundle] URLForResource:bundleName withExtension:@"bundle"]; 35 | //使用framework形式 36 | if (!associateBundleURL) { 37 | associateBundleURL = [[NSBundle mainBundle] URLForResource:@"Frameworks" withExtension:nil]; 38 | associateBundleURL = [associateBundleURL URLByAppendingPathComponent:podName]; 39 | associateBundleURL = [associateBundleURL URLByAppendingPathExtension:@"framework"]; 40 | NSBundle *associateBunle = [NSBundle bundleWithURL:associateBundleURL]; 41 | associateBundleURL = [associateBunle URLForResource:bundleName withExtension:@"bundle"]; 42 | } 43 | 44 | NSAssert(associateBundleURL, @"取不到关联bundle"); 45 | //生产环境直接返回空 46 | return associateBundleURL?[NSBundle bundleWithURL:associateBundleURL]:nil; 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/Tools/NSBundle+BAPod.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSBundle+BAPod.m 3 | // BAAlert_Example 4 | // 5 | // Created by 孙博岩 on 2018/11/15. 6 | // Copyright © 2018 boai. All rights reserved. 7 | // 8 | 9 | #import "NSBundle+BAPod.h" 10 | 11 | @implementation NSBundle (BAPod) 12 | 13 | /** 14 | 获取文件所在name,默认情况下podName和bundlename相同,传一个即可 15 | 16 | @param bundleName bundle名字,就是在resource_bundles里面的名字 17 | @param podName pod的名字 18 | @return bundle 19 | */ 20 | + (NSBundle *)ba_bundleWithBundleName:(NSString *)bundleName 21 | podName:(NSString *)podName { 22 | if (bundleName == nil && podName == nil) { 23 | @throw @"bundleName和podName不能同时为空"; 24 | }else if (bundleName == nil ) { 25 | bundleName = podName; 26 | }else if (podName == nil) { 27 | podName = bundleName; 28 | } 29 | 30 | if ([bundleName containsString:@".bundle"]) { 31 | bundleName = [bundleName componentsSeparatedByString:@".bundle"].firstObject; 32 | } 33 | //没使用framwork的情况下 34 | NSURL *associateBundleURL = [[NSBundle mainBundle] URLForResource:bundleName withExtension:@"bundle"]; 35 | //使用framework形式 36 | if (!associateBundleURL) { 37 | associateBundleURL = [[NSBundle mainBundle] URLForResource:@"Frameworks" withExtension:nil]; 38 | associateBundleURL = [associateBundleURL URLByAppendingPathComponent:podName]; 39 | associateBundleURL = [associateBundleURL URLByAppendingPathExtension:@"framework"]; 40 | NSBundle *associateBunle = [NSBundle bundleWithURL:associateBundleURL]; 41 | associateBundleURL = [associateBunle URLForResource:bundleName withExtension:@"bundle"]; 42 | } 43 | 44 | NSAssert(associateBundleURL, @"取不到关联bundle"); 45 | //生产环境直接返回空 46 | return associateBundleURL?[NSBundle bundleWithURL:associateBundleURL]:nil; 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## User settings 6 | xcuserdata/ 7 | 8 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 9 | *.xcscmblueprint 10 | *.xccheckout 11 | 12 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 13 | build/ 14 | DerivedData/ 15 | *.moved-aside 16 | *.pbxuser 17 | !default.pbxuser 18 | *.mode1v3 19 | !default.mode1v3 20 | *.mode2v3 21 | !default.mode2v3 22 | *.perspectivev3 23 | !default.perspectivev3 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | 28 | ## App packaging 29 | *.ipa 30 | *.dSYM.zip 31 | *.dSYM 32 | 33 | # CocoaPods 34 | # 35 | # We recommend against adding the Pods directory to your .gitignore. However 36 | # you should judge for yourself, the pros and cons are mentioned at: 37 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 38 | # 39 | # Pods/ 40 | # 41 | # Add this line if you want to avoid checking in source code from the Xcode workspace 42 | # *.xcworkspace 43 | 44 | # Carthage 45 | # 46 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 47 | # Carthage/Checkouts 48 | 49 | Carthage/Build/ 50 | 51 | # fastlane 52 | # 53 | # It is recommended to not store the screenshots in the git repo. 54 | # Instead, use fastlane to re-generate the screenshots whenever they are needed. 55 | # For more information about the recommended setup visit: 56 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 57 | 58 | fastlane/report.xml 59 | fastlane/Preview.html 60 | fastlane/screenshots/**/*.png 61 | fastlane/test_output 62 | 63 | # Code Injection 64 | # 65 | # After new code Injection tools there's a generated folder /iOSInjectionProject 66 | # https://github.com/johnno1962/injectionforxcode 67 | 68 | iOSInjectionProject/ -------------------------------------------------------------------------------- /BAPickView/Classes/PickerView/BAPickerDefine.h: -------------------------------------------------------------------------------- 1 | // 2 | // BAPickerDefine.h 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/1. 6 | // 7 | 8 | #ifndef BAPickerDefine_h 9 | #define BAPickerDefine_h 10 | 11 | #import 12 | #import 13 | 14 | #import 15 | 16 | #import "BACityModel.h" 17 | #import "BAPickerResultModel.h" 18 | 19 | #import "BAKit_ConfigurationDefine.h" 20 | #import "NSDate+BAKit.h" 21 | #import "NSDateFormatter+BAKit.h" 22 | #import "NSBundle+BAPod.h" 23 | 24 | // picker、datePicker 回调 25 | typedef void (^BAPickerResultBlock)(BAPickerResultModel *resultModel); 26 | // cityPicker 回调 27 | typedef void (^BAPickerCityResultBlock)(BACityModel *model); 28 | 29 | typedef NS_ENUM(NSUInteger, BADatePickerType) { 30 | // 2020-08-28 31 | BADatePickerTypeYMD = 0, 32 | // 2020 33 | BADatePickerTypeYY, 34 | // 2020-08 35 | BADatePickerTypeYM, 36 | // 08-28 37 | BADatePickerTypeMD, 38 | // 2020-08-28 15:33 39 | BADatePickerTypeYMDHM, 40 | // 2020-08-28 15:33:58 41 | BADatePickerTypeYMDHMS, 42 | // 15:33 43 | BADatePickerTypeHM, 44 | // 15:33:58 45 | BADatePickerTypeHMS, 46 | // 2021年,第21周 47 | BADatePickerTypeYearWeek, 48 | }; 49 | 50 | 51 | // 获取当前最顶部的 window 52 | CG_INLINE UIWindow * 53 | kBAPickerGetAlertWindow() { 54 | UIWindow *alertWindow = [UIApplication sharedApplication].keyWindow; 55 | if (alertWindow.windowLevel != UIWindowLevelNormal) { 56 | NSPredicate *predicate = [NSPredicate predicateWithFormat:@"windowLevel == %ld AND hidden == 0 " , UIWindowLevelNormal]; 57 | alertWindow = [[UIApplication sharedApplication].windows filteredArrayUsingPredicate:predicate].firstObject; 58 | } 59 | return alertWindow; 60 | } 61 | 62 | // 移除 view 所有 subviews 63 | CG_INLINE void 64 | kBAPickerRemoveAllSubviews(UIView *view) { 65 | while (view.subviews.count) { 66 | [view.subviews.lastObject removeFromSuperview]; 67 | } 68 | } 69 | 70 | #endif /* BAPickerDefine_h */ 71 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/PickerView/BAPickerDefine.h: -------------------------------------------------------------------------------- 1 | // 2 | // BAPickerDefine.h 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/1. 6 | // 7 | 8 | #ifndef BAPickerDefine_h 9 | #define BAPickerDefine_h 10 | 11 | #import 12 | #import 13 | 14 | #import 15 | 16 | #import "BACityModel.h" 17 | #import "BAPickerResultModel.h" 18 | 19 | #import "BAKit_ConfigurationDefine.h" 20 | #import "NSDate+BAKit.h" 21 | #import "NSDateFormatter+BAKit.h" 22 | #import "NSBundle+BAPod.h" 23 | 24 | // picker、datePicker 回调 25 | typedef void (^BAPickerResultBlock)(BAPickerResultModel *resultModel); 26 | // cityPicker 回调 27 | typedef void (^BAPickerCityResultBlock)(BACityModel *model); 28 | 29 | typedef NS_ENUM(NSUInteger, BADatePickerType) { 30 | // 2020-08-28 31 | BADatePickerTypeYMD = 0, 32 | // 2020 33 | BADatePickerTypeYY, 34 | // 2020-08 35 | BADatePickerTypeYM, 36 | // 08-28 37 | BADatePickerTypeMD, 38 | // 2020-08-28 15:33 39 | BADatePickerTypeYMDHM, 40 | // 2020-08-28 15:33:58 41 | BADatePickerTypeYMDHMS, 42 | // 15:33 43 | BADatePickerTypeHM, 44 | // 15:33:58 45 | BADatePickerTypeHMS, 46 | // 2021年,第21周 47 | BADatePickerTypeYearWeek, 48 | }; 49 | 50 | 51 | // 获取当前最顶部的 window 52 | CG_INLINE UIWindow * 53 | kBAPickerGetAlertWindow() { 54 | UIWindow *alertWindow = [UIApplication sharedApplication].keyWindow; 55 | if (alertWindow.windowLevel != UIWindowLevelNormal) { 56 | NSPredicate *predicate = [NSPredicate predicateWithFormat:@"windowLevel == %ld AND hidden == 0 " , UIWindowLevelNormal]; 57 | alertWindow = [[UIApplication sharedApplication].windows filteredArrayUsingPredicate:predicate].firstObject; 58 | } 59 | return alertWindow; 60 | } 61 | 62 | // 移除 view 所有 subviews 63 | CG_INLINE void 64 | kBAPickerRemoveAllSubviews(UIView *view) { 65 | while (view.subviews.count) { 66 | [view.subviews.lastObject removeFromSuperview]; 67 | } 68 | } 69 | 70 | #endif /* BAPickerDefine_h */ 71 | -------------------------------------------------------------------------------- /Example/BAPickView/Images.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 | } 99 | -------------------------------------------------------------------------------- /Example/Pods/Masonry/Masonry/MASConstraint+Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASConstraint+Private.h 3 | // Masonry 4 | // 5 | // Created by Nick Tymchenko on 29/04/14. 6 | // Copyright (c) 2014 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASConstraint.h" 10 | 11 | @protocol MASConstraintDelegate; 12 | 13 | 14 | @interface MASConstraint () 15 | 16 | /** 17 | * Whether or not to check for an existing constraint instead of adding constraint 18 | */ 19 | @property (nonatomic, assign) BOOL updateExisting; 20 | 21 | /** 22 | * Usually MASConstraintMaker but could be a parent MASConstraint 23 | */ 24 | @property (nonatomic, weak) id delegate; 25 | 26 | /** 27 | * Based on a provided value type, is equal to calling: 28 | * NSNumber - setOffset: 29 | * NSValue with CGPoint - setPointOffset: 30 | * NSValue with CGSize - setSizeOffset: 31 | * NSValue with MASEdgeInsets - setInsets: 32 | */ 33 | - (void)setLayoutConstantWithValue:(NSValue *)value; 34 | 35 | @end 36 | 37 | 38 | @interface MASConstraint (Abstract) 39 | 40 | /** 41 | * Sets the constraint relation to given NSLayoutRelation 42 | * returns a block which accepts one of the following: 43 | * MASViewAttribute, UIView, NSValue, NSArray 44 | * see readme for more details. 45 | */ 46 | - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation; 47 | 48 | /** 49 | * Override to set a custom chaining behaviour 50 | */ 51 | - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute; 52 | 53 | @end 54 | 55 | 56 | @protocol MASConstraintDelegate 57 | 58 | /** 59 | * Notifies the delegate when the constraint needs to be replaced with another constraint. For example 60 | * A MASViewConstraint may turn into a MASCompositeConstraint when an array is passed to one of the equality blocks 61 | */ 62 | - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint; 63 | 64 | - (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute; 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /Example/BAPickView/BAAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // BAAppDelegate.m 3 | // BAPickView 4 | // 5 | // Created by boai on 11/27/2018. 6 | // Copyright (c) 2018 boai. All rights reserved. 7 | // 8 | 9 | #import "BAAppDelegate.h" 10 | 11 | @implementation BAAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 14 | // Override point for customization after application launch. 15 | return YES; 16 | } 17 | 18 | - (void)applicationWillResignActive:(UIApplication *)application { 19 | // 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. 20 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 21 | } 22 | 23 | - (void)applicationDidEnterBackground:(UIApplication *)application { 24 | // 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. 25 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 26 | } 27 | 28 | - (void)applicationWillEnterForeground:(UIApplication *)application { 29 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 30 | } 31 | 32 | - (void)applicationDidBecomeActive:(UIApplication *)application { 33 | // 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. 34 | } 35 | 36 | - (void)applicationWillTerminate:(UIApplication *)application { 37 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /BAPickView.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint BAPickView.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'BAPickView' 11 | s.version = '1.2.5' 12 | s.summary = 'BAPickView 精简高效的选择器!' 13 | 14 | # This description is used to generate tags and improve search results. 15 | # * Think: What does it do? Why did you write it? What is the focus? 16 | # * Try to keep it short, snappy and to the point. 17 | # * Write the description between the DESC delimiters below. 18 | # * Finally, don't worry about the indent, CocoaPods strips it! 19 | 20 | s.description = <<-DESC 21 | V1.2.3 全新改版,优化一些小问题 22 | DESC 23 | 24 | s.homepage = 'https://github.com/BAHome/BAPickView' 25 | # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' 26 | s.license = { :type => 'MIT', :file => 'LICENSE' } 27 | s.author = { 'boai' => 'sunboyan@outlook.com' } 28 | s.source = { :git => 'https://github.com/BAHome/BAPickView.git', :tag => s.version.to_s } 29 | # s.social_media_url = 'https://twitter.com/' 30 | 31 | s.ios.deployment_target = '9.0' 32 | 33 | s.source_files = 'BAPickView/Classes/BAPickView_OC.h' 34 | s.resource_bundles = { 35 | 'BAPickView' => ['BAPickView/Resources/*.{bundle}'] 36 | } 37 | 38 | # Tools 39 | s.subspec 'Tools' do |stools| 40 | stools.source_files = "BAPickView/Classes/Tools/*.{h,m}" 41 | stools.prefix_header_contents = 42 | '#import ', 43 | '#import ', 44 | '#import "BAKit_ConfigurationDefine.h"' 45 | end 46 | 47 | # PickerView 48 | s.subspec 'PickerView' do |spicker| 49 | spicker.dependency "BAPickView/Tools" 50 | spicker.source_files = "BAPickView/Classes/PickerView/*.{h,m}" 51 | 52 | end 53 | 54 | s.dependency "Masonry" 55 | 56 | s.frameworks = 'UIKit', 'Foundation' 57 | s.requires_arc = true 58 | 59 | end 60 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/sunboyan.xcuserdatad/xcschemes/BAPickView-BAPickView.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 53 | 54 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/sunboyan.xcuserdatad/xcschemes/Masonry.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/sunboyan.xcuserdatad/xcschemes/BAPickView.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /BAPickView/Classes/PickerView/BAPickerConfigModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // BAPickerConfigModel.m 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/1. 6 | // 7 | 8 | #import "BAPickerConfigModel.h" 9 | 10 | @implementation BAPickerConfigModel 11 | 12 | @end 13 | 14 | @implementation BAPickerConfigBaseModel 15 | 16 | - (instancetype)init { 17 | self = [super init]; 18 | if (self) { 19 | if (!self.toolBarModel) { 20 | self.toolBarModel = BAPickerToolBarModel.new; 21 | } 22 | 23 | self.maskViewBackgroundColor = [UIColor.blackColor colorWithAlphaComponent:0.3]; 24 | 25 | self.pickerHeight = 240; 26 | self.toolBarHeight = 44; 27 | 28 | self.enableTouchDismiss = YES; 29 | } 30 | return self; 31 | } 32 | 33 | @end 34 | 35 | @implementation BAPickerModel 36 | 37 | @end 38 | 39 | @implementation BADatePickerModel 40 | 41 | - (instancetype)init { 42 | self = [super init]; 43 | if (self) { 44 | 45 | NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; 46 | NSDate *currentDate = [NSDate date]; 47 | NSDateComponents *comps = [[NSDateComponents alloc] init]; 48 | comps.year = 60; 49 | NSDate *maxDate = [calendar dateByAddingComponents:comps toDate:currentDate options:0]; 50 | 51 | comps.year = -60; 52 | NSDate *minDate = [calendar dateByAddingComponents:comps toDate:currentDate options:0]; 53 | 54 | self.minimumDate = minDate; 55 | self.maximumDate = maxDate; 56 | 57 | self.formatterString = @"yyyy-MM-dd"; 58 | } 59 | return self; 60 | } 61 | 62 | @end 63 | 64 | @implementation BAPickerToolBarModel 65 | 66 | - (instancetype)init { 67 | self = [super init]; 68 | if (self) { 69 | self.showResult = YES; 70 | self.showBottomLine = YES; 71 | 72 | self.cancleTitleFont = [UIFont systemFontOfSize:14]; 73 | self.sureTitleFont = [UIFont systemFontOfSize:14]; 74 | self.titleFont = [UIFont boldSystemFontOfSize:16]; 75 | 76 | self.lineColor = BAKit_Color_RGB_pod(204, 204, 204); 77 | } 78 | return self; 79 | } 80 | 81 | - (BOOL)temp_showDefaultResult { 82 | BOOL isShowDefaultResult = self.title.length <= 0 && self.showResult; 83 | return isShowDefaultResult; 84 | } 85 | 86 | @end 87 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/PickerView/BAPickerConfigModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // BAPickerConfigModel.m 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/1. 6 | // 7 | 8 | #import "BAPickerConfigModel.h" 9 | 10 | @implementation BAPickerConfigModel 11 | 12 | @end 13 | 14 | @implementation BAPickerConfigBaseModel 15 | 16 | - (instancetype)init { 17 | self = [super init]; 18 | if (self) { 19 | if (!self.toolBarModel) { 20 | self.toolBarModel = BAPickerToolBarModel.new; 21 | } 22 | 23 | self.maskViewBackgroundColor = [UIColor.blackColor colorWithAlphaComponent:0.3]; 24 | 25 | self.pickerHeight = 240; 26 | self.toolBarHeight = 44; 27 | 28 | self.enableTouchDismiss = YES; 29 | } 30 | return self; 31 | } 32 | 33 | @end 34 | 35 | @implementation BAPickerModel 36 | 37 | @end 38 | 39 | @implementation BADatePickerModel 40 | 41 | - (instancetype)init { 42 | self = [super init]; 43 | if (self) { 44 | 45 | NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; 46 | NSDate *currentDate = [NSDate date]; 47 | NSDateComponents *comps = [[NSDateComponents alloc] init]; 48 | comps.year = 60; 49 | NSDate *maxDate = [calendar dateByAddingComponents:comps toDate:currentDate options:0]; 50 | 51 | comps.year = -60; 52 | NSDate *minDate = [calendar dateByAddingComponents:comps toDate:currentDate options:0]; 53 | 54 | self.minimumDate = minDate; 55 | self.maximumDate = maxDate; 56 | 57 | self.formatterString = @"yyyy-MM-dd"; 58 | } 59 | return self; 60 | } 61 | 62 | @end 63 | 64 | @implementation BAPickerToolBarModel 65 | 66 | - (instancetype)init { 67 | self = [super init]; 68 | if (self) { 69 | self.showResult = YES; 70 | self.showBottomLine = YES; 71 | 72 | self.cancleTitleFont = [UIFont systemFontOfSize:14]; 73 | self.sureTitleFont = [UIFont systemFontOfSize:14]; 74 | self.titleFont = [UIFont boldSystemFontOfSize:16]; 75 | 76 | self.lineColor = kColorWithHex(0xCCCCCC); 77 | } 78 | return self; 79 | } 80 | 81 | - (BOOL)temp_showDefaultResult { 82 | BOOL isShowDefaultResult = self.title.length <= 0 && self.showResult; 83 | return isShowDefaultResult; 84 | } 85 | 86 | @end 87 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/sunboyan.xcuserdatad/xcschemes/Pods-BAPickView_Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/PickerView/BAPickerBasePopView.m: -------------------------------------------------------------------------------- 1 | // 2 | // BAPickerBasePopView.m 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/1. 6 | // 7 | 8 | #import "BAPickerBasePopView.h" 9 | 10 | @interface BAPickerBasePopView () 11 | 12 | @end 13 | 14 | @implementation BAPickerBasePopView 15 | 16 | - (instancetype)initWithFrame:(CGRect)frame { 17 | self = [super initWithFrame:frame]; 18 | if (self) { 19 | [self initUI__]; 20 | [self initData__]; 21 | } 22 | return self; 23 | } 24 | 25 | - (void)initUI__ { 26 | [self addSubview:self.contentView]; 27 | [self.contentView mas_makeConstraints:^(MASConstraintMaker *make) { 28 | make.edges.offset(0); 29 | }]; 30 | } 31 | 32 | - (void)initData__ { 33 | self.enableTouchDismiss = YES; 34 | } 35 | 36 | - (void)layoutSubviews { 37 | [super layoutSubviews]; 38 | 39 | [self.contentView mas_remakeConstraints:^(MASConstraintMaker *make) { 40 | make.edges.offset(0); 41 | }]; 42 | } 43 | 44 | #pragma mark - custom method 45 | 46 | - (void)show { 47 | if (self.superview) { 48 | return; 49 | } 50 | [self showOnView:kBAPickerGetAlertWindow()]; 51 | } 52 | 53 | - (void)showOnView:(UIView *)view { 54 | if (self.superview) { 55 | return; 56 | } 57 | 58 | [view addSubview:self]; 59 | self.frame = view.bounds; 60 | self.backgroundColor = self.maskViewBackgroundColor ? self.maskViewBackgroundColor:[UIColor.blackColor colorWithAlphaComponent:0.3]; 61 | } 62 | 63 | - (void)dismiss { 64 | self.onDismiss ? self.onDismiss():nil; 65 | kBAPickerRemoveAllSubviews(self); 66 | [self removeFromSuperview]; 67 | } 68 | 69 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { 70 | UIView *view = (UIView *)touches.anyObject; 71 | if (![view isKindOfClass:self.class]) { 72 | if (self.enableTouchDismiss) { 73 | [self dismiss]; 74 | } 75 | } 76 | } 77 | 78 | #pragma mark - setter, getter 79 | 80 | - (void)setMaskViewBackgroundColor:(UIColor *)maskViewBackgroundColor { 81 | _maskViewBackgroundColor = maskViewBackgroundColor; 82 | 83 | if (maskViewBackgroundColor) { 84 | self.backgroundColor = maskViewBackgroundColor; 85 | } 86 | } 87 | 88 | - (UIView *)contentView { 89 | if (!_contentView) { 90 | _contentView = UIView.new; 91 | } 92 | return _contentView; 93 | } 94 | 95 | @end 96 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/PickerView/BABasePickerView.m: -------------------------------------------------------------------------------- 1 | // 2 | // BABasePickerView.m 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/6. 6 | // 7 | 8 | #import "BABasePickerView.h" 9 | 10 | @interface BABasePickerView () 11 | 12 | @end 13 | 14 | @implementation BABasePickerView 15 | 16 | - (instancetype)initWithFrame:(CGRect)frame { 17 | self = [super initWithFrame:frame]; 18 | if (self) { 19 | [self initUI]; 20 | [self initData]; 21 | } 22 | return self; 23 | } 24 | 25 | - (void)initUI { 26 | [self addSubview:self.pickerView]; 27 | [self.pickerView mas_makeConstraints:^(MASConstraintMaker *make) { 28 | make.edges.offset(0); 29 | }]; 30 | } 31 | 32 | - (void)initData { 33 | 34 | } 35 | 36 | #pragma mark - UIPickerViewDataSource 37 | // 返回需要展示的列(columns)的数目 38 | - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView { 39 | NSInteger num = self.onNumberOfComponentsInPickerView ? self.onNumberOfComponentsInPickerView(pickerView):0; 40 | return num; 41 | } 42 | 43 | // 返回每一列的行(rows)数 44 | - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component { 45 | NSInteger num = self.onNumberOfRowsInComponent ? self.onNumberOfRowsInComponent(component, pickerView):0; 46 | return num; 47 | } 48 | 49 | #pragma mark - UIPickerViewDelegate 50 | // 返回每一行的标题 51 | - (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component { 52 | NSString *title = self.onTitleForRowAndComponent ? self.onTitleForRowAndComponent(row, component, pickerView):nil; 53 | return title; 54 | } 55 | 56 | // 某一行被选择时调用 57 | - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { 58 | self.onDidSelectRowAndComponent ? self.onDidSelectRowAndComponent(row, component, pickerView):nil; 59 | } 60 | 61 | - (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view { 62 | return self.onViewForRowAndComponent ? self.onViewForRowAndComponent(row, component, view, pickerView):nil; 63 | } 64 | 65 | #pragma mark - setter, getter 66 | 67 | - (UIPickerView *)pickerView { 68 | if (!_pickerView) { 69 | _pickerView = UIPickerView.new; 70 | _pickerView.backgroundColor = UIColor.clearColor; 71 | _pickerView.delegate = self; 72 | _pickerView.dataSource = self; 73 | } 74 | return _pickerView; 75 | } 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAPickView_Example/Pods-BAPickView_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## BAPickView 5 | 6 | Copyright (c) 2018 boai 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | 27 | ## Masonry 28 | 29 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry 30 | 31 | Permission is hereby granted, free of charge, to any person obtaining a copy 32 | of this software and associated documentation files (the "Software"), to deal 33 | in the Software without restriction, including without limitation the rights 34 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 35 | copies of the Software, and to permit persons to whom the Software is 36 | furnished to do so, subject to the following conditions: 37 | 38 | The above copyright notice and this permission notice shall be included in 39 | all copies or substantial portions of the Software. 40 | 41 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 42 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 43 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 44 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 45 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 46 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 47 | THE SOFTWARE. 48 | Generated by CocoaPods - https://cocoapods.org 49 | -------------------------------------------------------------------------------- /BAPickView/Classes/PickerView/BABasePickerView.m: -------------------------------------------------------------------------------- 1 | // 2 | // BABasePickerView.m 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/6. 6 | // 7 | 8 | #import "BABasePickerView.h" 9 | 10 | @interface BABasePickerView () 11 | 12 | @end 13 | 14 | @implementation BABasePickerView 15 | 16 | - (instancetype)initWithFrame:(CGRect)frame { 17 | self = [super initWithFrame:frame]; 18 | if (self) { 19 | [self initUI]; 20 | [self initData]; 21 | } 22 | return self; 23 | } 24 | 25 | - (void)initUI { 26 | [self addSubview:self.pickerView]; 27 | [self.pickerView mas_makeConstraints:^(MASConstraintMaker *make) { 28 | make.edges.offset(0); 29 | }]; 30 | } 31 | 32 | - (void)initData { 33 | 34 | } 35 | 36 | #pragma mark - UIPickerViewDataSource 37 | // 返回需要展示的列(columns)的数目 38 | - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView { 39 | NSInteger num = self.onNumberOfComponentsInPickerView ? self.onNumberOfComponentsInPickerView(pickerView):0; 40 | return num; 41 | } 42 | 43 | // 返回每一列的行(rows)数 44 | - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component { 45 | NSInteger num = self.onNumberOfRowsInComponent ? self.onNumberOfRowsInComponent(component, pickerView):0; 46 | return num; 47 | } 48 | 49 | #pragma mark - UIPickerViewDelegate 50 | // 返回每一行的标题 51 | - (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component { 52 | NSString *title = self.onTitleForRowAndComponent ? self.onTitleForRowAndComponent(row, component, pickerView):nil; 53 | return title; 54 | } 55 | 56 | // 某一行被选择时调用 57 | - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { 58 | self.onDidSelectRowAndComponent ? self.onDidSelectRowAndComponent(row, component, pickerView):nil; 59 | } 60 | 61 | - (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view { 62 | return self.onViewForRowAndComponent ? self.onViewForRowAndComponent(row, component, view, pickerView):nil; 63 | } 64 | 65 | - (CGFloat)pickerView:(UIPickerView *)pickerView rowHeightForComponent:(NSInteger)component { 66 | return !self.onRowHeightForComponent ? 44:self.onRowHeightForComponent(component, pickerView); 67 | } 68 | 69 | #pragma mark - setter, getter 70 | 71 | - (UIPickerView *)pickerView { 72 | if (!_pickerView) { 73 | _pickerView = UIPickerView.new; 74 | _pickerView.backgroundColor = UIColor.clearColor; 75 | _pickerView.delegate = self; 76 | _pickerView.dataSource = self; 77 | } 78 | return _pickerView; 79 | } 80 | 81 | @end 82 | -------------------------------------------------------------------------------- /Example/BAPickView/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Example/Pods/Masonry/Masonry/NSArray+MASAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MASAdditions.h 3 | // 4 | // 5 | // Created by Daniel Hammond on 11/26/13. 6 | // 7 | // 8 | 9 | #import "MASUtilities.h" 10 | #import "MASConstraintMaker.h" 11 | #import "MASViewAttribute.h" 12 | 13 | typedef NS_ENUM(NSUInteger, MASAxisType) { 14 | MASAxisTypeHorizontal, 15 | MASAxisTypeVertical 16 | }; 17 | 18 | @interface NSArray (MASAdditions) 19 | 20 | /** 21 | * Creates a MASConstraintMaker with each view in the callee. 22 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing on each view 23 | * 24 | * @param block scope within which you can build up the constraints which you wish to apply to each view. 25 | * 26 | * @return Array of created MASConstraints 27 | */ 28 | - (NSArray *)mas_makeConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; 29 | 30 | /** 31 | * Creates a MASConstraintMaker with each view in the callee. 32 | * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view. 33 | * If an existing constraint exists then it will be updated instead. 34 | * 35 | * @param block scope within which you can build up the constraints which you wish to apply to each view. 36 | * 37 | * @return Array of created/updated MASConstraints 38 | */ 39 | - (NSArray *)mas_updateConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; 40 | 41 | /** 42 | * Creates a MASConstraintMaker with each view in the callee. 43 | * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view. 44 | * All constraints previously installed for the views will be removed. 45 | * 46 | * @param block scope within which you can build up the constraints which you wish to apply to each view. 47 | * 48 | * @return Array of created/updated MASConstraints 49 | */ 50 | - (NSArray *)mas_remakeConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; 51 | 52 | /** 53 | * distribute with fixed spacing 54 | * 55 | * @param axisType which axis to distribute items along 56 | * @param fixedSpacing the spacing between each item 57 | * @param leadSpacing the spacing before the first item and the container 58 | * @param tailSpacing the spacing after the last item and the container 59 | */ 60 | - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedSpacing:(CGFloat)fixedSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing; 61 | 62 | /** 63 | * distribute with fixed item size 64 | * 65 | * @param axisType which axis to distribute items along 66 | * @param fixedItemLength the fixed length of each item 67 | * @param leadSpacing the spacing before the first item and the container 68 | * @param tailSpacing the spacing after the last item and the container 69 | */ 70 | - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedItemLength:(CGFloat)fixedItemLength leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing; 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /BAPickView/Classes/Tools/NSDateFormatter+BAKit.h: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * @header BAKit.h 4 | * BABaseProject 5 | * 6 | * @brief BAKit 7 | * 8 | * @author 博爱 9 | * @copyright Copyright © 2016年 博爱. All rights reserved. 10 | * @version V1.0 11 | */ 12 | 13 | // _ooOoo_ 14 | // o8888888o 15 | // 88" . "88 16 | // (| -_- |) 17 | // O\ = /O 18 | // ____/`---'\____ 19 | // . ' \\| |// `. 20 | // / \\||| : |||// \ 21 | // / _||||| -:- |||||- \ 22 | // | | \\\ - /// | | 23 | // | \_| ''\---/'' | | 24 | // \ .-\__ `-` ___/-. / 25 | // ___`. .' /--.--\ `. . __ 26 | // ."" '< `.___\_<|>_/___.' >'"". 27 | // | | : `- \`.;`\ _ /`;.`/ - ` : | | 28 | // \ \ `-. \_ __\ /__ _/ .-` / / 29 | // ======`-.____`-.___\_____/___.-`____.-'====== 30 | // `=---=' 31 | // 32 | // ............................................. 33 | // 佛祖镇楼 BUG辟易 34 | // 佛曰: 35 | // 写字楼里写字间,写字间里程序员; 36 | // 程序人员写程序,又拿程序换酒钱。 37 | // 酒醒只在网上坐,酒醉还来网下眠; 38 | // 酒醉酒醒日复日,网上网下年复年。 39 | // 但愿老死电脑间,不愿鞠躬老板前; 40 | // 奔驰宝马贵者趣,公交自行程序员。 41 | // 别人笑我忒疯癫,我笑自己命太贱; 42 | // 不见满街漂亮妹,哪个归得程序员? 43 | 44 | /* 45 | 46 | ********************************************************************************* 47 | * 48 | * 在使用BAKit的过程中如果出现bug请及时以以下任意一种方式联系我,我会及时修复bug 49 | * 50 | * QQ : 可以添加ios开发技术群 479663605 在这里找到我(博爱1616【137361770】) 51 | * 微博 : 博爱1616 52 | * Email : 137361770@qq.com 53 | * GitHub : https://github.com/boai 54 | * 博客 : http://boaihome.com 55 | 56 | ********************************************************************************* 57 | 58 | */ 59 | 60 | 61 | #import 62 | 63 | @interface NSDateFormatter (BAKit) 64 | 65 | + (id)ba_dateFormatter; 66 | 67 | + (id)ba_dateFormatterWithFormatString:(NSString *)dateFormatString; 68 | 69 | + (id)ba_dateFormatterWithFormatString:(NSString *)fmtString timezoneName:(NSString *)timezoneName; 70 | + (id)ba_dateFormatterWithFormatString:(NSString *)dateFormatString dateStyle:(NSDateFormatterStyle)dateStyle; 71 | /** 72 | 格式化:yyyy-MM-dd HH:mm:ss 73 | 74 | @return NSDateFormatter 75 | */ 76 | + (id)ba_setupDateFormatterWithYMDHMS; 77 | 78 | /** 79 | 格式化:yyyy-MM-dd, EEE, HH:mm:ss 80 | 81 | @return NSDateFormatter 82 | */ 83 | + (id)ba_setupDateFormatterWithYMDEHMS; 84 | 85 | /** 86 | 格式化:yyyy-MM-dd 87 | 88 | @return NSDateFormatter 89 | */ 90 | + (id)ba_setupDateFormatterWithYMD; 91 | 92 | /** 93 | 格式化:yyyy-MM 94 | 95 | @return NSDateFormatter 96 | */ 97 | + (id)ba_setupDateFormatterWithYM; 98 | 99 | /** 100 | 格式化:yyyy 101 | 102 | @return NSDateFormatter 103 | */ 104 | + (id)ba_setupDateFormatterWithYY; 105 | 106 | /** 107 | 格式化:HM 108 | 109 | @return NSDateFormatter 110 | */ 111 | + (id)ba_setupDateFormatterWithHM; 112 | 113 | /** 114 | 格式化:HMS 115 | 116 | @return NSDateFormatter 117 | */ 118 | + (id)ba_setupDateFormatterWithHMS; 119 | 120 | @end 121 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/Tools/NSDateFormatter+BAKit.h: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * @header BAKit.h 4 | * BABaseProject 5 | * 6 | * @brief BAKit 7 | * 8 | * @author 博爱 9 | * @copyright Copyright © 2016年 博爱. All rights reserved. 10 | * @version V1.0 11 | */ 12 | 13 | // _ooOoo_ 14 | // o8888888o 15 | // 88" . "88 16 | // (| -_- |) 17 | // O\ = /O 18 | // ____/`---'\____ 19 | // . ' \\| |// `. 20 | // / \\||| : |||// \ 21 | // / _||||| -:- |||||- \ 22 | // | | \\\ - /// | | 23 | // | \_| ''\---/'' | | 24 | // \ .-\__ `-` ___/-. / 25 | // ___`. .' /--.--\ `. . __ 26 | // ."" '< `.___\_<|>_/___.' >'"". 27 | // | | : `- \`.;`\ _ /`;.`/ - ` : | | 28 | // \ \ `-. \_ __\ /__ _/ .-` / / 29 | // ======`-.____`-.___\_____/___.-`____.-'====== 30 | // `=---=' 31 | // 32 | // ............................................. 33 | // 佛祖镇楼 BUG辟易 34 | // 佛曰: 35 | // 写字楼里写字间,写字间里程序员; 36 | // 程序人员写程序,又拿程序换酒钱。 37 | // 酒醒只在网上坐,酒醉还来网下眠; 38 | // 酒醉酒醒日复日,网上网下年复年。 39 | // 但愿老死电脑间,不愿鞠躬老板前; 40 | // 奔驰宝马贵者趣,公交自行程序员。 41 | // 别人笑我忒疯癫,我笑自己命太贱; 42 | // 不见满街漂亮妹,哪个归得程序员? 43 | 44 | /* 45 | 46 | ********************************************************************************* 47 | * 48 | * 在使用BAKit的过程中如果出现bug请及时以以下任意一种方式联系我,我会及时修复bug 49 | * 50 | * QQ : 可以添加ios开发技术群 479663605 在这里找到我(博爱1616【137361770】) 51 | * 微博 : 博爱1616 52 | * Email : 137361770@qq.com 53 | * GitHub : https://github.com/boai 54 | * 博客 : http://boaihome.com 55 | 56 | ********************************************************************************* 57 | 58 | */ 59 | 60 | 61 | #import 62 | 63 | @interface NSDateFormatter (BAKit) 64 | 65 | + (id)ba_dateFormatter; 66 | 67 | + (id)ba_dateFormatterWithFormatString:(NSString *)dateFormatString; 68 | 69 | + (id)ba_dateFormatterWithFormatString:(NSString *)fmtString timezoneName:(NSString *)timezoneName; 70 | + (id)ba_dateFormatterWithFormatString:(NSString *)dateFormatString dateStyle:(NSDateFormatterStyle)dateStyle; 71 | /** 72 | 格式化:yyyy-MM-dd HH:mm:ss 73 | 74 | @return NSDateFormatter 75 | */ 76 | + (id)ba_setupDateFormatterWithYMDHMS; 77 | 78 | /** 79 | 格式化:yyyy-MM-dd, EEE, HH:mm:ss 80 | 81 | @return NSDateFormatter 82 | */ 83 | + (id)ba_setupDateFormatterWithYMDEHMS; 84 | 85 | /** 86 | 格式化:yyyy-MM-dd 87 | 88 | @return NSDateFormatter 89 | */ 90 | + (id)ba_setupDateFormatterWithYMD; 91 | 92 | /** 93 | 格式化:yyyy-MM 94 | 95 | @return NSDateFormatter 96 | */ 97 | + (id)ba_setupDateFormatterWithYM; 98 | 99 | /** 100 | 格式化:yyyy 101 | 102 | @return NSDateFormatter 103 | */ 104 | + (id)ba_setupDateFormatterWithYY; 105 | 106 | /** 107 | 格式化:HM 108 | 109 | @return NSDateFormatter 110 | */ 111 | + (id)ba_setupDateFormatterWithHM; 112 | 113 | /** 114 | 格式化:HMS 115 | 116 | @return NSDateFormatter 117 | */ 118 | + (id)ba_setupDateFormatterWithHMS; 119 | 120 | @end 121 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAPickView_Example/Pods-BAPickView_Example-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2018 boai <sunboyan@outlook.com> 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | License 38 | MIT 39 | Title 40 | BAPickView 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry 47 | 48 | Permission is hereby granted, free of charge, to any person obtaining a copy 49 | of this software and associated documentation files (the "Software"), to deal 50 | in the Software without restriction, including without limitation the rights 51 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 52 | copies of the Software, and to permit persons to whom the Software is 53 | furnished to do so, subject to the following conditions: 54 | 55 | The above copyright notice and this permission notice shall be included in 56 | all copies or substantial portions of the Software. 57 | 58 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 59 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 60 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 61 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 62 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 63 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 64 | THE SOFTWARE. 65 | License 66 | MIT 67 | Title 68 | Masonry 69 | Type 70 | PSGroupSpecifier 71 | 72 | 73 | FooterText 74 | Generated by CocoaPods - https://cocoapods.org 75 | Title 76 | 77 | Type 78 | PSGroupSpecifier 79 | 80 | 81 | StringsTable 82 | Acknowledgements 83 | Title 84 | Acknowledgements 85 | 86 | 87 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/PickerView/BAPickerConfigModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // BAPickerConfigModel.h 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/1. 6 | // 7 | 8 | #import 9 | #import "BAKit_PickerViewConfig.h" 10 | #import "BAPickerDefine.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @class BAPickerModel; 15 | @class BADatePickerModel; 16 | @class BAPickerToolBarModel; 17 | 18 | @interface BAPickerConfigModel : NSObject 19 | 20 | @end 21 | 22 | @interface BAPickerConfigBaseModel : NSObject 23 | 24 | #pragma mark - common 25 | /// 背景遮罩颜色,默认:[UIColor.blackColor colorWithAlphaComponent:0.3] 26 | @property(nonatomic, strong) UIColor *maskViewBackgroundColor; 27 | /// contentView 的背景颜色 28 | @property(nonatomic, strong) UIColor *contentViewBackgroundColor; 29 | /// picker 的背景颜色 30 | @property(nonatomic, strong) UIColor *pickerViewBackgroundColor; 31 | /// picker 的高度 32 | @property(nonatomic, assign) CGFloat pickerHeight; 33 | /// toolBar 的高度 34 | @property(nonatomic, assign) CGFloat toolBarHeight; 35 | /// toolBar 配置 model 36 | @property(nonatomic, strong) BAPickerToolBarModel *toolBarModel; 37 | /// 是否开启边缘触摸隐藏,默认:YES 38 | @property(nonatomic, assign) BOOL enableTouchDismiss; 39 | /// picker 文本字体 40 | @property(nonatomic, strong) UIFont *titleFont; 41 | 42 | @end 43 | 44 | @interface BAPickerModel : BAPickerConfigBaseModel 45 | 46 | /// 单列 47 | @property(nonatomic, strong) NSArray *stringsArray; 48 | 49 | /// 多列-标题 50 | @property(nonatomic, strong) NSArray *multipleTitleArray; 51 | /// 多列-数据 52 | @property(nonatomic, strong) NSArray *multipleStringsArray; 53 | 54 | /// city 55 | @property(nonatomic, strong) NSArray *allProvinceCityArray; 56 | 57 | @end 58 | 59 | @interface BADatePickerModel : BAPickerConfigBaseModel 60 | 61 | #pragma mark - common 62 | /// 日期选择器的最大日期,默认为:当前时间 +60年 63 | @property(nonatomic, strong) NSDate *maximumDate; 64 | /// 日期选择器的最小日期,默认为:当前时间 -60年 65 | @property(nonatomic, strong) NSDate *minimumDate; 66 | 67 | #pragma mark - system 68 | @property (nonatomic, strong) NSString *formatterString; 69 | 70 | // default is UIDatePickerModeDate 71 | @property (nonatomic) UIDatePickerMode datePickerMode; 72 | 73 | #pragma mark - custom 74 | @property(nonatomic, assign) BADatePickerType datePickerType; 75 | 76 | @end 77 | 78 | @interface BAPickerToolBarModel : NSObject 79 | 80 | #pragma mark - common 81 | /// ToolBar:是否显示选中结果,默认:YES 82 | @property(nonatomic, assign, getter=isShowResult) BOOL showResult; 83 | /// ToolBar:是否显示底部分割线,默认:YES 84 | @property(nonatomic, assign, getter=isShowBottomLine) BOOL showBottomLine; 85 | 86 | #pragma mark - title 87 | /// ToolBar:默认标题,例如:请选择出生日期,注:若 showResult = YES && title 不为空,会优先显示 title,若 showResult = YES && title 为空,会优先显示 默认选中结果, 88 | @property(nonatomic, copy) NSString *title; 89 | /// ToolBar:左边按钮 title 90 | @property(nonatomic, copy) NSString *cancleTitle; 91 | /// ToolBar:右边按钮 title 92 | @property(nonatomic, copy) NSString *sureTitle; 93 | 94 | #pragma mark - color 95 | /// ToolBar:背景颜色,默认:白色 96 | @property(nonatomic, strong) UIColor *backgroundColor; 97 | /// ToolBar:中间标题文字颜色,默认:黑色 98 | @property(nonatomic, strong) UIColor *titleColor; 99 | /// ToolBar:左边按钮文字颜色,默认:黑色 100 | @property(nonatomic, strong) UIColor *cancleTitleColor; 101 | /// ToolBar:右边按钮文字颜色,默认:黑色 102 | @property(nonatomic, strong) UIColor *sureTitleColor; 103 | /// ToolBar:底部分割线颜色,默认:0xCCCCCC 104 | @property(nonatomic, strong) UIColor *lineColor; 105 | 106 | #pragma mark - font 107 | /// ToolBar:中间标题文字字体,默认:[UIFont boldSystemFontOfSize:16] 108 | @property(nonatomic, strong) UIFont *titleFont; 109 | /// ToolBar:左边按钮文字字体,默认:[UIFont systemFontOfSize:14] 110 | @property(nonatomic, strong) UIFont *cancleTitleFont; 111 | /// ToolBar:右边按钮文字字体,默认:[UIFont systemFontOfSize:14] 112 | @property(nonatomic, strong) UIFont *sureTitleFont; 113 | 114 | #pragma mark - temp 115 | /// 是否显示默认选中结果 116 | @property(nonatomic, assign) BOOL temp_showDefaultResult; 117 | 118 | @end 119 | 120 | NS_ASSUME_NONNULL_END 121 | -------------------------------------------------------------------------------- /BAPickView/Classes/PickerView/BAPickerConfigModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // BAPickerConfigModel.h 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/1. 6 | // 7 | 8 | #import 9 | #import "BAKit_PickerViewConfig.h" 10 | #import "BAPickerDefine.h" 11 | #import "BAKit_ConfigurationDefine.h" 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @class BAPickerModel; 16 | @class BADatePickerModel; 17 | @class BAPickerToolBarModel; 18 | 19 | @interface BAPickerConfigModel : NSObject 20 | 21 | @end 22 | 23 | @interface BAPickerConfigBaseModel : NSObject 24 | 25 | #pragma mark - common 26 | /// 背景遮罩颜色,默认:[UIColor.blackColor colorWithAlphaComponent:0.3] 27 | @property(nonatomic, strong) UIColor *maskViewBackgroundColor; 28 | /// contentView 的背景颜色 29 | @property(nonatomic, strong) UIColor *contentViewBackgroundColor; 30 | /// picker 的背景颜色 31 | @property(nonatomic, strong) UIColor *pickerViewBackgroundColor; 32 | /// picker 的高度 33 | @property(nonatomic, assign) CGFloat pickerHeight; 34 | /// toolBar 的高度 35 | @property(nonatomic, assign) CGFloat toolBarHeight; 36 | /// toolBar 配置 model 37 | @property(nonatomic, strong) BAPickerToolBarModel *toolBarModel; 38 | /// 是否开启边缘触摸隐藏,默认:YES 39 | @property(nonatomic, assign) BOOL enableTouchDismiss; 40 | /// picker 文本字体 41 | @property(nonatomic, strong) UIFont *titleFont; 42 | /// picker 文本颜色 43 | @property(nonatomic, strong) UIColor *titleColor; 44 | 45 | @end 46 | 47 | @interface BAPickerModel : BAPickerConfigBaseModel 48 | 49 | /// 单列 50 | @property(nonatomic, strong) NSArray *stringsArray; 51 | 52 | /// 多列-标题 53 | @property(nonatomic, strong) NSArray *multipleTitleArray; 54 | /// 多列-数据 55 | @property(nonatomic, strong) NSArray *multipleStringsArray; 56 | 57 | /// city 58 | @property(nonatomic, strong) NSArray *allProvinceCityArray; 59 | 60 | @end 61 | 62 | @interface BADatePickerModel : BAPickerConfigBaseModel 63 | 64 | #pragma mark - common 65 | /// 日期选择器的最大日期,默认为:当前时间 +60年 66 | @property(nonatomic, strong) NSDate *maximumDate; 67 | /// 日期选择器的最小日期,默认为:当前时间 -60年 68 | @property(nonatomic, strong) NSDate *minimumDate; 69 | 70 | #pragma mark - system 71 | @property (nonatomic, strong) NSString *formatterString; 72 | 73 | // default is UIDatePickerModeDate 74 | @property (nonatomic) UIDatePickerMode datePickerMode; 75 | 76 | #pragma mark - custom 77 | @property(nonatomic, assign) BADatePickerType datePickerType; 78 | 79 | @end 80 | 81 | @interface BAPickerToolBarModel : NSObject 82 | 83 | #pragma mark - common 84 | /// ToolBar:是否显示选中结果,默认:YES 85 | @property(nonatomic, assign, getter=isShowResult) BOOL showResult; 86 | /// ToolBar:是否显示底部分割线,默认:YES 87 | @property(nonatomic, assign, getter=isShowBottomLine) BOOL showBottomLine; 88 | 89 | #pragma mark - title 90 | /// ToolBar:默认标题,例如:请选择出生日期,注:若 showResult = YES && title 不为空,会优先显示 title,若 showResult = YES && title 为空,会优先显示 默认选中结果, 91 | @property(nonatomic, copy) NSString *title; 92 | /// ToolBar:左边按钮 title 93 | @property(nonatomic, copy) NSString *cancleTitle; 94 | /// ToolBar:右边按钮 title 95 | @property(nonatomic, copy) NSString *sureTitle; 96 | 97 | #pragma mark - color 98 | /// ToolBar:背景颜色,默认:白色 99 | @property(nonatomic, strong) UIColor *backgroundColor; 100 | /// ToolBar:中间标题文字颜色,默认:黑色 101 | @property(nonatomic, strong) UIColor *titleColor; 102 | /// ToolBar:左边按钮文字颜色,默认:黑色 103 | @property(nonatomic, strong) UIColor *cancleTitleColor; 104 | /// ToolBar:右边按钮文字颜色,默认:黑色 105 | @property(nonatomic, strong) UIColor *sureTitleColor; 106 | /// ToolBar:底部分割线颜色,默认:0xCCCCCC 107 | @property(nonatomic, strong) UIColor *lineColor; 108 | 109 | #pragma mark - font 110 | /// ToolBar:中间标题文字字体,默认:[UIFont boldSystemFontOfSize:16] 111 | @property(nonatomic, strong) UIFont *titleFont; 112 | /// ToolBar:左边按钮文字字体,默认:[UIFont systemFontOfSize:14] 113 | @property(nonatomic, strong) UIFont *cancleTitleFont; 114 | /// ToolBar:右边按钮文字字体,默认:[UIFont systemFontOfSize:14] 115 | @property(nonatomic, strong) UIFont *sureTitleFont; 116 | 117 | #pragma mark - temp 118 | /// 是否显示默认选中结果 119 | @property(nonatomic, assign) BOOL temp_showDefaultResult; 120 | 121 | @end 122 | 123 | NS_ASSUME_NONNULL_END 124 | -------------------------------------------------------------------------------- /Example/BAPickView.xcodeproj/xcshareddata/xcschemes/BAPickView-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 42 | 48 | 49 | 50 | 51 | 52 | 62 | 64 | 70 | 71 | 72 | 73 | 79 | 81 | 87 | 88 | 89 | 90 | 92 | 93 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /Example/BAPickView/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 28 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /BAPickView/Classes/Tools/NSDateFormatter+BAKit.m: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * @header BAKit.h 4 | * BABaseProject 5 | * 6 | * @brief BAKit 7 | * 8 | * @author 博爱 9 | * @copyright Copyright © 2016年 博爱. All rights reserved. 10 | * @version V1.0 11 | */ 12 | 13 | // _ooOoo_ 14 | // o8888888o 15 | // 88" . "88 16 | // (| -_- |) 17 | // O\ = /O 18 | // ____/`---'\____ 19 | // . ' \\| |// `. 20 | // / \\||| : |||// \ 21 | // / _||||| -:- |||||- \ 22 | // | | \\\ - /// | | 23 | // | \_| ''\---/'' | | 24 | // \ .-\__ `-` ___/-. / 25 | // ___`. .' /--.--\ `. . __ 26 | // ."" '< `.___\_<|>_/___.' >'"". 27 | // | | : `- \`.;`\ _ /`;.`/ - ` : | | 28 | // \ \ `-. \_ __\ /__ _/ .-` / / 29 | // ======`-.____`-.___\_____/___.-`____.-'====== 30 | // `=---=' 31 | // 32 | // ............................................. 33 | // 佛祖镇楼 BUG辟易 34 | // 佛曰: 35 | // 写字楼里写字间,写字间里程序员; 36 | // 程序人员写程序,又拿程序换酒钱。 37 | // 酒醒只在网上坐,酒醉还来网下眠; 38 | // 酒醉酒醒日复日,网上网下年复年。 39 | // 但愿老死电脑间,不愿鞠躬老板前; 40 | // 奔驰宝马贵者趣,公交自行程序员。 41 | // 别人笑我忒疯癫,我笑自己命太贱; 42 | // 不见满街漂亮妹,哪个归得程序员? 43 | 44 | /* 45 | 46 | ********************************************************************************* 47 | * 48 | * 在使用BAKit的过程中如果出现bug请及时以以下任意一种方式联系我,我会及时修复bug 49 | * 50 | * QQ : 可以添加ios开发技术群 479663605 在这里找到我(博爱1616【137361770】) 51 | * 微博 : 博爱1616 52 | * Email : 137361770@qq.com 53 | * GitHub : https://github.com/boai 54 | * 博客 : http://boaihome.com 55 | 56 | ********************************************************************************* 57 | 58 | */ 59 | 60 | //iOS-NSDateFormatter格式说明: 61 | //G: 公元时代,例如AD公元 62 | //yy: 年的后2位 63 | //yyyy: 完整年 64 | //MM: 月,显示为1-12 65 | //MMM: 月,显示为英文月份简写,如 Jan 66 | //MMMM: 月,显示为英文月份全称,如 Janualy 67 | //dd: 日,2位数表示,如02 68 | //d: 日,1-2位显示,如 2 69 | //EEE: 简写星期几,如Sun 70 | //EEEE: 全写星期几,如Sunday 71 | //aa: 上下午,AM/PM 72 | //H: 时,24小时制,0-23 73 | //K:时,12小时制,0-11 74 | //m: 分,1-2位 75 | //mm: 分,2位 76 | //s: 秒,1-2位 77 | //ss: 秒,2位 78 | //S: 毫秒 79 | //Z:GMT 80 | 81 | 82 | #import "NSDateFormatter+BAKit.h" 83 | #import "BAKit_DefineFormat.h" 84 | 85 | @implementation NSDateFormatter (BAKit) 86 | 87 | + (id)ba_dateFormatter { 88 | return [[self alloc] init]; 89 | } 90 | 91 | + (id)ba_dateFormatterWithFormatString:(NSString *)dateFormatString { 92 | if (dateFormatString == nil || ![dateFormatString isKindOfClass:[NSString class]] || [dateFormatString isEqualToString:@""]) { 93 | return nil; 94 | } 95 | 96 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; 97 | dateFormatter.dateFormat = dateFormatString; 98 | 99 | return dateFormatter; 100 | } 101 | 102 | + (id)ba_dateFormatterWithFormatString:(NSString *)dateFormatString timezoneName:(NSString *)timezoneName { 103 | NSDateFormatter *dateFormatter = [NSDateFormatter ba_dateFormatterWithFormatString:dateFormatString]; 104 | 105 | if (timezoneName != nil && [timezoneName isKindOfClass:[NSString class]] && ![timezoneName isEqualToString:@""]) { 106 | dateFormatter.timeZone = [NSTimeZone timeZoneWithName:timezoneName]; 107 | } 108 | return dateFormatter; 109 | } 110 | 111 | + (id)ba_dateFormatterWithFormatString:(NSString *)dateFormatString dateStyle:(NSDateFormatterStyle)dateStyle { 112 | 113 | NSDateFormatter *dateFormatter = [NSDateFormatter ba_dateFormatterWithFormatString:dateFormatString]; 114 | 115 | dateFormatter.locale = [NSLocale localeWithLocaleIdentifier:@"en_US"]; 116 | dateFormatter.dateStyle = dateStyle; 117 | 118 | return dateFormatter; 119 | } 120 | 121 | + (id)ba_setupDateFormatterWithYMDHMS { 122 | return [self ba_dateFormatterWithFormatString:BAKit_FormatString_YMDHMS]; 123 | } 124 | 125 | + (id)ba_setupDateFormatterWithYMDEHMS { 126 | return [self ba_dateFormatterWithFormatString:BAKit_FormatString_YMDEHMS]; 127 | } 128 | 129 | + (id)ba_setupDateFormatterWithYMD { 130 | return [self ba_dateFormatterWithFormatString:BAKit_FormatString_YMD]; 131 | } 132 | 133 | + (id)ba_setupDateFormatterWithYM { 134 | return [self ba_dateFormatterWithFormatString:BAKit_FormatString_YM]; 135 | } 136 | 137 | + (id)ba_setupDateFormatterWithYY { 138 | return [self ba_dateFormatterWithFormatString:BAKit_FormatString_Y]; 139 | } 140 | 141 | + (id)ba_setupDateFormatterWithHM { 142 | return [self ba_dateFormatterWithFormatString:BAKit_FormatString_HM]; 143 | } 144 | 145 | + (id)ba_setupDateFormatterWithHMS { 146 | return [self ba_dateFormatterWithFormatString:BAKit_FormatString_YMDHMS]; 147 | } 148 | 149 | 150 | @end 151 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/Tools/NSDateFormatter+BAKit.m: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * @header BAKit.h 4 | * BABaseProject 5 | * 6 | * @brief BAKit 7 | * 8 | * @author 博爱 9 | * @copyright Copyright © 2016年 博爱. All rights reserved. 10 | * @version V1.0 11 | */ 12 | 13 | // _ooOoo_ 14 | // o8888888o 15 | // 88" . "88 16 | // (| -_- |) 17 | // O\ = /O 18 | // ____/`---'\____ 19 | // . ' \\| |// `. 20 | // / \\||| : |||// \ 21 | // / _||||| -:- |||||- \ 22 | // | | \\\ - /// | | 23 | // | \_| ''\---/'' | | 24 | // \ .-\__ `-` ___/-. / 25 | // ___`. .' /--.--\ `. . __ 26 | // ."" '< `.___\_<|>_/___.' >'"". 27 | // | | : `- \`.;`\ _ /`;.`/ - ` : | | 28 | // \ \ `-. \_ __\ /__ _/ .-` / / 29 | // ======`-.____`-.___\_____/___.-`____.-'====== 30 | // `=---=' 31 | // 32 | // ............................................. 33 | // 佛祖镇楼 BUG辟易 34 | // 佛曰: 35 | // 写字楼里写字间,写字间里程序员; 36 | // 程序人员写程序,又拿程序换酒钱。 37 | // 酒醒只在网上坐,酒醉还来网下眠; 38 | // 酒醉酒醒日复日,网上网下年复年。 39 | // 但愿老死电脑间,不愿鞠躬老板前; 40 | // 奔驰宝马贵者趣,公交自行程序员。 41 | // 别人笑我忒疯癫,我笑自己命太贱; 42 | // 不见满街漂亮妹,哪个归得程序员? 43 | 44 | /* 45 | 46 | ********************************************************************************* 47 | * 48 | * 在使用BAKit的过程中如果出现bug请及时以以下任意一种方式联系我,我会及时修复bug 49 | * 50 | * QQ : 可以添加ios开发技术群 479663605 在这里找到我(博爱1616【137361770】) 51 | * 微博 : 博爱1616 52 | * Email : 137361770@qq.com 53 | * GitHub : https://github.com/boai 54 | * 博客 : http://boaihome.com 55 | 56 | ********************************************************************************* 57 | 58 | */ 59 | 60 | //iOS-NSDateFormatter格式说明: 61 | //G: 公元时代,例如AD公元 62 | //yy: 年的后2位 63 | //yyyy: 完整年 64 | //MM: 月,显示为1-12 65 | //MMM: 月,显示为英文月份简写,如 Jan 66 | //MMMM: 月,显示为英文月份全称,如 Janualy 67 | //dd: 日,2位数表示,如02 68 | //d: 日,1-2位显示,如 2 69 | //EEE: 简写星期几,如Sun 70 | //EEEE: 全写星期几,如Sunday 71 | //aa: 上下午,AM/PM 72 | //H: 时,24小时制,0-23 73 | //K:时,12小时制,0-11 74 | //m: 分,1-2位 75 | //mm: 分,2位 76 | //s: 秒,1-2位 77 | //ss: 秒,2位 78 | //S: 毫秒 79 | //Z:GMT 80 | 81 | 82 | #import "NSDateFormatter+BAKit.h" 83 | #import "BAKit_DefineFormat.h" 84 | 85 | @implementation NSDateFormatter (BAKit) 86 | 87 | + (id)ba_dateFormatter { 88 | return [[self alloc] init]; 89 | } 90 | 91 | + (id)ba_dateFormatterWithFormatString:(NSString *)dateFormatString { 92 | if (dateFormatString == nil || ![dateFormatString isKindOfClass:[NSString class]] || [dateFormatString isEqualToString:@""]) { 93 | return nil; 94 | } 95 | 96 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; 97 | dateFormatter.dateFormat = dateFormatString; 98 | 99 | return dateFormatter; 100 | } 101 | 102 | + (id)ba_dateFormatterWithFormatString:(NSString *)dateFormatString timezoneName:(NSString *)timezoneName { 103 | NSDateFormatter *dateFormatter = [NSDateFormatter ba_dateFormatterWithFormatString:dateFormatString]; 104 | 105 | if (timezoneName != nil && [timezoneName isKindOfClass:[NSString class]] && ![timezoneName isEqualToString:@""]) { 106 | dateFormatter.timeZone = [NSTimeZone timeZoneWithName:timezoneName]; 107 | } 108 | return dateFormatter; 109 | } 110 | 111 | + (id)ba_dateFormatterWithFormatString:(NSString *)dateFormatString dateStyle:(NSDateFormatterStyle)dateStyle { 112 | 113 | NSDateFormatter *dateFormatter = [NSDateFormatter ba_dateFormatterWithFormatString:dateFormatString]; 114 | 115 | dateFormatter.locale = [NSLocale localeWithLocaleIdentifier:@"en_US"]; 116 | dateFormatter.dateStyle = dateStyle; 117 | 118 | return dateFormatter; 119 | } 120 | 121 | + (id)ba_setupDateFormatterWithYMDHMS { 122 | return [self ba_dateFormatterWithFormatString:BAKit_FormatString_YMDHMS]; 123 | } 124 | 125 | + (id)ba_setupDateFormatterWithYMDEHMS { 126 | return [self ba_dateFormatterWithFormatString:BAKit_FormatString_YMDEHMS]; 127 | } 128 | 129 | + (id)ba_setupDateFormatterWithYMD { 130 | return [self ba_dateFormatterWithFormatString:BAKit_FormatString_YMD]; 131 | } 132 | 133 | + (id)ba_setupDateFormatterWithYM { 134 | return [self ba_dateFormatterWithFormatString:BAKit_FormatString_YM]; 135 | } 136 | 137 | + (id)ba_setupDateFormatterWithYY { 138 | return [self ba_dateFormatterWithFormatString:BAKit_FormatString_Y]; 139 | } 140 | 141 | + (id)ba_setupDateFormatterWithHM { 142 | return [self ba_dateFormatterWithFormatString:BAKit_FormatString_HM]; 143 | } 144 | 145 | + (id)ba_setupDateFormatterWithHMS { 146 | return [self ba_dateFormatterWithFormatString:BAKit_FormatString_YMDHMS]; 147 | } 148 | 149 | 150 | @end 151 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/Tools/BAPickView_Version.h: -------------------------------------------------------------------------------- 1 | // 2 | // BAPickView_Version.h 3 | // BAPickView 4 | // 5 | // Created by boai on 2017/10/8. 6 | // Copyright © 2017年 boai. All rights reserved. 7 | // 8 | 9 | #ifndef BAPickView_Version_h 10 | #define BAPickView_Version_h 11 | 12 | /*! 13 | ********************************************************************************* 14 | ************************************ 更新说明 ************************************ 15 | ********************************************************************************* 16 | 17 | 欢迎使用 BAHome 系列开源代码 ! 18 | 如有更多需求,请前往:https://github.com/BAHome 19 | 20 | 项目源码地址: 21 | OC 版 :https://github.com/BAHome/BAPickView 22 | 23 | 最新更新时间:2021-04-12 【倒叙】
24 | 最新Version:【Version:1.2.1】
25 | 更新内容:
26 | 1.2.1.1、此版本删除旧版本代码,注意:如需使用旧版本,请固定版本号为 V1.2.0
27 | 28 | 最新更新时间:2021-04-09 【倒叙】
29 | 最新Version:【Version:1.2.0】
30 | 更新内容:
31 | 1.2.0.1、优化适配 iOS 14 及 修复 自定义日期选择器 已知问题
32 | 1.2.0.2、`BAPickerManger` 全新封装组件开发完成,注意:如需使用旧版本,请固定版本号为 V1.2.0,
33 | 34 | 最新更新时间:2019-9-06 【倒叙】
35 | 最新Version:【Version:1.1.9】
36 | 更新内容:
37 | 1.1.9.1、优化适配异形屏,优化部分动画性能
38 | 1.1.9.2、`BAKit_PickerView` 系统 `UIDatePicker` 新增 最大最小日期 设置
39 | 1.1.9.3、`BAKit_PickerView`、`BAKit_DatePicker` 新增 toolBarView 底部线条,isShowTooBarBottomeLine ,可自定义线条颜色
40 | 41 | 最新更新时间:2019-8-30 【倒叙】
42 | 最新Version:【Version:1.1.8】
43 | 更新内容:
44 | 1.1.8.1、优化适配异形屏,优化部分动画性能,(感谢git网友 [@李智慧](https://github.com/luobojiangzi ) 同学提出的 bug!)
45 | 46 | 最新更新时间:2019-8-20 【倒叙】
47 | 最新Version:【Version:1.1.7】
48 | 更新内容:
49 | 1.1.7.1、修复部分自定义日期大小数值去错问题,(感谢git网友 [@李智慧](https://github.com/luobojiangzi ) 同学提出的 bug!)
50 | 51 | 最新更新时间:2019-2-27 【倒叙】
52 | 最新Version:【Version:1.1.6】
53 | 更新内容:
54 | 1.1.6.1、修复部分自定义数组取值不全的问题,(感谢简书网友 [@徐国伟](https://www.jianshu.com/u/cabe0049e1bc ) 同学提出的 bug!)
55 | 56 | 最新更新时间:2018-12-28 【倒叙】
57 | 最新Version:【Version:1.1.5】
58 | 更新内容:
59 | 1.1.5.1、修复部分日期选择最大最小值问题,优化最新代码
60 | 61 | 最新更新时间:2017-12-13 【倒叙】
62 | 最新Version:【Version:1.1.4】
63 | 更新内容:
64 | 1.1.4.1、修复 城市选择器 plist 文件读取失败后崩溃的 bug ,新增【城市数据读取失败】打印 log和弹框提示!(感谢简书网友 [@不会凉的黄花菜](http://www.jianshu.com/u/5b75c9f02124 ) 同学提出的 bug!)
65 | 66 | 最新更新时间:2017-11-02 【倒叙】
67 | 最新Version:【Version:1.1.3】
68 | 更新内容:
69 | 1.1.3.1、完美适配 iOS 11 和 iPhone X
70 | 71 | 最新更新时间:2017-10-08 【倒叙】
72 | 最新Version:【Version:1.1.2】
73 | 更新内容:
74 | 1.1.2.1、日期选择器 新增背景年份水印显示
75 | 1.1.2.2、优化部分注释
76 | 77 | 最新更新时间:2017-09-01 【倒叙】
78 | 最新Version:【Version:1.1.1】
79 | 更新内容:
80 | 1.1.1.1、日期选择器 修复顶部结果显示异常的问题,,详见 demo (感谢简书网友 [@洁简](https://github.com/Jayxiang ) 同学提出的 需求!)
81 | 82 | 最新更新时间:2017-08-05 【倒叙】
83 | 最新Version:【Version:1.1.0】
84 | 更新内容:
85 | 1.1.0.1、日期选择器新增 优化了最大最小年份月份的写法,现在可以自由定义最大最小日期了,详见 demo (感谢简书网友 [@洁简](https://github.com/Jayxiang ) 同学提出的 需求!)
86 | 1.1.0.2、新增 选中结果直接显示在 工具栏的中间,且可以自定义颜色、字体
87 | 1.1.0.3、修复日期选择器横竖屏不适配的 bug
88 | 89 | 最新更新时间:2017-07-18 【倒叙】
90 | 最新Version:【Version:1.0.9】
91 | 更新内容:
92 | 1.0.9.1、日期选择器新增 最大月份限制(感谢简书网友 [@洁简](http://www.jianshu.com/u/62f0c72a2004) 同学提出的 需求!)
93 | 94 | 最新更新时间:2017-07-17 【倒叙】
95 | 最新Version:【Version:1.0.8】
96 | 更新内容:
97 | 1.0.8.1、新增分割线开关和分割线颜色自定义(感谢群里 [@杭州-可米](https://github.com/fan-xiang) 和 [@紫暄](https://github.com/rainy0426)同学提出的 需求!)
98 | 99 | 最新更新时间:2017-06-28 【倒叙】
100 | 最新Version:【Version:1.0.7】
101 | 更新内容:
102 | 1.0.7.1、修复 日期选择器 不同样式下错乱的 bug(感谢群里 [@西瓜Sama](https://github.com/lipengda) 同学提出的 bug!)
103 | 104 | 最新更新时间:2017-06-23 【倒叙】 105 | 最新Version:【Version:1.0.6】 106 | 更新内容: 107 | 1.0.6.1、优化部分宏定义 108 | 109 | 最新更新时间:2017-06-22 【倒叙】
110 | 最新Version:【Version:1.0.5】
111 | 更新内容:
112 | 1.0.5.1、新增 多种动画样式
113 | 114 | 最新更新时间:2017-06-19 【倒叙】
115 | 最新Version:【Version:1.0.4】
116 | 更新内容:
117 | 1.0.4.1、新增 各种自定义 datePicker:年、年月、年月日、时间等等,你能想到的效果都有
118 | 1.0.4.2、可以自定义 datePicker 的字体颜色、字体、字体大小、背景颜色等
119 | 1.0.4.3、可以自定义 datePicker 的最大、最小年限
120 | 1.0.4.4、可以自定义 datePicker 的 toolBar 位置、字体、背景颜色等 121 | 122 | 最新更新时间:2017-06-03 【倒叙】
123 | 最新Version:【Version:1.0.3】
124 | 更新内容:
125 | 1.0.3.1、可以自由设置 pickView 居中或者在底部显示,还可以自由定制 toolbar 居中或者在底部显示
126 | 1.0.3.2、可以自由设置 pickView 字体、字体颜色等内容,注意:日期选择器暂时不能修改字体,有可能被苹果审核不通过,如有特殊需求,可通过 runtime 修改
127 | 128 | 最新更新时间:2017-05-27 【倒叙】
129 | 最新Version:【Version:1.0.2】
130 | 更新内容:
131 | 1.0.2.1、新增进出场动画,缩放、上下左右展示、消失动画
132 | 1.0.2.2、修复 isTouchEdgeHide 失效的 bug
133 | 134 | 最新更新时间:2017-05-22 【倒叙】
135 | 最新Version:【Version:1.0.1】
136 | 更新内容:
137 | 1.0.1.1、新增年周选择器,如:2017年,第21周
138 | 139 | 最新更新时间:2017-05-16 【倒叙】
140 | 最新Version:【Version:1.0.0】
141 | 更新内容:
142 | 1.0.0.1、城市选择器,三级联动,可返回省市县和精确的经纬度
143 | 1.0.0.2、可以自定义 array 显示,性别选择等【目前只支持单行数据】
144 | 1.0.0.3、日期选择器:年月日,可以完全自定义 NSDateFormatter
145 | 1.0.0.4、日期选择器:年月,可以完全自定义 NSDateFormatter
146 | 1.0.0.5、横竖屏适配完美
147 | 1.0.0.6、可以自定义按钮颜色、背景颜色等
148 | 1.0.0.7、理论完全兼容现有所有 iOS 系统版本
149 | 150 | */ 151 | 152 | #endif /* BAPickView_Version_h */ 153 | -------------------------------------------------------------------------------- /Example/Pods/Masonry/Masonry/View+MASAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+MASAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | #import "MASConstraintMaker.h" 11 | #import "MASViewAttribute.h" 12 | 13 | /** 14 | * Provides constraint maker block 15 | * and convience methods for creating MASViewAttribute which are view + NSLayoutAttribute pairs 16 | */ 17 | @interface MAS_VIEW (MASAdditions) 18 | 19 | /** 20 | * following properties return a new MASViewAttribute with current view and appropriate NSLayoutAttribute 21 | */ 22 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_left; 23 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_top; 24 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_right; 25 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottom; 26 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_leading; 27 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_trailing; 28 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_width; 29 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_height; 30 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerX; 31 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerY; 32 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_baseline; 33 | @property (nonatomic, strong, readonly) MASViewAttribute *(^mas_attribute)(NSLayoutAttribute attr); 34 | 35 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 36 | 37 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_firstBaseline; 38 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_lastBaseline; 39 | 40 | #endif 41 | 42 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) 43 | 44 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_leftMargin; 45 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_rightMargin; 46 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topMargin; 47 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomMargin; 48 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_leadingMargin; 49 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_trailingMargin; 50 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerXWithinMargins; 51 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerYWithinMargins; 52 | 53 | #endif 54 | 55 | #if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) 56 | 57 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuide API_AVAILABLE(ios(11.0),tvos(11.0)); 58 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideTop API_AVAILABLE(ios(11.0),tvos(11.0)); 59 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideBottom API_AVAILABLE(ios(11.0),tvos(11.0)); 60 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideLeft API_AVAILABLE(ios(11.0),tvos(11.0)); 61 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideRight API_AVAILABLE(ios(11.0),tvos(11.0)); 62 | 63 | #endif 64 | 65 | /** 66 | * a key to associate with this view 67 | */ 68 | @property (nonatomic, strong) id mas_key; 69 | 70 | /** 71 | * Finds the closest common superview between this view and another view 72 | * 73 | * @param view other view 74 | * 75 | * @return returns nil if common superview could not be found 76 | */ 77 | - (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view; 78 | 79 | /** 80 | * Creates a MASConstraintMaker with the callee view. 81 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing 82 | * 83 | * @param block scope within which you can build up the constraints which you wish to apply to the view. 84 | * 85 | * @return Array of created MASConstraints 86 | */ 87 | - (NSArray *)mas_makeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block; 88 | 89 | /** 90 | * Creates a MASConstraintMaker with the callee view. 91 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing. 92 | * If an existing constraint exists then it will be updated instead. 93 | * 94 | * @param block scope within which you can build up the constraints which you wish to apply to the view. 95 | * 96 | * @return Array of created/updated MASConstraints 97 | */ 98 | - (NSArray *)mas_updateConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block; 99 | 100 | /** 101 | * Creates a MASConstraintMaker with the callee view. 102 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing. 103 | * All constraints previously installed for the view will be removed. 104 | * 105 | * @param block scope within which you can build up the constraints which you wish to apply to the view. 106 | * 107 | * @return Array of created/updated MASConstraints 108 | */ 109 | - (NSArray *)mas_remakeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block; 110 | 111 | @end 112 | -------------------------------------------------------------------------------- /Example/Pods/Masonry/Masonry/View+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+MASShorthandAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 22/07/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "View+MASAdditions.h" 10 | 11 | #ifdef MAS_SHORTHAND 12 | 13 | /** 14 | * Shorthand view additions without the 'mas_' prefixes, 15 | * only enabled if MAS_SHORTHAND is defined 16 | */ 17 | @interface MAS_VIEW (MASShorthandAdditions) 18 | 19 | @property (nonatomic, strong, readonly) MASViewAttribute *left; 20 | @property (nonatomic, strong, readonly) MASViewAttribute *top; 21 | @property (nonatomic, strong, readonly) MASViewAttribute *right; 22 | @property (nonatomic, strong, readonly) MASViewAttribute *bottom; 23 | @property (nonatomic, strong, readonly) MASViewAttribute *leading; 24 | @property (nonatomic, strong, readonly) MASViewAttribute *trailing; 25 | @property (nonatomic, strong, readonly) MASViewAttribute *width; 26 | @property (nonatomic, strong, readonly) MASViewAttribute *height; 27 | @property (nonatomic, strong, readonly) MASViewAttribute *centerX; 28 | @property (nonatomic, strong, readonly) MASViewAttribute *centerY; 29 | @property (nonatomic, strong, readonly) MASViewAttribute *baseline; 30 | @property (nonatomic, strong, readonly) MASViewAttribute *(^attribute)(NSLayoutAttribute attr); 31 | 32 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 33 | 34 | @property (nonatomic, strong, readonly) MASViewAttribute *firstBaseline; 35 | @property (nonatomic, strong, readonly) MASViewAttribute *lastBaseline; 36 | 37 | #endif 38 | 39 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) 40 | 41 | @property (nonatomic, strong, readonly) MASViewAttribute *leftMargin; 42 | @property (nonatomic, strong, readonly) MASViewAttribute *rightMargin; 43 | @property (nonatomic, strong, readonly) MASViewAttribute *topMargin; 44 | @property (nonatomic, strong, readonly) MASViewAttribute *bottomMargin; 45 | @property (nonatomic, strong, readonly) MASViewAttribute *leadingMargin; 46 | @property (nonatomic, strong, readonly) MASViewAttribute *trailingMargin; 47 | @property (nonatomic, strong, readonly) MASViewAttribute *centerXWithinMargins; 48 | @property (nonatomic, strong, readonly) MASViewAttribute *centerYWithinMargins; 49 | 50 | #endif 51 | 52 | #if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) 53 | 54 | @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideTop API_AVAILABLE(ios(11.0),tvos(11.0)); 55 | @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideBottom API_AVAILABLE(ios(11.0),tvos(11.0)); 56 | @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideLeft API_AVAILABLE(ios(11.0),tvos(11.0)); 57 | @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideRight API_AVAILABLE(ios(11.0),tvos(11.0)); 58 | 59 | #endif 60 | 61 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; 62 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; 63 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; 64 | 65 | @end 66 | 67 | #define MAS_ATTR_FORWARD(attr) \ 68 | - (MASViewAttribute *)attr { \ 69 | return [self mas_##attr]; \ 70 | } 71 | 72 | @implementation MAS_VIEW (MASShorthandAdditions) 73 | 74 | MAS_ATTR_FORWARD(top); 75 | MAS_ATTR_FORWARD(left); 76 | MAS_ATTR_FORWARD(bottom); 77 | MAS_ATTR_FORWARD(right); 78 | MAS_ATTR_FORWARD(leading); 79 | MAS_ATTR_FORWARD(trailing); 80 | MAS_ATTR_FORWARD(width); 81 | MAS_ATTR_FORWARD(height); 82 | MAS_ATTR_FORWARD(centerX); 83 | MAS_ATTR_FORWARD(centerY); 84 | MAS_ATTR_FORWARD(baseline); 85 | 86 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 87 | 88 | MAS_ATTR_FORWARD(firstBaseline); 89 | MAS_ATTR_FORWARD(lastBaseline); 90 | 91 | #endif 92 | 93 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) 94 | 95 | MAS_ATTR_FORWARD(leftMargin); 96 | MAS_ATTR_FORWARD(rightMargin); 97 | MAS_ATTR_FORWARD(topMargin); 98 | MAS_ATTR_FORWARD(bottomMargin); 99 | MAS_ATTR_FORWARD(leadingMargin); 100 | MAS_ATTR_FORWARD(trailingMargin); 101 | MAS_ATTR_FORWARD(centerXWithinMargins); 102 | MAS_ATTR_FORWARD(centerYWithinMargins); 103 | 104 | #endif 105 | 106 | #if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) 107 | 108 | MAS_ATTR_FORWARD(safeAreaLayoutGuideTop); 109 | MAS_ATTR_FORWARD(safeAreaLayoutGuideBottom); 110 | MAS_ATTR_FORWARD(safeAreaLayoutGuideLeft); 111 | MAS_ATTR_FORWARD(safeAreaLayoutGuideRight); 112 | 113 | #endif 114 | 115 | - (MASViewAttribute *(^)(NSLayoutAttribute))attribute { 116 | return [self mas_attribute]; 117 | } 118 | 119 | - (NSArray *)makeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block { 120 | return [self mas_makeConstraints:block]; 121 | } 122 | 123 | - (NSArray *)updateConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block { 124 | return [self mas_updateConstraints:block]; 125 | } 126 | 127 | - (NSArray *)remakeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block { 128 | return [self mas_remakeConstraints:block]; 129 | } 130 | 131 | @end 132 | 133 | #endif 134 | -------------------------------------------------------------------------------- /BAPickView/Classes/Tools/BAPickView_Version.h: -------------------------------------------------------------------------------- 1 | // 2 | // BAPickView_Version.h 3 | // BAPickView 4 | // 5 | // Created by boai on 2017/10/8. 6 | // Copyright © 2017年 boai. All rights reserved. 7 | // 8 | 9 | #ifndef BAPickView_Version_h 10 | #define BAPickView_Version_h 11 | 12 | /*! 13 | ********************************************************************************* 14 | ************************************ 更新说明 ************************************ 15 | ********************************************************************************* 16 | 17 | 欢迎使用 BAHome 系列开源代码 ! 18 | 如有更多需求,请前往:https://github.com/BAHome 19 | 20 | 项目源码地址: 21 | OC 版 :https://github.com/BAHome/BAPickView 22 | 23 | 最新更新时间:2023-02-9 【倒叙】
24 | 最新Version:【Version:1.2.5】
25 | 更新内容:
26 | 1.2.5.1、此版本删除旧版本代码,注意:如需使用旧版本,请固定版本号为 V1.2.0
27 | 1.2.5.2、修复一些已知问题
28 | 29 | 最新更新时间:2021-04-13 【倒叙】
30 | 最新Version:【Version:1.2.3】
31 | 更新内容:
32 | 1.2.3.1、此版本删除旧版本代码,注意:如需使用旧版本,请固定版本号为 V1.2.0
33 | 1.2.3.2、修复一些已知问题
34 | 35 | 最新更新时间:2021-04-09 【倒叙】
36 | 最新Version:【Version:1.2.0】
37 | 更新内容:
38 | 1.2.0.1、优化适配 iOS 14 及 修复 自定义日期选择器 已知问题
39 | 1.2.0.2、`BAPickerManger` 全新封装组件开发完成,注意:如需使用旧版本,请固定版本号为 V1.2.0,
40 | 41 | 最新更新时间:2019-9-06 【倒叙】
42 | 最新Version:【Version:1.1.9】
43 | 更新内容:
44 | 1.1.9.1、优化适配异形屏,优化部分动画性能
45 | 1.1.9.2、`BAKit_PickerView` 系统 `UIDatePicker` 新增 最大最小日期 设置
46 | 1.1.9.3、`BAKit_PickerView`、`BAKit_DatePicker` 新增 toolBarView 底部线条,isShowTooBarBottomeLine ,可自定义线条颜色
47 | 48 | 最新更新时间:2019-8-30 【倒叙】
49 | 最新Version:【Version:1.1.8】
50 | 更新内容:
51 | 1.1.8.1、优化适配异形屏,优化部分动画性能,(感谢git网友 [@李智慧](https://github.com/luobojiangzi ) 同学提出的 bug!)
52 | 53 | 最新更新时间:2019-8-20 【倒叙】
54 | 最新Version:【Version:1.1.7】
55 | 更新内容:
56 | 1.1.7.1、修复部分自定义日期大小数值去错问题,(感谢git网友 [@李智慧](https://github.com/luobojiangzi ) 同学提出的 bug!)
57 | 58 | 最新更新时间:2019-2-27 【倒叙】
59 | 最新Version:【Version:1.1.6】
60 | 更新内容:
61 | 1.1.6.1、修复部分自定义数组取值不全的问题,(感谢简书网友 [@徐国伟](https://www.jianshu.com/u/cabe0049e1bc ) 同学提出的 bug!)
62 | 63 | 最新更新时间:2018-12-28 【倒叙】
64 | 最新Version:【Version:1.1.5】
65 | 更新内容:
66 | 1.1.5.1、修复部分日期选择最大最小值问题,优化最新代码
67 | 68 | 最新更新时间:2017-12-13 【倒叙】
69 | 最新Version:【Version:1.1.4】
70 | 更新内容:
71 | 1.1.4.1、修复 城市选择器 plist 文件读取失败后崩溃的 bug ,新增【城市数据读取失败】打印 log和弹框提示!(感谢简书网友 [@不会凉的黄花菜](http://www.jianshu.com/u/5b75c9f02124 ) 同学提出的 bug!)
72 | 73 | 最新更新时间:2017-11-02 【倒叙】
74 | 最新Version:【Version:1.1.3】
75 | 更新内容:
76 | 1.1.3.1、完美适配 iOS 11 和 iPhone X
77 | 78 | 最新更新时间:2017-10-08 【倒叙】
79 | 最新Version:【Version:1.1.2】
80 | 更新内容:
81 | 1.1.2.1、日期选择器 新增背景年份水印显示
82 | 1.1.2.2、优化部分注释
83 | 84 | 最新更新时间:2017-09-01 【倒叙】
85 | 最新Version:【Version:1.1.1】
86 | 更新内容:
87 | 1.1.1.1、日期选择器 修复顶部结果显示异常的问题,,详见 demo (感谢简书网友 [@洁简](https://github.com/Jayxiang ) 同学提出的 需求!)
88 | 89 | 最新更新时间:2017-08-05 【倒叙】
90 | 最新Version:【Version:1.1.0】
91 | 更新内容:
92 | 1.1.0.1、日期选择器新增 优化了最大最小年份月份的写法,现在可以自由定义最大最小日期了,详见 demo (感谢简书网友 [@洁简](https://github.com/Jayxiang ) 同学提出的 需求!)
93 | 1.1.0.2、新增 选中结果直接显示在 工具栏的中间,且可以自定义颜色、字体
94 | 1.1.0.3、修复日期选择器横竖屏不适配的 bug
95 | 96 | 最新更新时间:2017-07-18 【倒叙】
97 | 最新Version:【Version:1.0.9】
98 | 更新内容:
99 | 1.0.9.1、日期选择器新增 最大月份限制(感谢简书网友 [@洁简](http://www.jianshu.com/u/62f0c72a2004) 同学提出的 需求!)
100 | 101 | 最新更新时间:2017-07-17 【倒叙】
102 | 最新Version:【Version:1.0.8】
103 | 更新内容:
104 | 1.0.8.1、新增分割线开关和分割线颜色自定义(感谢群里 [@杭州-可米](https://github.com/fan-xiang) 和 [@紫暄](https://github.com/rainy0426)同学提出的 需求!)
105 | 106 | 最新更新时间:2017-06-28 【倒叙】
107 | 最新Version:【Version:1.0.7】
108 | 更新内容:
109 | 1.0.7.1、修复 日期选择器 不同样式下错乱的 bug(感谢群里 [@西瓜Sama](https://github.com/lipengda) 同学提出的 bug!)
110 | 111 | 最新更新时间:2017-06-23 【倒叙】 112 | 最新Version:【Version:1.0.6】 113 | 更新内容: 114 | 1.0.6.1、优化部分宏定义 115 | 116 | 最新更新时间:2017-06-22 【倒叙】
117 | 最新Version:【Version:1.0.5】
118 | 更新内容:
119 | 1.0.5.1、新增 多种动画样式
120 | 121 | 最新更新时间:2017-06-19 【倒叙】
122 | 最新Version:【Version:1.0.4】
123 | 更新内容:
124 | 1.0.4.1、新增 各种自定义 datePicker:年、年月、年月日、时间等等,你能想到的效果都有
125 | 1.0.4.2、可以自定义 datePicker 的字体颜色、字体、字体大小、背景颜色等
126 | 1.0.4.3、可以自定义 datePicker 的最大、最小年限
127 | 1.0.4.4、可以自定义 datePicker 的 toolBar 位置、字体、背景颜色等 128 | 129 | 最新更新时间:2017-06-03 【倒叙】
130 | 最新Version:【Version:1.0.3】
131 | 更新内容:
132 | 1.0.3.1、可以自由设置 pickView 居中或者在底部显示,还可以自由定制 toolbar 居中或者在底部显示
133 | 1.0.3.2、可以自由设置 pickView 字体、字体颜色等内容,注意:日期选择器暂时不能修改字体,有可能被苹果审核不通过,如有特殊需求,可通过 runtime 修改
134 | 135 | 最新更新时间:2017-05-27 【倒叙】
136 | 最新Version:【Version:1.0.2】
137 | 更新内容:
138 | 1.0.2.1、新增进出场动画,缩放、上下左右展示、消失动画
139 | 1.0.2.2、修复 isTouchEdgeHide 失效的 bug
140 | 141 | 最新更新时间:2017-05-22 【倒叙】
142 | 最新Version:【Version:1.0.1】
143 | 更新内容:
144 | 1.0.1.1、新增年周选择器,如:2017年,第21周
145 | 146 | 最新更新时间:2017-05-16 【倒叙】
147 | 最新Version:【Version:1.0.0】
148 | 更新内容:
149 | 1.0.0.1、城市选择器,三级联动,可返回省市县和精确的经纬度
150 | 1.0.0.2、可以自定义 array 显示,性别选择等【目前只支持单行数据】
151 | 1.0.0.3、日期选择器:年月日,可以完全自定义 NSDateFormatter
152 | 1.0.0.4、日期选择器:年月,可以完全自定义 NSDateFormatter
153 | 1.0.0.5、横竖屏适配完美
154 | 1.0.0.6、可以自定义按钮颜色、背景颜色等
155 | 1.0.0.7、理论完全兼容现有所有 iOS 系统版本
156 | 157 | */ 158 | 159 | #endif /* BAPickView_Version_h */ 160 | -------------------------------------------------------------------------------- /Example/Pods/Masonry/Masonry/MASCompositeConstraint.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASCompositeConstraint.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASCompositeConstraint.h" 10 | #import "MASConstraint+Private.h" 11 | 12 | @interface MASCompositeConstraint () 13 | 14 | @property (nonatomic, strong) id mas_key; 15 | @property (nonatomic, strong) NSMutableArray *childConstraints; 16 | 17 | @end 18 | 19 | @implementation MASCompositeConstraint 20 | 21 | - (id)initWithChildren:(NSArray *)children { 22 | self = [super init]; 23 | if (!self) return nil; 24 | 25 | _childConstraints = [children mutableCopy]; 26 | for (MASConstraint *constraint in _childConstraints) { 27 | constraint.delegate = self; 28 | } 29 | 30 | return self; 31 | } 32 | 33 | #pragma mark - MASConstraintDelegate 34 | 35 | - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint { 36 | NSUInteger index = [self.childConstraints indexOfObject:constraint]; 37 | NSAssert(index != NSNotFound, @"Could not find constraint %@", constraint); 38 | [self.childConstraints replaceObjectAtIndex:index withObject:replacementConstraint]; 39 | } 40 | 41 | - (MASConstraint *)constraint:(MASConstraint __unused *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { 42 | id strongDelegate = self.delegate; 43 | MASConstraint *newConstraint = [strongDelegate constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; 44 | newConstraint.delegate = self; 45 | [self.childConstraints addObject:newConstraint]; 46 | return newConstraint; 47 | } 48 | 49 | #pragma mark - NSLayoutConstraint multiplier proxies 50 | 51 | - (MASConstraint * (^)(CGFloat))multipliedBy { 52 | return ^id(CGFloat multiplier) { 53 | for (MASConstraint *constraint in self.childConstraints) { 54 | constraint.multipliedBy(multiplier); 55 | } 56 | return self; 57 | }; 58 | } 59 | 60 | - (MASConstraint * (^)(CGFloat))dividedBy { 61 | return ^id(CGFloat divider) { 62 | for (MASConstraint *constraint in self.childConstraints) { 63 | constraint.dividedBy(divider); 64 | } 65 | return self; 66 | }; 67 | } 68 | 69 | #pragma mark - MASLayoutPriority proxy 70 | 71 | - (MASConstraint * (^)(MASLayoutPriority))priority { 72 | return ^id(MASLayoutPriority priority) { 73 | for (MASConstraint *constraint in self.childConstraints) { 74 | constraint.priority(priority); 75 | } 76 | return self; 77 | }; 78 | } 79 | 80 | #pragma mark - NSLayoutRelation proxy 81 | 82 | - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation { 83 | return ^id(id attr, NSLayoutRelation relation) { 84 | for (MASConstraint *constraint in self.childConstraints.copy) { 85 | constraint.equalToWithRelation(attr, relation); 86 | } 87 | return self; 88 | }; 89 | } 90 | 91 | #pragma mark - attribute chaining 92 | 93 | - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { 94 | [self constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; 95 | return self; 96 | } 97 | 98 | #pragma mark - Animator proxy 99 | 100 | #if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV) 101 | 102 | - (MASConstraint *)animator { 103 | for (MASConstraint *constraint in self.childConstraints) { 104 | [constraint animator]; 105 | } 106 | return self; 107 | } 108 | 109 | #endif 110 | 111 | #pragma mark - debug helpers 112 | 113 | - (MASConstraint * (^)(id))key { 114 | return ^id(id key) { 115 | self.mas_key = key; 116 | int i = 0; 117 | for (MASConstraint *constraint in self.childConstraints) { 118 | constraint.key([NSString stringWithFormat:@"%@[%d]", key, i++]); 119 | } 120 | return self; 121 | }; 122 | } 123 | 124 | #pragma mark - NSLayoutConstraint constant setters 125 | 126 | - (void)setInsets:(MASEdgeInsets)insets { 127 | for (MASConstraint *constraint in self.childConstraints) { 128 | constraint.insets = insets; 129 | } 130 | } 131 | 132 | - (void)setInset:(CGFloat)inset { 133 | for (MASConstraint *constraint in self.childConstraints) { 134 | constraint.inset = inset; 135 | } 136 | } 137 | 138 | - (void)setOffset:(CGFloat)offset { 139 | for (MASConstraint *constraint in self.childConstraints) { 140 | constraint.offset = offset; 141 | } 142 | } 143 | 144 | - (void)setSizeOffset:(CGSize)sizeOffset { 145 | for (MASConstraint *constraint in self.childConstraints) { 146 | constraint.sizeOffset = sizeOffset; 147 | } 148 | } 149 | 150 | - (void)setCenterOffset:(CGPoint)centerOffset { 151 | for (MASConstraint *constraint in self.childConstraints) { 152 | constraint.centerOffset = centerOffset; 153 | } 154 | } 155 | 156 | #pragma mark - MASConstraint 157 | 158 | - (void)activate { 159 | for (MASConstraint *constraint in self.childConstraints) { 160 | [constraint activate]; 161 | } 162 | } 163 | 164 | - (void)deactivate { 165 | for (MASConstraint *constraint in self.childConstraints) { 166 | [constraint deactivate]; 167 | } 168 | } 169 | 170 | - (void)install { 171 | for (MASConstraint *constraint in self.childConstraints) { 172 | constraint.updateExisting = self.updateExisting; 173 | [constraint install]; 174 | } 175 | } 176 | 177 | - (void)uninstall { 178 | for (MASConstraint *constraint in self.childConstraints) { 179 | [constraint uninstall]; 180 | } 181 | } 182 | 183 | @end 184 | -------------------------------------------------------------------------------- /Example/Pods/Masonry/Masonry/MASConstraintMaker.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASConstraintMaker.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASConstraint.h" 10 | #import "MASUtilities.h" 11 | 12 | typedef NS_OPTIONS(NSInteger, MASAttribute) { 13 | MASAttributeLeft = 1 << NSLayoutAttributeLeft, 14 | MASAttributeRight = 1 << NSLayoutAttributeRight, 15 | MASAttributeTop = 1 << NSLayoutAttributeTop, 16 | MASAttributeBottom = 1 << NSLayoutAttributeBottom, 17 | MASAttributeLeading = 1 << NSLayoutAttributeLeading, 18 | MASAttributeTrailing = 1 << NSLayoutAttributeTrailing, 19 | MASAttributeWidth = 1 << NSLayoutAttributeWidth, 20 | MASAttributeHeight = 1 << NSLayoutAttributeHeight, 21 | MASAttributeCenterX = 1 << NSLayoutAttributeCenterX, 22 | MASAttributeCenterY = 1 << NSLayoutAttributeCenterY, 23 | MASAttributeBaseline = 1 << NSLayoutAttributeBaseline, 24 | 25 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 26 | 27 | MASAttributeFirstBaseline = 1 << NSLayoutAttributeFirstBaseline, 28 | MASAttributeLastBaseline = 1 << NSLayoutAttributeLastBaseline, 29 | 30 | #endif 31 | 32 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) 33 | 34 | MASAttributeLeftMargin = 1 << NSLayoutAttributeLeftMargin, 35 | MASAttributeRightMargin = 1 << NSLayoutAttributeRightMargin, 36 | MASAttributeTopMargin = 1 << NSLayoutAttributeTopMargin, 37 | MASAttributeBottomMargin = 1 << NSLayoutAttributeBottomMargin, 38 | MASAttributeLeadingMargin = 1 << NSLayoutAttributeLeadingMargin, 39 | MASAttributeTrailingMargin = 1 << NSLayoutAttributeTrailingMargin, 40 | MASAttributeCenterXWithinMargins = 1 << NSLayoutAttributeCenterXWithinMargins, 41 | MASAttributeCenterYWithinMargins = 1 << NSLayoutAttributeCenterYWithinMargins, 42 | 43 | #endif 44 | 45 | }; 46 | 47 | /** 48 | * Provides factory methods for creating MASConstraints. 49 | * Constraints are collected until they are ready to be installed 50 | * 51 | */ 52 | @interface MASConstraintMaker : NSObject 53 | 54 | /** 55 | * The following properties return a new MASViewConstraint 56 | * with the first item set to the makers associated view and the appropriate MASViewAttribute 57 | */ 58 | @property (nonatomic, strong, readonly) MASConstraint *left; 59 | @property (nonatomic, strong, readonly) MASConstraint *top; 60 | @property (nonatomic, strong, readonly) MASConstraint *right; 61 | @property (nonatomic, strong, readonly) MASConstraint *bottom; 62 | @property (nonatomic, strong, readonly) MASConstraint *leading; 63 | @property (nonatomic, strong, readonly) MASConstraint *trailing; 64 | @property (nonatomic, strong, readonly) MASConstraint *width; 65 | @property (nonatomic, strong, readonly) MASConstraint *height; 66 | @property (nonatomic, strong, readonly) MASConstraint *centerX; 67 | @property (nonatomic, strong, readonly) MASConstraint *centerY; 68 | @property (nonatomic, strong, readonly) MASConstraint *baseline; 69 | 70 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 71 | 72 | @property (nonatomic, strong, readonly) MASConstraint *firstBaseline; 73 | @property (nonatomic, strong, readonly) MASConstraint *lastBaseline; 74 | 75 | #endif 76 | 77 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) 78 | 79 | @property (nonatomic, strong, readonly) MASConstraint *leftMargin; 80 | @property (nonatomic, strong, readonly) MASConstraint *rightMargin; 81 | @property (nonatomic, strong, readonly) MASConstraint *topMargin; 82 | @property (nonatomic, strong, readonly) MASConstraint *bottomMargin; 83 | @property (nonatomic, strong, readonly) MASConstraint *leadingMargin; 84 | @property (nonatomic, strong, readonly) MASConstraint *trailingMargin; 85 | @property (nonatomic, strong, readonly) MASConstraint *centerXWithinMargins; 86 | @property (nonatomic, strong, readonly) MASConstraint *centerYWithinMargins; 87 | 88 | #endif 89 | 90 | /** 91 | * Returns a block which creates a new MASCompositeConstraint with the first item set 92 | * to the makers associated view and children corresponding to the set bits in the 93 | * MASAttribute parameter. Combine multiple attributes via binary-or. 94 | */ 95 | @property (nonatomic, strong, readonly) MASConstraint *(^attributes)(MASAttribute attrs); 96 | 97 | /** 98 | * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeEdges 99 | * which generates the appropriate MASViewConstraint children (top, left, bottom, right) 100 | * with the first item set to the makers associated view 101 | */ 102 | @property (nonatomic, strong, readonly) MASConstraint *edges; 103 | 104 | /** 105 | * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeSize 106 | * which generates the appropriate MASViewConstraint children (width, height) 107 | * with the first item set to the makers associated view 108 | */ 109 | @property (nonatomic, strong, readonly) MASConstraint *size; 110 | 111 | /** 112 | * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeCenter 113 | * which generates the appropriate MASViewConstraint children (centerX, centerY) 114 | * with the first item set to the makers associated view 115 | */ 116 | @property (nonatomic, strong, readonly) MASConstraint *center; 117 | 118 | /** 119 | * Whether or not to check for an existing constraint instead of adding constraint 120 | */ 121 | @property (nonatomic, assign) BOOL updateExisting; 122 | 123 | /** 124 | * Whether or not to remove existing constraints prior to installing 125 | */ 126 | @property (nonatomic, assign) BOOL removeExisting; 127 | 128 | /** 129 | * initialises the maker with a default view 130 | * 131 | * @param view any MASConstraint are created with this view as the first item 132 | * 133 | * @return a new MASConstraintMaker 134 | */ 135 | - (id)initWithView:(MAS_VIEW *)view; 136 | 137 | /** 138 | * Calls install method on any MASConstraints which have been created by this maker 139 | * 140 | * @return an array of all the installed MASConstraints 141 | */ 142 | - (NSArray *)install; 143 | 144 | - (MASConstraint * (^)(dispatch_block_t))group; 145 | 146 | @end 147 | -------------------------------------------------------------------------------- /Example/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSLayoutConstraint+MASDebugAdditions.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "NSLayoutConstraint+MASDebugAdditions.h" 10 | #import "MASConstraint.h" 11 | #import "MASLayoutConstraint.h" 12 | 13 | @implementation NSLayoutConstraint (MASDebugAdditions) 14 | 15 | #pragma mark - description maps 16 | 17 | + (NSDictionary *)layoutRelationDescriptionsByValue { 18 | static dispatch_once_t once; 19 | static NSDictionary *descriptionMap; 20 | dispatch_once(&once, ^{ 21 | descriptionMap = @{ 22 | @(NSLayoutRelationEqual) : @"==", 23 | @(NSLayoutRelationGreaterThanOrEqual) : @">=", 24 | @(NSLayoutRelationLessThanOrEqual) : @"<=", 25 | }; 26 | }); 27 | return descriptionMap; 28 | } 29 | 30 | + (NSDictionary *)layoutAttributeDescriptionsByValue { 31 | static dispatch_once_t once; 32 | static NSDictionary *descriptionMap; 33 | dispatch_once(&once, ^{ 34 | descriptionMap = @{ 35 | @(NSLayoutAttributeTop) : @"top", 36 | @(NSLayoutAttributeLeft) : @"left", 37 | @(NSLayoutAttributeBottom) : @"bottom", 38 | @(NSLayoutAttributeRight) : @"right", 39 | @(NSLayoutAttributeLeading) : @"leading", 40 | @(NSLayoutAttributeTrailing) : @"trailing", 41 | @(NSLayoutAttributeWidth) : @"width", 42 | @(NSLayoutAttributeHeight) : @"height", 43 | @(NSLayoutAttributeCenterX) : @"centerX", 44 | @(NSLayoutAttributeCenterY) : @"centerY", 45 | @(NSLayoutAttributeBaseline) : @"baseline", 46 | 47 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 48 | @(NSLayoutAttributeFirstBaseline) : @"firstBaseline", 49 | @(NSLayoutAttributeLastBaseline) : @"lastBaseline", 50 | #endif 51 | 52 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) 53 | @(NSLayoutAttributeLeftMargin) : @"leftMargin", 54 | @(NSLayoutAttributeRightMargin) : @"rightMargin", 55 | @(NSLayoutAttributeTopMargin) : @"topMargin", 56 | @(NSLayoutAttributeBottomMargin) : @"bottomMargin", 57 | @(NSLayoutAttributeLeadingMargin) : @"leadingMargin", 58 | @(NSLayoutAttributeTrailingMargin) : @"trailingMargin", 59 | @(NSLayoutAttributeCenterXWithinMargins) : @"centerXWithinMargins", 60 | @(NSLayoutAttributeCenterYWithinMargins) : @"centerYWithinMargins", 61 | #endif 62 | 63 | }; 64 | 65 | }); 66 | return descriptionMap; 67 | } 68 | 69 | 70 | + (NSDictionary *)layoutPriorityDescriptionsByValue { 71 | static dispatch_once_t once; 72 | static NSDictionary *descriptionMap; 73 | dispatch_once(&once, ^{ 74 | #if TARGET_OS_IPHONE || TARGET_OS_TV 75 | descriptionMap = @{ 76 | @(MASLayoutPriorityDefaultHigh) : @"high", 77 | @(MASLayoutPriorityDefaultLow) : @"low", 78 | @(MASLayoutPriorityDefaultMedium) : @"medium", 79 | @(MASLayoutPriorityRequired) : @"required", 80 | @(MASLayoutPriorityFittingSizeLevel) : @"fitting size", 81 | }; 82 | #elif TARGET_OS_MAC 83 | descriptionMap = @{ 84 | @(MASLayoutPriorityDefaultHigh) : @"high", 85 | @(MASLayoutPriorityDragThatCanResizeWindow) : @"drag can resize window", 86 | @(MASLayoutPriorityDefaultMedium) : @"medium", 87 | @(MASLayoutPriorityWindowSizeStayPut) : @"window size stay put", 88 | @(MASLayoutPriorityDragThatCannotResizeWindow) : @"drag cannot resize window", 89 | @(MASLayoutPriorityDefaultLow) : @"low", 90 | @(MASLayoutPriorityFittingSizeCompression) : @"fitting size", 91 | @(MASLayoutPriorityRequired) : @"required", 92 | }; 93 | #endif 94 | }); 95 | return descriptionMap; 96 | } 97 | 98 | #pragma mark - description override 99 | 100 | + (NSString *)descriptionForObject:(id)obj { 101 | if ([obj respondsToSelector:@selector(mas_key)] && [obj mas_key]) { 102 | return [NSString stringWithFormat:@"%@:%@", [obj class], [obj mas_key]]; 103 | } 104 | return [NSString stringWithFormat:@"%@:%p", [obj class], obj]; 105 | } 106 | 107 | - (NSString *)description { 108 | NSMutableString *description = [[NSMutableString alloc] initWithString:@"<"]; 109 | 110 | [description appendString:[self.class descriptionForObject:self]]; 111 | 112 | [description appendFormat:@" %@", [self.class descriptionForObject:self.firstItem]]; 113 | if (self.firstAttribute != NSLayoutAttributeNotAnAttribute) { 114 | [description appendFormat:@".%@", self.class.layoutAttributeDescriptionsByValue[@(self.firstAttribute)]]; 115 | } 116 | 117 | [description appendFormat:@" %@", self.class.layoutRelationDescriptionsByValue[@(self.relation)]]; 118 | 119 | if (self.secondItem) { 120 | [description appendFormat:@" %@", [self.class descriptionForObject:self.secondItem]]; 121 | } 122 | if (self.secondAttribute != NSLayoutAttributeNotAnAttribute) { 123 | [description appendFormat:@".%@", self.class.layoutAttributeDescriptionsByValue[@(self.secondAttribute)]]; 124 | } 125 | 126 | if (self.multiplier != 1) { 127 | [description appendFormat:@" * %g", self.multiplier]; 128 | } 129 | 130 | if (self.secondAttribute == NSLayoutAttributeNotAnAttribute) { 131 | [description appendFormat:@" %g", self.constant]; 132 | } else { 133 | if (self.constant) { 134 | [description appendFormat:@" %@ %g", (self.constant < 0 ? @"-" : @"+"), ABS(self.constant)]; 135 | } 136 | } 137 | 138 | if (self.priority != MASLayoutPriorityRequired) { 139 | [description appendFormat:@" ^%@", self.class.layoutPriorityDescriptionsByValue[@(self.priority)] ?: [NSNumber numberWithDouble:self.priority]]; 140 | } 141 | 142 | [description appendString:@">"]; 143 | return description; 144 | } 145 | 146 | @end 147 | -------------------------------------------------------------------------------- /BAPickView/Classes/PickerView/BAPickerBasePopView.m: -------------------------------------------------------------------------------- 1 | // 2 | // BAPickerBasePopView.m 3 | // BAPickView 4 | // 5 | // Created by 博爱 on 2021/4/1. 6 | // 7 | 8 | #import "BAPickerBasePopView.h" 9 | 10 | @interface BAPickerBasePopView () 11 | 12 | @end 13 | 14 | @implementation BAPickerBasePopView 15 | 16 | - (instancetype)initWithFrame:(CGRect)frame { 17 | self = [super initWithFrame:frame]; 18 | if (self) { 19 | [self initUI__]; 20 | [self initData__]; 21 | } 22 | return self; 23 | } 24 | 25 | - (void)initUI__ { 26 | [self addSubview:self.contentView]; 27 | [self.contentView mas_makeConstraints:^(MASConstraintMaker *make) { 28 | make.edges.offset(0); 29 | }]; 30 | } 31 | 32 | - (void)initData__ { 33 | self.animationStyle = BAPickerBasePopViewAnimationStyle_None; 34 | } 35 | 36 | - (void)layoutSubviews { 37 | [super layoutSubviews]; 38 | 39 | if (self.needContentViewTopCorner) { 40 | [self setCornerWithView:self.contentView corners :UIRectCornerTopLeft|UIRectCornerTopRight cornerRadius:self.contentViewCorners]; 41 | } else { 42 | self.contentView.layer.cornerRadius = self.contentViewCorners; 43 | } 44 | } 45 | 46 | - (void)handleLayout { 47 | // dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 48 | // [self setNeedsLayout]; 49 | // [self layoutIfNeeded]; 50 | // }); 51 | } 52 | 53 | - (void)setCornerWithView:(UIView *)view 54 | corners:(UIRectCorner)corners 55 | cornerRadius:(CGFloat)cornerRadius { 56 | 57 | if (CGRectEqualToRect(view.bounds, CGRectZero)) { 58 | NSLog(@"******** %s view frame 错误!", __func__); 59 | return; 60 | } 61 | 62 | UIBezierPath *bezierPath = [UIBezierPath bezierPathWithRoundedRect:view.bounds 63 | byRoundingCorners:corners 64 | cornerRadii:CGSizeMake(cornerRadius, cornerRadius)]; 65 | CAShapeLayer *shapeLayer = [CAShapeLayer layer]; 66 | shapeLayer.path = bezierPath.CGPath; 67 | shapeLayer.frame = view.bounds; 68 | 69 | view.layer.mask = shapeLayer; 70 | 71 | CAShapeLayer *borderLayer = [CAShapeLayer layer]; 72 | borderLayer.path = bezierPath.CGPath; 73 | borderLayer.fillColor = [UIColor clearColor].CGColor; 74 | // borderLayer.strokeColor = self.ba_viewBorderColor.CGColor; 75 | // borderLayer.lineWidth = self.ba_viewBorderWidth; 76 | borderLayer.frame = view.bounds; 77 | [view.layer addSublayer:borderLayer]; 78 | } 79 | 80 | #pragma mark - custom method 81 | 82 | - (void)show { 83 | if (self.superview) { 84 | return; 85 | } 86 | [self showOnView:kBAPickerGetAlertWindow()]; 87 | } 88 | 89 | - (void)showOnView:(UIView *)view { 90 | if (self.superview) { 91 | return; 92 | } 93 | 94 | [view addSubview:self]; 95 | self.backgroundColor = self.maskViewBackgroundColor ? self.maskViewBackgroundColor:[UIColor.blackColor colorWithAlphaComponent:0.3]; 96 | switch (self.animationStyle) { 97 | case BAPickerBasePopViewAnimationStyle_None: { 98 | self.frame = view.bounds; 99 | } break; 100 | case BAPickerBasePopViewAnimationStyle_Bottom: { 101 | self.frame = view.bounds; 102 | 103 | CGRect frame = CGRectMake(0, BAKit_SCREEN_HEIGHT, BAKit_SCREEN_WIDTH, self.contentViewHeight); 104 | self.contentView.frame = frame; 105 | 106 | // TO POS 107 | frame.origin.y = [UIScreen mainScreen].bounds.size.height - self.contentViewHeight; 108 | 109 | [UIView animateWithDuration:0.5 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{ 110 | self.contentView.frame = frame; 111 | [self handleLayout]; 112 | } completion:^(BOOL finished) { 113 | }]; 114 | } break; 115 | 116 | default: 117 | break; 118 | } 119 | } 120 | 121 | - (void)dismiss { 122 | @BAKit_Weakify(self); 123 | switch (self.animationStyle) { 124 | case BAPickerBasePopViewAnimationStyle_None: { 125 | [self removeAll]; 126 | } break; 127 | case BAPickerBasePopViewAnimationStyle_Bottom: { 128 | [UIView animateWithDuration:0.5 animations:^{ 129 | @BAKit_Strongify(self) 130 | self.contentView.transform = CGAffineTransformMakeTranslation(0, self.contentView.bounds.size.height); 131 | } completion:^(BOOL finished) { 132 | @BAKit_Strongify(self) 133 | [self removeAll]; 134 | }]; 135 | } break; 136 | 137 | default: 138 | break; 139 | } 140 | } 141 | 142 | - (void)removeAll { 143 | self.onDismiss ? self.onDismiss():nil; 144 | [self.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)]; 145 | 146 | [self removeFromSuperview]; 147 | } 148 | 149 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { 150 | UIView *view = (UIView *)touches.anyObject; 151 | if (![view.class isKindOfClass:self.contentView.class]) { 152 | if (self.enableTouchDismiss) { 153 | [self dismiss]; 154 | } 155 | } 156 | } 157 | 158 | #pragma mark - setter, getter 159 | 160 | - (void)setContentViewHeight:(CGFloat)contentViewHeight { 161 | _contentViewHeight = contentViewHeight; 162 | 163 | [self.contentView mas_remakeConstraints:^(MASConstraintMaker *make) { 164 | make.left.right.bottom.offset(0); 165 | make.height.mas_equalTo(contentViewHeight); 166 | }]; 167 | } 168 | 169 | - (void)setMaskViewBackgroundColor:(UIColor *)maskViewBackgroundColor { 170 | _maskViewBackgroundColor = maskViewBackgroundColor; 171 | 172 | if (maskViewBackgroundColor) { 173 | self.backgroundColor = maskViewBackgroundColor; 174 | } 175 | } 176 | 177 | - (void)setNeedContentViewTopCorner:(BOOL)needContentViewTopCorner { 178 | _needContentViewTopCorner = needContentViewTopCorner; 179 | 180 | [self handleLayout]; 181 | } 182 | 183 | - (void)setContentViewCorners:(CGFloat)contentViewCorners { 184 | _contentViewCorners = contentViewCorners; 185 | 186 | [self handleLayout]; 187 | } 188 | 189 | - (UIView *)contentView { 190 | if (!_contentView) { 191 | _contentView = UIView.new; 192 | _contentView.backgroundColor = UIColor.whiteColor; 193 | _contentView.clipsToBounds = YES; 194 | } 195 | return _contentView; 196 | } 197 | 198 | @end 199 | -------------------------------------------------------------------------------- /BAPickView/Classes/Tools/BAKit_PickerViewConfig.h: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * @header BAKit.h 4 | * 5 | * @brief BAKit 6 | * 7 | * @author 博爱 8 | * @copyright Copyright © 2016年 博爱. All rights reserved. 9 | * @version V1.0 10 | */ 11 | 12 | // _ooOoo_ 13 | // o8888888o 14 | // 88" . "88 15 | // (| -_- |) 16 | // O\ = /O 17 | // ____/`---'\____ 18 | // . ' \\| |// `. 19 | // / \\||| : |||// \ 20 | // / _||||| -:- |||||- \ 21 | // | | \\\ - /// | | 22 | // | \_| ''\---/'' | | 23 | // \ .-\__ `-` ___/-. / 24 | // ___`. .' /--.--\ `. . __ 25 | // ."" '< `.___\_<|>_/___.' >'"". 26 | // | | : `- \`.;`\ _ /`;.`/ - ` : | | 27 | // \ \ `-. \_ __\ /__ _/ .-` / / 28 | // ======`-.____`-.___\_____/___.-`____.-'====== 29 | // `=---=' 30 | // 31 | // ............................................. 32 | // 佛祖镇楼 BUG辟易 33 | // 佛曰: 34 | // 写字楼里写字间,写字间里程序员; 35 | // 程序人员写程序,又拿程序换酒钱。 36 | // 酒醒只在网上坐,酒醉还来网下眠; 37 | // 酒醉酒醒日复日,网上网下年复年。 38 | // 但愿老死电脑间,不愿鞠躬老板前; 39 | // 奔驰宝马贵者趣,公交自行程序员。 40 | // 别人笑我忒疯癫,我笑自己命太贱; 41 | // 不见满街漂亮妹,哪个归得程序员? 42 | 43 | /* 44 | 45 | ********************************************************************************* 46 | * 47 | * 在使用 BAKit 的过程中如果出现 bug 请及时以以下任意一种方式联系我,我会及时修复 bug 48 | * 49 | * QQ : 可以添加ios开发技术群 479663605 在这里找到我(博爱1616【137361770】) 50 | * 微博 : 博爱1616 51 | * Email : 137361770@qq.com 52 | * GitHub : https://github.com/boai 53 | * BAHome : https://github.com/BAHome 54 | * 博客 : http://boaihome.com 55 | 56 | ********************************************************************************* 57 | 58 | */ 59 | 60 | 61 | #ifndef BAKit_PickerViewConfig_h 62 | #define BAKit_PickerViewConfig_h 63 | 64 | 65 | /** 66 | 选择器样式,默认为:BAKit_PickerViewTypeCity 67 | 68 | - BAKit_PickerViewTypeCity: 城市选择器 69 | - BAKit_PickerViewTypeArray: 普通数组自定义数据 70 | - BAKit_PickerViewTypeMultipleArray: 多个数组定义数据 71 | - BAKit_PickerViewTypeDate: 日期选择器:年月日,可以完全自定义 NSDateFormatter 72 | - BAKit_PickerViewTypeDateYM: 日期选择器:年月,可以完全自定义 NSDateFormatter 73 | - BAKit_PickerViewTypeDateWeek: 日期选择器:年周,如:2017年,第21周 74 | 75 | */ 76 | typedef NS_ENUM(NSUInteger, BAKit_PickerViewType) { 77 | BAKit_PickerViewTypeCity = 0, 78 | BAKit_PickerViewTypeArray, 79 | BAKit_PickerViewTypeMultipleArray, 80 | BAKit_PickerViewTypeDate, 81 | BAKit_PickerViewTypeDateYM, 82 | BAKit_PickerViewTypeDateWeek 83 | }; 84 | 85 | /** 86 | 日期选择器样式下返回的数据格式,默认为:BAKit_PickerViewDateTypeYMD 87 | 88 | - BAKit_PickerViewDateTypeYY: 如:2017 89 | - BAKit_PickerViewDateTypeYM: 如:2017-03 90 | - BAKit_PickerViewDateTypeYMD: 如:20172017-03-01 91 | - BAKit_PickerViewDateTypeYMDHMS: 如:2017-03-01 18:20:12 92 | - BAKit_PickerViewDateTypeYMDEHMS: 如:2017-03-01,周二, 18:20:12 93 | - BAKit_PickerViewDateTypeHM: 如:18:20 94 | - BAKit_PickerViewDateTypeHMS: 如:18:20:12 95 | */ 96 | typedef NS_ENUM(NSUInteger, BAKit_PickerViewDateType) { 97 | BAKit_PickerViewDateTypeYY = 0, 98 | BAKit_PickerViewDateTypeYM, 99 | BAKit_PickerViewDateTypeYMD, 100 | BAKit_PickerViewDateTypeYMDHMS, 101 | BAKit_PickerViewDateTypeYMDEHMS, 102 | BAKit_PickerViewDateTypeHM, 103 | BAKit_PickerViewDateTypeHMS 104 | }; 105 | 106 | /** 107 | 设置日期选择器的样式,具体的显示顺序取决于设备的本地化设置。默认为:BAKit_PickerViewDateModeDate 108 | 109 | - BAKit_PickerViewDateModeTime: 显示时、分、AM/PM标志(可选) 110 | - BAKit_PickerViewDateModeDate: 显示年、月、日 111 | - BAKit_PickerViewDateModeDateAndTime: 显示日期的月、日、星期,时间的时、分、AM/PM标志(可选) 112 | - BAKit_PickerViewDateModeCountDownTimer: 显示时、分。应用程序必须实现一个计数器(NSTimer对象),让倒计时中的时间不断减少。 113 | */ 114 | typedef NS_ENUM(NSInteger, BAKit_PickerViewDateMode) { 115 | BAKit_PickerViewDateModeTime, 116 | /*! 选择此样式后,dateType 默认为:BAKit_PickerViewDateTypeYMD */ 117 | BAKit_PickerViewDateModeDate, 118 | /*! 选择此样式后,dateType 默认为:ba_setupDateFormatterWithYMDEHMS */ 119 | BAKit_PickerViewDateModeDateAndTime, 120 | BAKit_PickerViewDateModeCountDownTimer 121 | }; 122 | 123 | typedef NS_ENUM(NSUInteger, BAKit_PickerViewAnimationType) { 124 | BAKit_PickerViewAnimationTypeScale = 0, 125 | BAKit_PickerViewAnimationTypeTop, 126 | BAKit_PickerViewAnimationTypeBottom, 127 | BAKit_PickerViewAnimationTypeLeft, 128 | BAKit_PickerViewAnimationTypeRight 129 | }; 130 | 131 | /** 132 | 设置取消和确定按钮相对pickerView的位置 133 | 134 | - BAKit_PickerViewPositionTypeNormal: 默认PickerView在屏幕的底部 135 | - BAKit_PickerViewPositionTypeBottom: 设置pickerView在屏幕的中心 136 | 137 | */ 138 | typedef NS_ENUM(NSUInteger, BAKit_PickerViewPositionType) { 139 | BAKit_PickerViewPositionTypeNormal = 0, 140 | BAKit_PickerViewPositionTypeCenter, 141 | }; 142 | 143 | /** 144 | 设置取消和确定按钮相对pickerView的位置 145 | 146 | - BAKit_PickerViewButtonPositionTypeNormal: 默认“取消”和“确定”button在pickerView的顶部 147 | - BAKit_PickerViewButtonPositionTypeBottom: 设置“取消”和“确定”button在pickerView的底部 148 | 149 | */ 150 | typedef NS_ENUM(NSUInteger, BAKit_PickerViewButtonPositionType) { 151 | BAKit_PickerViewButtonPositionTypeNormal = 0, 152 | BAKit_PickerViewButtonPositionTypeBottom, 153 | }; 154 | 155 | #pragma mark - datePicker 156 | /** 157 | 日期选择器样式下返回的数据格式,默认为:BAKit_CustomDatePickerDateType 158 | 159 | - BAKit_CustomDatePickerDateTypeYY: 如:2017 160 | - BAKit_CustomDatePickerDateTypeYM: 如:2017-03 161 | - BAKit_CustomDatePickerDateTypeYMD: 如:2017-03-01 162 | - BAKit_CustomDatePickerDateTypeYMDHMS: 如:2017-03-01 18:20:12 163 | - BAKit_CustomDatePickerDateTypeYMDHM: 如:2017-03-01 18:20 164 | - BAKit_CustomDatePickerDateTypeMD: 如:03-06 165 | - BAKit_CustomDatePickerDateTypeHM: 如:18:20 166 | - BAKit_CustomDatePickerDateTypeHMS: 如:18:20:12 167 | */ 168 | 169 | typedef NS_ENUM(NSUInteger, BAKit_CustomDatePickerDateType) { 170 | BAKit_CustomDatePickerDateTypeYY = 0, 171 | BAKit_CustomDatePickerDateTypeYM, 172 | BAKit_CustomDatePickerDateTypeYMD, 173 | BAKit_CustomDatePickerDateTypeYMDHM, 174 | BAKit_CustomDatePickerDateTypeYMDHMS, 175 | BAKit_CustomDatePickerDateTypeMD, 176 | BAKit_CustomDatePickerDateTypeHM, 177 | BAKit_CustomDatePickerDateTypeHMS, 178 | 179 | }; 180 | 181 | typedef void (^BAKit_PickerViewResultBlock)(NSString *resultString, NSInteger index); 182 | 183 | static NSString * const kPickErrorMsg = @"当前样式下不适合将按钮放在底部,已自动为您适配合适的方案!"; 184 | 185 | 186 | #endif /* BAKit_PickerViewConfig_h */ 187 | -------------------------------------------------------------------------------- /Example/Pods/BAPickView/BAPickView/Classes/Tools/BAKit_PickerViewConfig.h: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * @header BAKit.h 4 | * 5 | * @brief BAKit 6 | * 7 | * @author 博爱 8 | * @copyright Copyright © 2016年 博爱. All rights reserved. 9 | * @version V1.0 10 | */ 11 | 12 | // _ooOoo_ 13 | // o8888888o 14 | // 88" . "88 15 | // (| -_- |) 16 | // O\ = /O 17 | // ____/`---'\____ 18 | // . ' \\| |// `. 19 | // / \\||| : |||// \ 20 | // / _||||| -:- |||||- \ 21 | // | | \\\ - /// | | 22 | // | \_| ''\---/'' | | 23 | // \ .-\__ `-` ___/-. / 24 | // ___`. .' /--.--\ `. . __ 25 | // ."" '< `.___\_<|>_/___.' >'"". 26 | // | | : `- \`.;`\ _ /`;.`/ - ` : | | 27 | // \ \ `-. \_ __\ /__ _/ .-` / / 28 | // ======`-.____`-.___\_____/___.-`____.-'====== 29 | // `=---=' 30 | // 31 | // ............................................. 32 | // 佛祖镇楼 BUG辟易 33 | // 佛曰: 34 | // 写字楼里写字间,写字间里程序员; 35 | // 程序人员写程序,又拿程序换酒钱。 36 | // 酒醒只在网上坐,酒醉还来网下眠; 37 | // 酒醉酒醒日复日,网上网下年复年。 38 | // 但愿老死电脑间,不愿鞠躬老板前; 39 | // 奔驰宝马贵者趣,公交自行程序员。 40 | // 别人笑我忒疯癫,我笑自己命太贱; 41 | // 不见满街漂亮妹,哪个归得程序员? 42 | 43 | /* 44 | 45 | ********************************************************************************* 46 | * 47 | * 在使用 BAKit 的过程中如果出现 bug 请及时以以下任意一种方式联系我,我会及时修复 bug 48 | * 49 | * QQ : 可以添加ios开发技术群 479663605 在这里找到我(博爱1616【137361770】) 50 | * 微博 : 博爱1616 51 | * Email : 137361770@qq.com 52 | * GitHub : https://github.com/boai 53 | * BAHome : https://github.com/BAHome 54 | * 博客 : http://boaihome.com 55 | 56 | ********************************************************************************* 57 | 58 | */ 59 | 60 | 61 | #ifndef BAKit_PickerViewConfig_h 62 | #define BAKit_PickerViewConfig_h 63 | 64 | 65 | /** 66 | 选择器样式,默认为:BAKit_PickerViewTypeCity 67 | 68 | - BAKit_PickerViewTypeCity: 城市选择器 69 | - BAKit_PickerViewTypeArray: 普通数组自定义数据 70 | - BAKit_PickerViewTypeMultipleArray: 多个数组定义数据 71 | - BAKit_PickerViewTypeDate: 日期选择器:年月日,可以完全自定义 NSDateFormatter 72 | - BAKit_PickerViewTypeDateYM: 日期选择器:年月,可以完全自定义 NSDateFormatter 73 | - BAKit_PickerViewTypeDateWeek: 日期选择器:年周,如:2017年,第21周 74 | 75 | */ 76 | typedef NS_ENUM(NSUInteger, BAKit_PickerViewType) { 77 | BAKit_PickerViewTypeCity = 0, 78 | BAKit_PickerViewTypeArray, 79 | BAKit_PickerViewTypeMultipleArray, 80 | BAKit_PickerViewTypeDate, 81 | BAKit_PickerViewTypeDateYM, 82 | BAKit_PickerViewTypeDateWeek 83 | }; 84 | 85 | /** 86 | 日期选择器样式下返回的数据格式,默认为:BAKit_PickerViewDateTypeYMD 87 | 88 | - BAKit_PickerViewDateTypeYY: 如:2017 89 | - BAKit_PickerViewDateTypeYM: 如:2017-03 90 | - BAKit_PickerViewDateTypeYMD: 如:20172017-03-01 91 | - BAKit_PickerViewDateTypeYMDHMS: 如:2017-03-01 18:20:12 92 | - BAKit_PickerViewDateTypeYMDEHMS: 如:2017-03-01,周二, 18:20:12 93 | - BAKit_PickerViewDateTypeHM: 如:18:20 94 | - BAKit_PickerViewDateTypeHMS: 如:18:20:12 95 | */ 96 | typedef NS_ENUM(NSUInteger, BAKit_PickerViewDateType) { 97 | BAKit_PickerViewDateTypeYY = 0, 98 | BAKit_PickerViewDateTypeYM, 99 | BAKit_PickerViewDateTypeYMD, 100 | BAKit_PickerViewDateTypeYMDHMS, 101 | BAKit_PickerViewDateTypeYMDEHMS, 102 | BAKit_PickerViewDateTypeHM, 103 | BAKit_PickerViewDateTypeHMS 104 | }; 105 | 106 | /** 107 | 设置日期选择器的样式,具体的显示顺序取决于设备的本地化设置。默认为:BAKit_PickerViewDateModeDate 108 | 109 | - BAKit_PickerViewDateModeTime: 显示时、分、AM/PM标志(可选) 110 | - BAKit_PickerViewDateModeDate: 显示年、月、日 111 | - BAKit_PickerViewDateModeDateAndTime: 显示日期的月、日、星期,时间的时、分、AM/PM标志(可选) 112 | - BAKit_PickerViewDateModeCountDownTimer: 显示时、分。应用程序必须实现一个计数器(NSTimer对象),让倒计时中的时间不断减少。 113 | */ 114 | typedef NS_ENUM(NSInteger, BAKit_PickerViewDateMode) { 115 | BAKit_PickerViewDateModeTime, 116 | /*! 选择此样式后,dateType 默认为:BAKit_PickerViewDateTypeYMD */ 117 | BAKit_PickerViewDateModeDate, 118 | /*! 选择此样式后,dateType 默认为:ba_setupDateFormatterWithYMDEHMS */ 119 | BAKit_PickerViewDateModeDateAndTime, 120 | BAKit_PickerViewDateModeCountDownTimer 121 | }; 122 | 123 | typedef NS_ENUM(NSUInteger, BAKit_PickerViewAnimationType) { 124 | BAKit_PickerViewAnimationTypeScale = 0, 125 | BAKit_PickerViewAnimationTypeTop, 126 | BAKit_PickerViewAnimationTypeBottom, 127 | BAKit_PickerViewAnimationTypeLeft, 128 | BAKit_PickerViewAnimationTypeRight 129 | }; 130 | 131 | /** 132 | 设置取消和确定按钮相对pickerView的位置 133 | 134 | - BAKit_PickerViewPositionTypeNormal: 默认PickerView在屏幕的底部 135 | - BAKit_PickerViewPositionTypeBottom: 设置pickerView在屏幕的中心 136 | 137 | */ 138 | typedef NS_ENUM(NSUInteger, BAKit_PickerViewPositionType) { 139 | BAKit_PickerViewPositionTypeNormal = 0, 140 | BAKit_PickerViewPositionTypeCenter, 141 | }; 142 | 143 | /** 144 | 设置取消和确定按钮相对pickerView的位置 145 | 146 | - BAKit_PickerViewButtonPositionTypeNormal: 默认“取消”和“确定”button在pickerView的顶部 147 | - BAKit_PickerViewButtonPositionTypeBottom: 设置“取消”和“确定”button在pickerView的底部 148 | 149 | */ 150 | typedef NS_ENUM(NSUInteger, BAKit_PickerViewButtonPositionType) { 151 | BAKit_PickerViewButtonPositionTypeNormal = 0, 152 | BAKit_PickerViewButtonPositionTypeBottom, 153 | }; 154 | 155 | #pragma mark - datePicker 156 | /** 157 | 日期选择器样式下返回的数据格式,默认为:BAKit_CustomDatePickerDateType 158 | 159 | - BAKit_CustomDatePickerDateTypeYY: 如:2017 160 | - BAKit_CustomDatePickerDateTypeYM: 如:2017-03 161 | - BAKit_CustomDatePickerDateTypeYMD: 如:2017-03-01 162 | - BAKit_CustomDatePickerDateTypeYMDHMS: 如:2017-03-01 18:20:12 163 | - BAKit_CustomDatePickerDateTypeYMDHM: 如:2017-03-01 18:20 164 | - BAKit_CustomDatePickerDateTypeMD: 如:03-06 165 | - BAKit_CustomDatePickerDateTypeHM: 如:18:20 166 | - BAKit_CustomDatePickerDateTypeHMS: 如:18:20:12 167 | */ 168 | 169 | typedef NS_ENUM(NSUInteger, BAKit_CustomDatePickerDateType) { 170 | BAKit_CustomDatePickerDateTypeYY = 0, 171 | BAKit_CustomDatePickerDateTypeYM, 172 | BAKit_CustomDatePickerDateTypeYMD, 173 | BAKit_CustomDatePickerDateTypeYMDHM, 174 | BAKit_CustomDatePickerDateTypeYMDHMS, 175 | BAKit_CustomDatePickerDateTypeMD, 176 | BAKit_CustomDatePickerDateTypeHM, 177 | BAKit_CustomDatePickerDateTypeHMS, 178 | 179 | }; 180 | 181 | typedef void (^BAKit_PickerViewResultBlock)(NSString *resultString, NSInteger index); 182 | 183 | static NSString * const kPickErrorMsg = @"当前样式下不适合将按钮放在底部,已自动为您适配合适的方案!"; 184 | 185 | 186 | #endif /* BAKit_PickerViewConfig_h */ 187 | --------------------------------------------------------------------------------