├── .DS_Store ├── .gitignore ├── DTSlider.podspec ├── DTSlider ├── DTSlider+Private.h ├── DTSlider+Private.m ├── DTSlider.h └── DTSlider.m ├── DoubleThumbSliderDemo.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ ├── shuang.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ │ └── wushuang.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ ├── shuang.xcuserdatad │ └── xcschemes │ │ └── xcschememanagement.plist │ └── wushuang.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ └── xcschememanagement.plist ├── DoubleThumbSliderDemo.xcworkspace ├── contents.xcworkspacedata ├── xcshareddata │ └── IDEWorkspaceChecks.plist └── xcuserdata │ └── shuang.xcuserdatad │ ├── UserInterfaceState.xcuserstate │ └── xcdebugger │ └── Breakpoints_v2.xcbkptlist ├── DoubleThumbSliderDemo ├── .DS_Store ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── slider_disable.imageset │ │ ├── Contents.json │ │ └── slider_disable@2x.png │ ├── slider_enable.imageset │ │ ├── Contents.json │ │ └── slider_enable@2x.png │ ├── slider_max.imageset │ │ ├── Contents.json │ │ └── slider_max@2x.png │ ├── slider_min.imageset │ │ ├── Contents.json │ │ └── slider_min@2x.png │ └── slider_thumb.imageset │ │ ├── Contents.json │ │ └── slider_thumb@2x.png ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── DTSliderView.h ├── DTSliderView.m ├── Info.plist ├── ViewController.h ├── ViewController.m └── main.m ├── LICENSE ├── Podfile ├── Podfile.lock ├── Pods ├── Headers │ ├── Private │ │ └── DTSlider │ │ │ ├── DTSlider+Private.h │ │ │ └── DTSlider.h │ └── Public │ │ └── DTSlider │ │ └── DTSlider.h ├── Local Podspecs │ ├── DTSlider.podspec.json │ └── DoubleThumbSlider.podspec.json ├── Manifest.lock ├── Pods.xcodeproj │ ├── project.pbxproj │ └── xcuserdata │ │ └── shuang.xcuserdatad │ │ └── xcschemes │ │ ├── DTSlider.xcscheme │ │ ├── Pods-DoubleThumbSliderDemo.xcscheme │ │ └── xcschememanagement.plist └── Target Support Files │ ├── DTSlider │ ├── DTSlider-dummy.m │ ├── DTSlider-prefix.pch │ └── DTSlider.xcconfig │ └── Pods-DoubleThumbSliderDemo │ ├── Pods-DoubleThumbSliderDemo-acknowledgements.markdown │ ├── Pods-DoubleThumbSliderDemo-acknowledgements.plist │ ├── Pods-DoubleThumbSliderDemo-dummy.m │ ├── Pods-DoubleThumbSliderDemo-frameworks.sh │ ├── Pods-DoubleThumbSliderDemo-resources.sh │ ├── Pods-DoubleThumbSliderDemo.debug.xcconfig │ └── Pods-DoubleThumbSliderDemo.release.xcconfig ├── README.md └── Slider.gif /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Magic-Unique/DoubleThumbSlider/46d40b819a61063f2cb88c3a79dd7fc6f15fee63/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .DS_Store 3 | .DS_Store 4 | -------------------------------------------------------------------------------- /DTSlider.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint DTSlider.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | 11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 12 | # 13 | # These will help people to find your library, and whilst it 14 | # can feel like a chore to fill in it's definitely to your advantage. The 15 | # summary should be tweet-length, and the description more in depth. 16 | # 17 | 18 | s.name = "DTSlider" 19 | s.version = "0.1.0" 20 | s.summary = "A Slider extends UISlider with double thumb controller." 21 | 22 | # This description is used to generate tags and improve search results. 23 | # * Think: What does it do? Why did you write it? What is the focus? 24 | # * Try to keep it short, snappy and to the point. 25 | # * Write the description between the DESC delimiters below. 26 | # * Finally, don't worry about the indent, CocoaPods strips it! 27 | s.description = <<-DESC 28 | You can use for a range, such as: age-range, distance-range... 29 | Use it as UISlider. Supporting custom image and setter with animation. 30 | DESC 31 | 32 | s.homepage = "https://github.com/Magic-Unique/DoubleThumbSlider" 33 | # s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" 34 | 35 | 36 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 37 | # 38 | # Licensing your code is important. See http://choosealicense.com for more info. 39 | # CocoaPods will detect a license file if there is a named LICENSE* 40 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. 41 | # 42 | 43 | s.license = "MIT" 44 | # s.license = { :type => "MIT", :file => "FILE_LICENSE" } 45 | 46 | 47 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 48 | # 49 | # Specify the authors of the library, with email addresses. Email addresses 50 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also 51 | # accepts just a name if you'd rather not provide an email address. 52 | # 53 | # Specify a social_media_url where others can refer to, for example a twitter 54 | # profile URL. 55 | # 56 | 57 | s.author = { "冷秋" => "516563564@qq.com" } 58 | # Or just: s.author = "" 59 | # s.authors = { "" => "" } 60 | # s.social_media_url = "http://twitter.com/" 61 | 62 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 63 | # 64 | # If this Pod runs only on iOS or OS X, then specify the platform and 65 | # the deployment target. You can optionally include the target after the platform. 66 | # 67 | 68 | # s.platform = :ios 69 | s.platform = :ios, "7.0" 70 | 71 | # When using multiple platforms 72 | # s.ios.deployment_target = "5.0" 73 | # s.osx.deployment_target = "10.7" 74 | # s.watchos.deployment_target = "2.0" 75 | # s.tvos.deployment_target = "9.0" 76 | 77 | 78 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 79 | # 80 | # Specify the location from where the source should be retrieved. 81 | # Supports git, hg, bzr, svn and HTTP. 82 | # 83 | 84 | s.source = { :git => "https://github.com/Magic-Unique/DoubleThumbSlider.git", :tag => "#{s.version}" } 85 | 86 | 87 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 88 | # 89 | # CocoaPods is smart about how it includes source code. For source files 90 | # giving a folder will include any swift, h, m, mm, c & cpp files. 91 | # For header files it will include any header in the folder. 92 | # Not including the public_header_files will make all headers public. 93 | # 94 | 95 | s.source_files = "DTSlider/**/*.{h,m}" 96 | #s.exclude_files = "Classes/Exclude" 97 | 98 | s.public_header_files = "DTSlider/DTSlider.h" 99 | 100 | 101 | # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 102 | # 103 | # A list of resources included with the Pod. These are copied into the 104 | # target bundle with a build phase script. Anything else will be cleaned. 105 | # You can preserve files from being cleaned, please don't preserve 106 | # non-essential files like tests, examples and documentation. 107 | # 108 | 109 | # s.resource = "icon.png" 110 | # s.resources = "Resources/*.png" 111 | 112 | # s.preserve_paths = "FilesToSave", "MoreFilesToSave" 113 | 114 | 115 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 116 | # 117 | # Link your library with frameworks, or libraries. Libraries do not include 118 | # the lib prefix of their name. 119 | # 120 | 121 | # s.framework = "SomeFramework" 122 | # s.frameworks = "SomeFramework", "AnotherFramework" 123 | 124 | # s.library = "iconv" 125 | # s.libraries = "iconv", "xml2" 126 | 127 | 128 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 129 | # 130 | # If your library depends on compiler flags you can set them in the xcconfig hash 131 | # where they will only apply to your library. If you depend on other Podspecs 132 | # you can include multiple dependencies to ensure it works. 133 | 134 | # s.requires_arc = true 135 | 136 | # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } 137 | # s.dependency "JSONKit", "~> 1.4" 138 | 139 | end 140 | -------------------------------------------------------------------------------- /DTSlider/DTSlider+Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTSlider+Private.h 3 | // DoubleThumbSliderDemo 4 | // 5 | // Created by Magic-Unique on 2018/7/1. 6 | // Copyright © 2018年 unique. All rights reserved. 7 | // 8 | 9 | #import "DTSlider.h" 10 | 11 | #define CFSTR__minTrackView DTStringFrom(@"`njoUsbdlWjfx") 12 | #define CFSTR__maxTrackView DTStringFrom(@"`nbyUsbdlWjfx") 13 | #define CFSTR__thumbView DTStringFrom(@"`uivncWjfx") 14 | #define CFSTR__thumbViewNeue DTStringFrom(@"`uivncWjfxOfvf") 15 | 16 | UIKIT_EXTERN UIImageView *DTCopyUIImageView(UIImageView *imageView); 17 | FOUNDATION_EXTERN NSString *DTStringFrom(NSString *input); 18 | 19 | @interface DTSlider (Private) 20 | 21 | @property (nonatomic, strong) UIImageView *_currentThumbView; 22 | 23 | @property (nonatomic, assign, readonly) BOOL _containsThumbImage; 24 | 25 | - (BOOL)_touch:(UITouch *)touch inThumb:(UIImageView *)thumb; 26 | 27 | - (CGRect)_thumbRectForValue:(float)value; 28 | 29 | @end 30 | 31 | #define DTSlider_maxTrackClipView(slider) (UISlider_maxTrackView(self).superview) 32 | 33 | #define UISlider_minTrackView(slider) (((UIImageView *(*)(UISlider *, SEL))objc_msgSend)(slider, NSSelectorFromString(CFSTR__minTrackView))) 34 | #define UISlider_maxTrackView(slider) (((UIImageView *(*)(UISlider *, SEL))objc_msgSend)(slider, NSSelectorFromString(CFSTR__maxTrackView))) 35 | 36 | //@interface UISlider (Private) 37 | // 38 | //@property (nonatomic, strong, readonly) UIImageView *_minTrackView; 39 | // 40 | //@property (nonatomic, strong, readonly) UIImageView *_maxTrackView; 41 | // 42 | //- (void)_layoutSubviewsForBoundsChange:(BOOL)boundsChange; 43 | // 44 | //@end 45 | -------------------------------------------------------------------------------- /DTSlider/DTSlider+Private.m: -------------------------------------------------------------------------------- 1 | // 2 | // DTSlider+Private.m 3 | // DoubleThumbSliderDemo 4 | // 5 | // Created by Magic-Unique on 2018/7/1. 6 | // Copyright © 2018年 unique. All rights reserved. 7 | // 8 | 9 | #import "DTSlider+Private.h" 10 | #import 11 | #import 12 | 13 | static NSMutableDictionary *DTStringCaches() { 14 | static NSMutableDictionary *caches = nil; 15 | static dispatch_once_t onceToken; 16 | dispatch_once(&onceToken, ^{ 17 | caches = [NSMutableDictionary dictionary]; 18 | }); 19 | return caches; 20 | } 21 | 22 | UIImageView *DTCopyUIImageView(UIImageView *imageView) { 23 | UIImageView *newImageView = [[UIImageView alloc] initWithImage:imageView.image]; 24 | newImageView.frame = imageView.frame; 25 | for (UIImageView *subView in imageView.subviews) { 26 | if ([subView isKindOfClass:[UIImageView class]]) { 27 | UIImageView *newSubView = DTCopyUIImageView(subView); 28 | [newImageView addSubview:newSubView]; 29 | } 30 | } 31 | return newImageView; 32 | } 33 | 34 | NSString *DTStringFrom(NSString *input) { 35 | NSMutableDictionary *caches = DTStringCaches(); 36 | if (caches[input]) { 37 | return caches[input]; 38 | } 39 | NSData *data = [input dataUsingEncoding:NSUTF8StringEncoding]; 40 | char *bytes = (char *)data.bytes; 41 | for (NSUInteger i = 0; i < data.length; i++) { 42 | bytes[i]--; 43 | } 44 | NSString *output = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; 45 | caches[input] = output; 46 | return output; 47 | } 48 | 49 | @implementation DTSlider (Private) 50 | 51 | - (BOOL)_containsThumbImage { 52 | return [self valueForKey:CFSTR__thumbView] != nil; 53 | } 54 | 55 | #pragma mark - Private method 56 | 57 | - (BOOL)_touch:(UITouch *)touch inThumb:(UIImageView *)thumb { 58 | if ([self _containsThumbImage]) { 59 | CGPoint location = [touch locationInView:self]; 60 | return CGRectContainsPoint(thumb.frame, location); 61 | } else { 62 | CGPoint location = [touch locationInView:thumb.subviews.firstObject]; 63 | return CGRectContainsPoint(thumb.subviews.firstObject.frame, location); 64 | } 65 | } 66 | 67 | - (CGRect)_thumbRectForValue:(float)value { 68 | return [self thumbRectForBounds:self.bounds trackRect:DTSlider_maxTrackClipView(self).frame value:value]; 69 | } 70 | 71 | #pragma mark - Property setter 72 | 73 | - (void)set_currentThumbView:(UIImageView *)_currentThumbView { 74 | if (_currentThumbView) { 75 | if ([self _containsThumbImage]) { 76 | [self setValue:_currentThumbView forKey:CFSTR__thumbView]; 77 | } else { 78 | [self setValue:_currentThumbView forKey:CFSTR__thumbViewNeue]; 79 | } 80 | [self bringSubviewToFront:_currentThumbView]; 81 | } 82 | } 83 | 84 | #pragma mark - Property getter 85 | 86 | - (UIImageView *)_currentThumbView { 87 | if ([self _containsThumbImage]) { 88 | return [super valueForKey:CFSTR__thumbView]; 89 | } else { 90 | return [super valueForKey:CFSTR__thumbViewNeue]; 91 | } 92 | } 93 | 94 | @end 95 | -------------------------------------------------------------------------------- /DTSlider/DTSlider.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTSlider.h 3 | // DoubleThumbSliderDemo 4 | // 5 | // Created by Magic-Unique on 2018/7/1. 6 | // Copyright © 2018年 unique. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DTSlider : UISlider 12 | 13 | /** Current max value */ 14 | @property (nonatomic, assign) float maxValue; 15 | 16 | /** Current min value */ 17 | @property (nonatomic, assign) float minValue; 18 | 19 | - (void)setMaxValue:(float)maxValue animated:(BOOL)animated; 20 | - (void)setMinValue:(float)minValue animated:(BOOL)animated; 21 | - (void)setMinValue:(float)minValue maxValue:(float)maxValue animated:(BOOL)animated; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /DTSlider/DTSlider.m: -------------------------------------------------------------------------------- 1 | // 2 | // DTSlider.m 3 | // DoubleThumbSliderDemo 4 | // 5 | // Created by Magic-Unique on 2018/7/1. 6 | // Copyright © 2018年 unique. All rights reserved. 7 | // 8 | 9 | #import "DTSlider.h" 10 | #import "DTSlider+Private.h" 11 | #import 12 | #import 13 | 14 | @interface DTSlider () 15 | { 16 | __weak UIImageView *_oldThumbView;// 系统创建的ThumbView 17 | __strong UIImageView *_newThumbView;// 自己创建的ThumbView 18 | __weak UIImageView *_minThumbView;// 左边的ThumbView,重合时候可能会和_maxThumbView互换 19 | __weak UIImageView *_maxThumbView;// 右边的ThumbView,重合时候可能会和_minThumbView互换 20 | 21 | /* 22 | * 以下为重合标记,如果最大值==最小值,touchesBegan 会设置bool为yes,并获取对应的值 23 | * 重合标记会被 touchesMove 激活一次,并关掉重合标记防止下一次 touchesMove 重复激活。 24 | */ 25 | 26 | BOOL coincide; 27 | float coincideValue; 28 | 29 | BOOL _animating; 30 | } 31 | 32 | @end 33 | 34 | @implementation DTSlider 35 | 36 | - (instancetype)init { 37 | self = [super init]; 38 | if (self) { 39 | _minValue = 0; 40 | _maxValue = 1; 41 | } 42 | return self; 43 | } 44 | 45 | - (instancetype)initWithFrame:(CGRect)frame { 46 | self = [super initWithFrame:frame]; 47 | if (self) { 48 | _minValue = 0; 49 | _maxValue = 1; 50 | } 51 | return self; 52 | } 53 | 54 | #pragma mark - View 55 | 56 | - (void)_layoutSubviewsForBoundsChange:(BOOL)boundsChange { 57 | ((void (*)(struct objc_super *, SEL, BOOL))objc_msgSendSuper)(&(struct objc_super){self, [UISlider class]}, _cmd, boundsChange); 58 | CGRect frame = CGRectZero; 59 | 60 | if (!_oldThumbView) { 61 | [_newThumbView removeFromSuperview]; 62 | // 通过KVC获取系统创建的ThumbView保存到_oldThumbView,并复制一份保存到_newThumbView。 63 | // 这一部分的代码只会执行一次。 64 | _oldThumbView = self._currentThumbView; 65 | UIImageView *newImageView = DTCopyUIImageView(_oldThumbView); 66 | [self addSubview:newImageView]; 67 | _newThumbView = newImageView; 68 | _minThumbView = _oldThumbView; 69 | _maxThumbView = _newThumbView; 70 | } 71 | 72 | CGRect progress = ({ 73 | CGRect frame = CGRectZero; 74 | CGRect min = UISlider_minTrackView(self).frame; 75 | CGRect max = DTSlider_maxTrackClipView(self).frame; 76 | frame.origin.x = min.origin.x; 77 | frame.origin.y = MIN(min.origin.y, max.origin.y); 78 | frame.size.width = CGRectGetMaxX(max) - frame.origin.x; 79 | frame.size.height = MAX(CGRectGetMaxY(min), CGRectGetMaxY(max)) - frame.origin.y; 80 | frame; 81 | }); 82 | 83 | // 设置两个ThumbView之外的无效值横线 84 | frame = DTSlider_maxTrackClipView(self).frame; 85 | frame.origin.x = progress.origin.x; 86 | frame.size.width = progress.size.width - 4; 87 | DTSlider_maxTrackClipView(self).frame = frame; 88 | UISlider_maxTrackView(self).frame = DTSlider_maxTrackClipView(self).bounds; 89 | 90 | // frame = _minThumbView.frame; 91 | // frame.origin.x = (progress.size.width - frame.size.width) * (self.minValue / (self.maximumValue-self.minimumValue)); 92 | // frame.origin.x += progress.origin.x; 93 | frame = [self _thumbRectForValue:_minValue]; 94 | // NSLog(@"Min %f => %@", _minValue, NSStringFromCGRect(frame)); 95 | _minThumbView.frame = frame; 96 | 97 | // frame = _maxThumbView.frame; 98 | // frame.origin.x = (progress.size.width - frame.size.width) * (self.maxValue / (self.maximumValue-self.minimumValue)); 99 | // frame.origin.x += progress.origin.x; 100 | frame = [self _thumbRectForValue:_maxValue]; 101 | _maxThumbView.frame = frame; 102 | 103 | // 设置两个ThumbView之间的有效值横线 104 | UIView *minTrackView = UISlider_minTrackView(self); 105 | frame = minTrackView.frame; 106 | frame.size.width = _maxThumbView.center.x - _minThumbView.center.x; 107 | frame.origin.x = _minThumbView.center.x; 108 | minTrackView.frame = frame; 109 | } 110 | 111 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { 112 | // 由于有两个ThumbView,通过touch位置获取用户触摸的ThumbView,并设置为thumbViewNeue。 113 | UIImageView *touchImageView = [self imageViewForTouch:touches.anyObject]; 114 | if (touchImageView) { 115 | self._currentThumbView = touchImageView; 116 | if (_maxValue == _minValue) { 117 | // 如果此时两个ThumbView重合,打开重合标记,告诉下一次touchesMove方法(无方向限制,可能调换两个ThumbView的位置) 118 | coincide = YES; 119 | coincideValue = _maxValue;// or _minValue; 120 | } 121 | } 122 | [super touchesBegan:touches withEvent:event]; 123 | } 124 | 125 | - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { 126 | [super touchesMoved:touches withEvent:event]; 127 | // NSLog(@"%f", self.value); 128 | if (coincide) { 129 | /* 130 | 重合标记打开后,第一次移动范围必须要大于一定的值。 131 | 这个设定是为了提高用户体验 132 | 因为在重合时候,如果上面的ThumbView是右边的ThumbView,此时用户想往左滑动,滑块会细微地往右边滑动。这一细微的移动也会激活重合标记,导致滑块因逻辑不能向左边移动。另一个方向情况同理。 133 | 通过dd值的设定,可以防止这个细微的滑动激活这个标记,保证滑动是用户的操作。 134 | */ 135 | float dd = self.value - coincideValue; 136 | dd = dd > 0 ? dd : (-dd); 137 | if (dd > 0.025) { 138 | 139 | // 不正常移动,因为touchesBegan打开了重合标记 140 | if (self.value < coincideValue) { 141 | // 用户往左滑动,下同 142 | _minValue = self.value; 143 | // 保证用户滑动的是左边的滑块,如果不是,则交换,下同 144 | if (self._currentThumbView != _minThumbView) { 145 | [self exchangeMaxAndMinThumb]; 146 | } 147 | } else if (self.value > coincideValue) { 148 | _maxValue = self.value; 149 | if (self._currentThumbView != _maxThumbView) { 150 | [self exchangeMaxAndMinThumb]; 151 | } 152 | } 153 | coincide = NO;//立马关闭重合标记,防止下一次touchesMove进入 154 | } 155 | /* 156 | else { 157 | 是轻微移动,什么都不做 158 | } 159 | */ 160 | 161 | } else { 162 | // 正常移动,判断用户移动的是右边ThumbView还是左边ThumbView 163 | if (self._currentThumbView == _minThumbView) { 164 | _minValue = self.value; 165 | // 最小值不能大于最大值,下同 166 | if (_minValue > _maxValue) { 167 | _minValue = _maxValue; 168 | // self.value = _minValue; 169 | } 170 | } else if (self._currentThumbView == _maxThumbView) { 171 | _maxValue = self.value; 172 | if (_maxValue < _minValue) { 173 | _maxValue = _minValue; 174 | // self.value = _maxValue; 175 | } 176 | } 177 | } 178 | } 179 | 180 | #pragma mark - Property setter 181 | 182 | - (void)setMaxValue:(float)maxValue animated:(BOOL)animated { 183 | if (_maxValue == maxValue) { 184 | return; 185 | } 186 | _maxValue = maxValue; 187 | self._currentThumbView = _maxThumbView; 188 | if (animated) { 189 | [UIView animateWithDuration:0.3 190 | delay:0 options:UIViewAnimationOptionCurveEaseOut 191 | animations:^{ 192 | [self setValue:maxValue animated:YES]; 193 | } completion:nil]; 194 | } else { 195 | [self setValue:maxValue]; 196 | } 197 | } 198 | 199 | - (void)setMinValue:(float)minValue animated:(BOOL)animated { 200 | if (_minValue == minValue) { 201 | return; 202 | } 203 | _minValue = minValue; 204 | self._currentThumbView = _minThumbView; 205 | if (animated) { 206 | [UIView animateWithDuration:0.3 207 | delay:0 options:UIViewAnimationOptionCurveEaseOut 208 | animations:^{ 209 | [self setValue:minValue animated:YES]; 210 | } completion:nil]; 211 | } else { 212 | [self setValue:minValue]; 213 | } 214 | } 215 | 216 | - (void)setMinValue:(float)minValue maxValue:(float)maxValue animated:(BOOL)animated { 217 | if (_minValue == minValue && _maxValue == maxValue) { 218 | return; 219 | } 220 | _minValue = minValue; 221 | _maxValue = maxValue; 222 | if (animated) { 223 | [UIView animateWithDuration:0.3 224 | delay:0 options:UIViewAnimationOptionCurveEaseOut 225 | animations:^{ 226 | [self setValue:minValue animated:YES]; 227 | [self setValue:maxValue animated:YES]; 228 | } completion:nil]; 229 | } else { 230 | [self setValue:minValue]; 231 | [self setValue:maxValue]; 232 | } 233 | } 234 | 235 | - (void)setMaxValue:(float)maxValue { 236 | [self setMaxValue:maxValue animated:NO]; 237 | } 238 | 239 | - (void)setMinValue:(float)minValue { 240 | [self setMinValue:minValue animated:NO]; 241 | } 242 | 243 | #pragma mark - Private method 244 | 245 | /** 246 | * 通过touch获取对应的ThumbView 247 | * 248 | * @param touch UITouch 249 | * 250 | * @return UIImageView 251 | */ 252 | - (UIImageView *)imageViewForTouch:(UITouch *)touch { 253 | NSUInteger indexOfNewThumbView = [self.subviews indexOfObject:_newThumbView]; 254 | NSUInteger indexOfOldThumbView = [self.subviews indexOfObject:_oldThumbView]; 255 | if (indexOfNewThumbView > indexOfOldThumbView) { 256 | if ([self _touch:touch inThumb:_newThumbView]) { 257 | return _newThumbView; 258 | } 259 | if ([self _touch:touch inThumb:_oldThumbView]) { 260 | return _oldThumbView; 261 | } 262 | } else { 263 | if ([self _touch:touch inThumb:_oldThumbView]) { 264 | return _oldThumbView; 265 | } 266 | if ([self _touch:touch inThumb:_newThumbView]) { 267 | return _newThumbView; 268 | } 269 | } 270 | return nil; 271 | } 272 | 273 | /** 274 | * 交换左右滑块 275 | */ 276 | - (void)exchangeMaxAndMinThumb { 277 | id temp = _minThumbView; 278 | _minThumbView = _maxThumbView; 279 | _maxThumbView = temp; 280 | } 281 | 282 | @end 283 | -------------------------------------------------------------------------------- /DoubleThumbSliderDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 369843368F2E922861F024D6 /* libPods-DoubleThumbSliderDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C2D6D354A1365311843519A0 /* libPods-DoubleThumbSliderDemo.a */; }; 11 | 6DD59D3620E9273A00D86DEA /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DD59D3520E9273A00D86DEA /* AppDelegate.m */; }; 12 | 6DD59D3920E9273A00D86DEA /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DD59D3820E9273A00D86DEA /* ViewController.m */; }; 13 | 6DD59D3C20E9273A00D86DEA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6DD59D3A20E9273A00D86DEA /* Main.storyboard */; }; 14 | 6DD59D3E20E9273A00D86DEA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6DD59D3D20E9273A00D86DEA /* Assets.xcassets */; }; 15 | 6DD59D4120E9273A00D86DEA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6DD59D3F20E9273A00D86DEA /* LaunchScreen.storyboard */; }; 16 | 6DD59D4420E9273A00D86DEA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DD59D4320E9273A00D86DEA /* main.m */; }; 17 | 7EDA65CE20E9FD270038D41E /* DTSliderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7EDA65CD20E9FD270038D41E /* DTSliderView.m */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXFileReference section */ 21 | 6DD59D3120E9273A00D86DEA /* DoubleThumbSliderDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DoubleThumbSliderDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | 6DD59D3420E9273A00D86DEA /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 23 | 6DD59D3520E9273A00D86DEA /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 24 | 6DD59D3720E9273A00D86DEA /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 25 | 6DD59D3820E9273A00D86DEA /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 26 | 6DD59D3B20E9273A00D86DEA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 27 | 6DD59D3D20E9273A00D86DEA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 28 | 6DD59D4020E9273A00D86DEA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 29 | 6DD59D4220E9273A00D86DEA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 30 | 6DD59D4320E9273A00D86DEA /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 31 | 7EDA65CC20E9FD270038D41E /* DTSliderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DTSliderView.h; sourceTree = ""; }; 32 | 7EDA65CD20E9FD270038D41E /* DTSliderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DTSliderView.m; sourceTree = ""; }; 33 | B3F4105B16B1E7D20BB95447 /* Pods-DoubleThumbSliderDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DoubleThumbSliderDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-DoubleThumbSliderDemo/Pods-DoubleThumbSliderDemo.release.xcconfig"; sourceTree = ""; }; 34 | B5E16550DFB5A3F511E9A8E5 /* Pods-DoubleThumbSliderDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DoubleThumbSliderDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-DoubleThumbSliderDemo/Pods-DoubleThumbSliderDemo.debug.xcconfig"; sourceTree = ""; }; 35 | C2D6D354A1365311843519A0 /* libPods-DoubleThumbSliderDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-DoubleThumbSliderDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 36 | /* End PBXFileReference section */ 37 | 38 | /* Begin PBXFrameworksBuildPhase section */ 39 | 6DD59D2E20E9273A00D86DEA /* Frameworks */ = { 40 | isa = PBXFrameworksBuildPhase; 41 | buildActionMask = 2147483647; 42 | files = ( 43 | 369843368F2E922861F024D6 /* libPods-DoubleThumbSliderDemo.a in Frameworks */, 44 | ); 45 | runOnlyForDeploymentPostprocessing = 0; 46 | }; 47 | /* End PBXFrameworksBuildPhase section */ 48 | 49 | /* Begin PBXGroup section */ 50 | 4AC4D8476545B4240534A079 /* Pods */ = { 51 | isa = PBXGroup; 52 | children = ( 53 | B5E16550DFB5A3F511E9A8E5 /* Pods-DoubleThumbSliderDemo.debug.xcconfig */, 54 | B3F4105B16B1E7D20BB95447 /* Pods-DoubleThumbSliderDemo.release.xcconfig */, 55 | ); 56 | name = Pods; 57 | sourceTree = ""; 58 | }; 59 | 4F8655199B12F9B7FFCEF291 /* Frameworks */ = { 60 | isa = PBXGroup; 61 | children = ( 62 | C2D6D354A1365311843519A0 /* libPods-DoubleThumbSliderDemo.a */, 63 | ); 64 | name = Frameworks; 65 | sourceTree = ""; 66 | }; 67 | 6DD59D2820E9273A00D86DEA = { 68 | isa = PBXGroup; 69 | children = ( 70 | 6DD59D3320E9273A00D86DEA /* DoubleThumbSliderDemo */, 71 | 6DD59D3220E9273A00D86DEA /* Products */, 72 | 4AC4D8476545B4240534A079 /* Pods */, 73 | 4F8655199B12F9B7FFCEF291 /* Frameworks */, 74 | ); 75 | sourceTree = ""; 76 | }; 77 | 6DD59D3220E9273A00D86DEA /* Products */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | 6DD59D3120E9273A00D86DEA /* DoubleThumbSliderDemo.app */, 81 | ); 82 | name = Products; 83 | sourceTree = ""; 84 | }; 85 | 6DD59D3320E9273A00D86DEA /* DoubleThumbSliderDemo */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | 6DD59D3420E9273A00D86DEA /* AppDelegate.h */, 89 | 6DD59D3520E9273A00D86DEA /* AppDelegate.m */, 90 | 6DD59D3720E9273A00D86DEA /* ViewController.h */, 91 | 6DD59D3820E9273A00D86DEA /* ViewController.m */, 92 | 7EDA65CC20E9FD270038D41E /* DTSliderView.h */, 93 | 7EDA65CD20E9FD270038D41E /* DTSliderView.m */, 94 | 6DD59D3A20E9273A00D86DEA /* Main.storyboard */, 95 | 6DD59D3D20E9273A00D86DEA /* Assets.xcassets */, 96 | 6DD59D3F20E9273A00D86DEA /* LaunchScreen.storyboard */, 97 | 6DD59D4220E9273A00D86DEA /* Info.plist */, 98 | 6DD59D4320E9273A00D86DEA /* main.m */, 99 | ); 100 | path = DoubleThumbSliderDemo; 101 | sourceTree = ""; 102 | }; 103 | /* End PBXGroup section */ 104 | 105 | /* Begin PBXNativeTarget section */ 106 | 6DD59D3020E9273A00D86DEA /* DoubleThumbSliderDemo */ = { 107 | isa = PBXNativeTarget; 108 | buildConfigurationList = 6DD59D4720E9273A00D86DEA /* Build configuration list for PBXNativeTarget "DoubleThumbSliderDemo" */; 109 | buildPhases = ( 110 | C92077605E41DAE30F6E1134 /* [CP] Check Pods Manifest.lock */, 111 | 6DD59D2D20E9273A00D86DEA /* Sources */, 112 | 6DD59D2E20E9273A00D86DEA /* Frameworks */, 113 | 6DD59D2F20E9273A00D86DEA /* Resources */, 114 | ); 115 | buildRules = ( 116 | ); 117 | dependencies = ( 118 | ); 119 | name = DoubleThumbSliderDemo; 120 | productName = DoubleThumbSliderDemo; 121 | productReference = 6DD59D3120E9273A00D86DEA /* DoubleThumbSliderDemo.app */; 122 | productType = "com.apple.product-type.application"; 123 | }; 124 | /* End PBXNativeTarget section */ 125 | 126 | /* Begin PBXProject section */ 127 | 6DD59D2920E9273A00D86DEA /* Project object */ = { 128 | isa = PBXProject; 129 | attributes = { 130 | LastUpgradeCheck = 0920; 131 | ORGANIZATIONNAME = unique; 132 | TargetAttributes = { 133 | 6DD59D3020E9273A00D86DEA = { 134 | CreatedOnToolsVersion = 9.2; 135 | ProvisioningStyle = Manual; 136 | }; 137 | }; 138 | }; 139 | buildConfigurationList = 6DD59D2C20E9273A00D86DEA /* Build configuration list for PBXProject "DoubleThumbSliderDemo" */; 140 | compatibilityVersion = "Xcode 8.0"; 141 | developmentRegion = en; 142 | hasScannedForEncodings = 0; 143 | knownRegions = ( 144 | en, 145 | Base, 146 | ); 147 | mainGroup = 6DD59D2820E9273A00D86DEA; 148 | productRefGroup = 6DD59D3220E9273A00D86DEA /* Products */; 149 | projectDirPath = ""; 150 | projectRoot = ""; 151 | targets = ( 152 | 6DD59D3020E9273A00D86DEA /* DoubleThumbSliderDemo */, 153 | ); 154 | }; 155 | /* End PBXProject section */ 156 | 157 | /* Begin PBXResourcesBuildPhase section */ 158 | 6DD59D2F20E9273A00D86DEA /* Resources */ = { 159 | isa = PBXResourcesBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | 6DD59D4120E9273A00D86DEA /* LaunchScreen.storyboard in Resources */, 163 | 6DD59D3E20E9273A00D86DEA /* Assets.xcassets in Resources */, 164 | 6DD59D3C20E9273A00D86DEA /* Main.storyboard in Resources */, 165 | ); 166 | runOnlyForDeploymentPostprocessing = 0; 167 | }; 168 | /* End PBXResourcesBuildPhase section */ 169 | 170 | /* Begin PBXShellScriptBuildPhase section */ 171 | C92077605E41DAE30F6E1134 /* [CP] Check Pods Manifest.lock */ = { 172 | isa = PBXShellScriptBuildPhase; 173 | buildActionMask = 2147483647; 174 | files = ( 175 | ); 176 | inputPaths = ( 177 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 178 | "${PODS_ROOT}/Manifest.lock", 179 | ); 180 | name = "[CP] Check Pods Manifest.lock"; 181 | outputPaths = ( 182 | "$(DERIVED_FILE_DIR)/Pods-DoubleThumbSliderDemo-checkManifestLockResult.txt", 183 | ); 184 | runOnlyForDeploymentPostprocessing = 0; 185 | shellPath = /bin/sh; 186 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 187 | showEnvVarsInLog = 0; 188 | }; 189 | /* End PBXShellScriptBuildPhase section */ 190 | 191 | /* Begin PBXSourcesBuildPhase section */ 192 | 6DD59D2D20E9273A00D86DEA /* Sources */ = { 193 | isa = PBXSourcesBuildPhase; 194 | buildActionMask = 2147483647; 195 | files = ( 196 | 6DD59D3920E9273A00D86DEA /* ViewController.m in Sources */, 197 | 6DD59D4420E9273A00D86DEA /* main.m in Sources */, 198 | 6DD59D3620E9273A00D86DEA /* AppDelegate.m in Sources */, 199 | 7EDA65CE20E9FD270038D41E /* DTSliderView.m in Sources */, 200 | ); 201 | runOnlyForDeploymentPostprocessing = 0; 202 | }; 203 | /* End PBXSourcesBuildPhase section */ 204 | 205 | /* Begin PBXVariantGroup section */ 206 | 6DD59D3A20E9273A00D86DEA /* Main.storyboard */ = { 207 | isa = PBXVariantGroup; 208 | children = ( 209 | 6DD59D3B20E9273A00D86DEA /* Base */, 210 | ); 211 | name = Main.storyboard; 212 | sourceTree = ""; 213 | }; 214 | 6DD59D3F20E9273A00D86DEA /* LaunchScreen.storyboard */ = { 215 | isa = PBXVariantGroup; 216 | children = ( 217 | 6DD59D4020E9273A00D86DEA /* Base */, 218 | ); 219 | name = LaunchScreen.storyboard; 220 | sourceTree = ""; 221 | }; 222 | /* End PBXVariantGroup section */ 223 | 224 | /* Begin XCBuildConfiguration section */ 225 | 6DD59D4520E9273A00D86DEA /* Debug */ = { 226 | isa = XCBuildConfiguration; 227 | buildSettings = { 228 | ALWAYS_SEARCH_USER_PATHS = NO; 229 | CLANG_ANALYZER_NONNULL = YES; 230 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 231 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 232 | CLANG_CXX_LIBRARY = "libc++"; 233 | CLANG_ENABLE_MODULES = YES; 234 | CLANG_ENABLE_OBJC_ARC = YES; 235 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 236 | CLANG_WARN_BOOL_CONVERSION = YES; 237 | CLANG_WARN_COMMA = YES; 238 | CLANG_WARN_CONSTANT_CONVERSION = YES; 239 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 240 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 241 | CLANG_WARN_EMPTY_BODY = YES; 242 | CLANG_WARN_ENUM_CONVERSION = YES; 243 | CLANG_WARN_INFINITE_RECURSION = YES; 244 | CLANG_WARN_INT_CONVERSION = YES; 245 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 246 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 247 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 248 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 249 | CLANG_WARN_STRICT_PROTOTYPES = YES; 250 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 251 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 252 | CLANG_WARN_UNREACHABLE_CODE = YES; 253 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 254 | CODE_SIGN_IDENTITY = "iPhone Developer"; 255 | COPY_PHASE_STRIP = NO; 256 | DEBUG_INFORMATION_FORMAT = dwarf; 257 | ENABLE_STRICT_OBJC_MSGSEND = YES; 258 | ENABLE_TESTABILITY = YES; 259 | GCC_C_LANGUAGE_STANDARD = gnu11; 260 | GCC_DYNAMIC_NO_PIC = NO; 261 | GCC_NO_COMMON_BLOCKS = YES; 262 | GCC_OPTIMIZATION_LEVEL = 0; 263 | GCC_PREPROCESSOR_DEFINITIONS = ( 264 | "DEBUG=1", 265 | "$(inherited)", 266 | ); 267 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 268 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 269 | GCC_WARN_UNDECLARED_SELECTOR = YES; 270 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 271 | GCC_WARN_UNUSED_FUNCTION = YES; 272 | GCC_WARN_UNUSED_VARIABLE = YES; 273 | IPHONEOS_DEPLOYMENT_TARGET = 11.2; 274 | MTL_ENABLE_DEBUG_INFO = YES; 275 | ONLY_ACTIVE_ARCH = YES; 276 | SDKROOT = iphoneos; 277 | }; 278 | name = Debug; 279 | }; 280 | 6DD59D4620E9273A00D86DEA /* Release */ = { 281 | isa = XCBuildConfiguration; 282 | buildSettings = { 283 | ALWAYS_SEARCH_USER_PATHS = NO; 284 | CLANG_ANALYZER_NONNULL = YES; 285 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 286 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 287 | CLANG_CXX_LIBRARY = "libc++"; 288 | CLANG_ENABLE_MODULES = YES; 289 | CLANG_ENABLE_OBJC_ARC = YES; 290 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 291 | CLANG_WARN_BOOL_CONVERSION = YES; 292 | CLANG_WARN_COMMA = YES; 293 | CLANG_WARN_CONSTANT_CONVERSION = YES; 294 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 295 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 296 | CLANG_WARN_EMPTY_BODY = YES; 297 | CLANG_WARN_ENUM_CONVERSION = YES; 298 | CLANG_WARN_INFINITE_RECURSION = YES; 299 | CLANG_WARN_INT_CONVERSION = YES; 300 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 301 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 302 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 303 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 304 | CLANG_WARN_STRICT_PROTOTYPES = YES; 305 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 306 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 307 | CLANG_WARN_UNREACHABLE_CODE = YES; 308 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 309 | CODE_SIGN_IDENTITY = "iPhone Developer"; 310 | COPY_PHASE_STRIP = NO; 311 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 312 | ENABLE_NS_ASSERTIONS = NO; 313 | ENABLE_STRICT_OBJC_MSGSEND = YES; 314 | GCC_C_LANGUAGE_STANDARD = gnu11; 315 | GCC_NO_COMMON_BLOCKS = YES; 316 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 317 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 318 | GCC_WARN_UNDECLARED_SELECTOR = YES; 319 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 320 | GCC_WARN_UNUSED_FUNCTION = YES; 321 | GCC_WARN_UNUSED_VARIABLE = YES; 322 | IPHONEOS_DEPLOYMENT_TARGET = 11.2; 323 | MTL_ENABLE_DEBUG_INFO = NO; 324 | SDKROOT = iphoneos; 325 | VALIDATE_PRODUCT = YES; 326 | }; 327 | name = Release; 328 | }; 329 | 6DD59D4820E9273A00D86DEA /* Debug */ = { 330 | isa = XCBuildConfiguration; 331 | baseConfigurationReference = B5E16550DFB5A3F511E9A8E5 /* Pods-DoubleThumbSliderDemo.debug.xcconfig */; 332 | buildSettings = { 333 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 334 | CODE_SIGN_STYLE = Manual; 335 | DEVELOPMENT_TEAM = PWT4GSV7T6; 336 | INFOPLIST_FILE = DoubleThumbSliderDemo/Info.plist; 337 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 338 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 339 | PRODUCT_BUNDLE_IDENTIFIER = com.unique.DoubleThumbSliderDemo; 340 | PRODUCT_NAME = "$(TARGET_NAME)"; 341 | PROVISIONING_PROFILE = "845ba7ef-c477-487f-bd65-73f7768dcead"; 342 | PROVISIONING_PROFILE_SPECIFIER = Development; 343 | TARGETED_DEVICE_FAMILY = "1,2"; 344 | }; 345 | name = Debug; 346 | }; 347 | 6DD59D4920E9273A00D86DEA /* Release */ = { 348 | isa = XCBuildConfiguration; 349 | baseConfigurationReference = B3F4105B16B1E7D20BB95447 /* Pods-DoubleThumbSliderDemo.release.xcconfig */; 350 | buildSettings = { 351 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 352 | CODE_SIGN_STYLE = Manual; 353 | DEVELOPMENT_TEAM = ""; 354 | INFOPLIST_FILE = DoubleThumbSliderDemo/Info.plist; 355 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 356 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 357 | PRODUCT_BUNDLE_IDENTIFIER = com.unique.DoubleThumbSliderDemo; 358 | PRODUCT_NAME = "$(TARGET_NAME)"; 359 | PROVISIONING_PROFILE_SPECIFIER = ""; 360 | TARGETED_DEVICE_FAMILY = "1,2"; 361 | }; 362 | name = Release; 363 | }; 364 | /* End XCBuildConfiguration section */ 365 | 366 | /* Begin XCConfigurationList section */ 367 | 6DD59D2C20E9273A00D86DEA /* Build configuration list for PBXProject "DoubleThumbSliderDemo" */ = { 368 | isa = XCConfigurationList; 369 | buildConfigurations = ( 370 | 6DD59D4520E9273A00D86DEA /* Debug */, 371 | 6DD59D4620E9273A00D86DEA /* Release */, 372 | ); 373 | defaultConfigurationIsVisible = 0; 374 | defaultConfigurationName = Release; 375 | }; 376 | 6DD59D4720E9273A00D86DEA /* Build configuration list for PBXNativeTarget "DoubleThumbSliderDemo" */ = { 377 | isa = XCConfigurationList; 378 | buildConfigurations = ( 379 | 6DD59D4820E9273A00D86DEA /* Debug */, 380 | 6DD59D4920E9273A00D86DEA /* Release */, 381 | ); 382 | defaultConfigurationIsVisible = 0; 383 | defaultConfigurationName = Release; 384 | }; 385 | /* End XCConfigurationList section */ 386 | }; 387 | rootObject = 6DD59D2920E9273A00D86DEA /* Project object */; 388 | } 389 | -------------------------------------------------------------------------------- /DoubleThumbSliderDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /DoubleThumbSliderDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /DoubleThumbSliderDemo.xcodeproj/project.xcworkspace/xcuserdata/shuang.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Magic-Unique/DoubleThumbSlider/46d40b819a61063f2cb88c3a79dd7fc6f15fee63/DoubleThumbSliderDemo.xcodeproj/project.xcworkspace/xcuserdata/shuang.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /DoubleThumbSliderDemo.xcodeproj/project.xcworkspace/xcuserdata/wushuang.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Magic-Unique/DoubleThumbSlider/46d40b819a61063f2cb88c3a79dd7fc6f15fee63/DoubleThumbSliderDemo.xcodeproj/project.xcworkspace/xcuserdata/wushuang.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /DoubleThumbSliderDemo.xcodeproj/xcuserdata/shuang.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | DoubleThumbSliderDemo.xcscheme 8 | 9 | orderHint 10 | 2 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /DoubleThumbSliderDemo.xcodeproj/xcuserdata/wushuang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /DoubleThumbSliderDemo.xcodeproj/xcuserdata/wushuang.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | DoubleThumbSliderDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /DoubleThumbSliderDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /DoubleThumbSliderDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /DoubleThumbSliderDemo.xcworkspace/xcuserdata/shuang.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Magic-Unique/DoubleThumbSlider/46d40b819a61063f2cb88c3a79dd7fc6f15fee63/DoubleThumbSliderDemo.xcworkspace/xcuserdata/shuang.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /DoubleThumbSliderDemo.xcworkspace/xcuserdata/shuang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Magic-Unique/DoubleThumbSlider/46d40b819a61063f2cb88c3a79dd7fc6f15fee63/DoubleThumbSliderDemo/.DS_Store -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // DoubleThumbSliderDemo 4 | // 5 | // Created by Magic-Unique on 2018/7/1. 6 | // Copyright © 2018年 unique. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // DoubleThumbSliderDemo 4 | // 5 | // Created by Magic-Unique on 2018/7/1. 6 | // Copyright © 2018年 unique. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "size" : "1024x1024", 46 | "scale" : "1x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/Assets.xcassets/slider_disable.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "resizing" : { 9 | "mode" : "3-part-horizontal", 10 | "center" : { 11 | "mode" : "tile", 12 | "width" : 1 13 | }, 14 | "cap-insets" : { 15 | "right" : 26, 16 | "left" : 26 17 | } 18 | }, 19 | "idiom" : "universal", 20 | "filename" : "slider_disable@2x.png", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "universal", 25 | "scale" : "3x" 26 | } 27 | ], 28 | "info" : { 29 | "version" : 1, 30 | "author" : "xcode" 31 | } 32 | } -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/Assets.xcassets/slider_disable.imageset/slider_disable@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Magic-Unique/DoubleThumbSlider/46d40b819a61063f2cb88c3a79dd7fc6f15fee63/DoubleThumbSliderDemo/Assets.xcassets/slider_disable.imageset/slider_disable@2x.png -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/Assets.xcassets/slider_enable.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "resizing" : { 9 | "mode" : "3-part-horizontal", 10 | "center" : { 11 | "mode" : "tile", 12 | "width" : 1 13 | }, 14 | "cap-insets" : { 15 | "right" : 26, 16 | "left" : 26 17 | } 18 | }, 19 | "idiom" : "universal", 20 | "filename" : "slider_enable@2x.png", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "universal", 25 | "scale" : "3x" 26 | } 27 | ], 28 | "info" : { 29 | "version" : 1, 30 | "author" : "xcode" 31 | } 32 | } -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/Assets.xcassets/slider_enable.imageset/slider_enable@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Magic-Unique/DoubleThumbSlider/46d40b819a61063f2cb88c3a79dd7fc6f15fee63/DoubleThumbSliderDemo/Assets.xcassets/slider_enable.imageset/slider_enable@2x.png -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/Assets.xcassets/slider_max.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "slider_max@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/Assets.xcassets/slider_max.imageset/slider_max@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Magic-Unique/DoubleThumbSlider/46d40b819a61063f2cb88c3a79dd7fc6f15fee63/DoubleThumbSliderDemo/Assets.xcassets/slider_max.imageset/slider_max@2x.png -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/Assets.xcassets/slider_min.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "slider_min@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/Assets.xcassets/slider_min.imageset/slider_min@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Magic-Unique/DoubleThumbSlider/46d40b819a61063f2cb88c3a79dd7fc6f15fee63/DoubleThumbSliderDemo/Assets.xcassets/slider_min.imageset/slider_min@2x.png -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/Assets.xcassets/slider_thumb.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "slider_thumb@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/Assets.xcassets/slider_thumb.imageset/slider_thumb@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Magic-Unique/DoubleThumbSlider/46d40b819a61063f2cb88c3a79dd7fc6f15fee63/DoubleThumbSliderDemo/Assets.xcassets/slider_thumb.imageset/slider_thumb@2x.png -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/DTSliderView.h: -------------------------------------------------------------------------------- 1 | // 2 | // DTSliderView.h 3 | // DoubleThumbSliderDemo 4 | // 5 | // Created by 吴双 on 2018/7/2. 6 | // Copyright © 2018年 unique. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface DTSliderView : UIView 13 | 14 | @property (nonatomic, strong, readonly) DTSlider *slider; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/DTSliderView.m: -------------------------------------------------------------------------------- 1 | // 2 | // DTSliderView.m 3 | // DoubleThumbSliderDemo 4 | // 5 | // Created by 吴双 on 2018/7/2. 6 | // Copyright © 2018年 unique. All rights reserved. 7 | // 8 | 9 | #import "DTSliderView.h" 10 | 11 | @interface DTSliderView () 12 | 13 | @property (nonatomic, strong, readonly) UILabel *minValueLabel; 14 | 15 | @property (nonatomic, strong, readonly) UILabel *maxValueLabel; 16 | 17 | @end 18 | 19 | @implementation DTSliderView 20 | 21 | + (UILabel *)createLabel { 22 | UILabel *label = [UILabel new]; 23 | label.text = @"0.0000000"; 24 | label.font = [UIFont fontWithName:@"Courier" size:20]; 25 | return label; 26 | } 27 | 28 | - (instancetype)init { 29 | self = [super init]; 30 | if (self) { 31 | _slider = [DTSlider new]; 32 | [_slider addTarget:self action:@selector(onValueChange:) forControlEvents:UIControlEventValueChanged]; 33 | [self addSubview:_slider]; 34 | 35 | _minValueLabel = [DTSliderView createLabel]; 36 | [self addSubview:_minValueLabel]; 37 | 38 | _maxValueLabel = [DTSliderView createLabel]; 39 | [self addSubview:_maxValueLabel]; 40 | } 41 | return self; 42 | } 43 | 44 | - (void)layoutSubviews { 45 | [super layoutSubviews]; 46 | [self.minValueLabel sizeToFit]; 47 | [self.maxValueLabel sizeToFit]; 48 | CGRect frame = self.maxValueLabel.frame; 49 | frame.origin.x = self.bounds.size.width - frame.size.width; 50 | self.maxValueLabel.frame = frame; 51 | 52 | frame = self.slider.frame; 53 | frame.origin.y = CGRectGetMaxY(self.maxValueLabel.frame); 54 | frame.size.width = self.bounds.size.width; 55 | frame.size.height = self.bounds.size.height - self.maxValueLabel.frame.size.height; 56 | self.slider.frame = frame; 57 | } 58 | 59 | - (void)onValueChange:(DTSlider *)sender { 60 | self.minValueLabel.text = [NSString stringWithFormat:@"%.7f", sender.minValue]; 61 | self.maxValueLabel.text = [NSString stringWithFormat:@"%.7f", sender.maxValue]; 62 | [self setNeedsLayout]; 63 | } 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // DoubleThumbSliderDemo 4 | // 5 | // Created by Magic-Unique on 2018/7/1. 6 | // Copyright © 2018年 unique. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // DoubleThumbSliderDemo 4 | // 5 | // Created by Magic-Unique on 2018/7/1. 6 | // Copyright © 2018年 unique. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "DTSliderView.h" 11 | 12 | @interface ViewController () 13 | 14 | @property (nonatomic, strong, readonly) UIView *bgView; 15 | 16 | @property (nonatomic, strong, readonly) DTSliderView *normalSliderView; 17 | @property (nonatomic, strong, readonly) DTSliderView *customSliderView; 18 | 19 | @property (nonatomic, strong, readonly) UIButton *applyBtn; 20 | @property (nonatomic, strong, readonly) UISwitch *animationg; 21 | 22 | @end 23 | 24 | @implementation ViewController 25 | 26 | - (void)viewDidLoad { 27 | [super viewDidLoad]; 28 | _bgView = [UIView new]; 29 | [self.view addSubview:_bgView]; 30 | 31 | _normalSliderView = [DTSliderView new]; 32 | [self.bgView addSubview:_normalSliderView]; 33 | 34 | 35 | _customSliderView = [DTSliderView new]; 36 | // _customSlider.continuous = NO; 37 | [_customSliderView.slider setThumbImage:[UIImage imageNamed:@"slider_thumb"] forState:UIControlStateNormal]; 38 | [_customSliderView.slider setMinimumTrackImage:[UIImage imageNamed:@"slider_enable"] forState:UIControlStateNormal]; 39 | [_customSliderView.slider setMaximumTrackImage:[UIImage imageNamed:@"slider_disable"] forState:UIControlStateNormal]; 40 | [_customSliderView.slider setMaximumValueImage:[UIImage imageNamed:@"slider_max"]]; 41 | [_customSliderView.slider setMinimumValueImage:[UIImage imageNamed:@"slider_min"]]; 42 | [self.bgView addSubview:_customSliderView]; 43 | 44 | _applyBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 45 | [_applyBtn setTitle:@"Apply value animation: " forState:UIControlStateNormal]; 46 | [_applyBtn setTitleColor:UIColor.greenColor forState:UIControlStateNormal]; 47 | [_applyBtn sizeToFit]; 48 | [_applyBtn addTarget:self action:@selector(onApply) forControlEvents:UIControlEventTouchUpInside]; 49 | [self.bgView addSubview:_applyBtn]; 50 | 51 | _animationg = [UISwitch new]; 52 | [self.bgView addSubview:_animationg]; 53 | } 54 | 55 | - (UILabel *)createLabel { 56 | UILabel *label = [UILabel new]; 57 | label.text = @"0.0000000"; 58 | label.font = [UIFont fontWithName:@"Courier" size:20]; 59 | return label; 60 | } 61 | 62 | - (void)onApply { 63 | [self.customSliderView.slider setMinValue:self.normalSliderView.slider.minValue 64 | maxValue:self.normalSliderView.slider.maxValue 65 | animated:self.animationg.isOn]; 66 | } 67 | 68 | - (void)viewDidLayoutSubviews { 69 | [super viewDidLayoutSubviews]; 70 | 71 | CGRect frame = self.view.bounds; 72 | frame.origin.y += 20; 73 | frame.size.height -= 20; 74 | self.bgView.frame = frame; 75 | 76 | CGRect midFrame = CGRectZero; 77 | midFrame.size.width = self.view.bounds.size.width; 78 | midFrame.size.height = MAX(self.applyBtn.frame.size.height, self.animationg.frame.size.height) + 40; 79 | 80 | [_applyBtn sizeToFit]; 81 | 82 | CGRect bounds = frame; 83 | 84 | frame = self.normalSliderView.frame; 85 | frame.origin.x = 0; 86 | frame.origin.y = 20; 87 | frame.size.width = bounds.size.width; 88 | frame.size.height = (bounds.size.height - midFrame.size.height) * 0.5; 89 | self.normalSliderView.frame = frame; 90 | 91 | frame = self.applyBtn.frame; 92 | frame.size.height = midFrame.size.height; 93 | frame.origin.y = (bounds.size.height - frame.size.height) * 0.5; 94 | self.applyBtn.frame = frame; 95 | 96 | frame = self.animationg.frame; 97 | frame.origin.x = bounds.size.width - frame.size.width; 98 | frame.origin.y = (bounds.size.height - frame.size.height) * 0.5; 99 | self.animationg.frame = frame; 100 | 101 | frame = self.customSliderView.frame; 102 | frame.origin.x = 0; 103 | frame.origin.y = bounds.size.height - self.normalSliderView.frame.size.height; 104 | frame.size.width = bounds.size.width; 105 | frame.size.height = self.normalSliderView.frame.size.height; 106 | self.customSliderView.frame = frame; 107 | } 108 | 109 | 110 | @end 111 | -------------------------------------------------------------------------------- /DoubleThumbSliderDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // DoubleThumbSliderDemo 4 | // 5 | // Created by Magic-Unique on 2018/7/1. 6 | // Copyright © 2018年 unique. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 冷秋 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'DoubleThumbSliderDemo' do 5 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks 6 | # use_frameworks! 7 | 8 | # Pods for DoubleThumbSliderDemo 9 | 10 | pod 'DTSlider', :path => '.' 11 | # pod 'ReactiveCocoa', :git => 'https://github.com/zhao0/ReactiveCocoa.git', :tag => '2.5.2' 12 | 13 | end 14 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - DTSlider (0.0.3) 3 | 4 | DEPENDENCIES: 5 | - DTSlider (from `.`) 6 | 7 | EXTERNAL SOURCES: 8 | DTSlider: 9 | :path: "." 10 | 11 | SPEC CHECKSUMS: 12 | DTSlider: c42b960d282d536353e44726453a257fd3d4234a 13 | 14 | PODFILE CHECKSUM: 482c4841f2343d4f3d7d2406559bd94050c9166d 15 | 16 | COCOAPODS: 1.5.3 17 | -------------------------------------------------------------------------------- /Pods/Headers/Private/DTSlider/DTSlider+Private.h: -------------------------------------------------------------------------------- 1 | ../../../../DTSlider/DTSlider+Private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/DTSlider/DTSlider.h: -------------------------------------------------------------------------------- 1 | ../../../../DTSlider/DTSlider.h -------------------------------------------------------------------------------- /Pods/Headers/Public/DTSlider/DTSlider.h: -------------------------------------------------------------------------------- 1 | ../../../../DTSlider/DTSlider.h -------------------------------------------------------------------------------- /Pods/Local Podspecs/DTSlider.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DTSlider", 3 | "version": "0.0.3", 4 | "summary": "A Slider extends UISlider with double thumb controller.", 5 | "description": "You can use for a range, such as: age-range, distance-range...\nUse it as UISlider. Supporting custom image and setter with animation.", 6 | "homepage": "https://github.com/Magic-Unique/DoubleThumbSlider", 7 | "license": "MIT", 8 | "authors": { 9 | "冷秋": "516563564@qq.com" 10 | }, 11 | "platforms": { 12 | "ios": "7.0" 13 | }, 14 | "source": { 15 | "git": "https://github.com/Magic-Unique/DoubleThumbSlider.git", 16 | "tag": "0.0.3" 17 | }, 18 | "source_files": "DTSlider/**/*.{h,m}", 19 | "public_header_files": "DTSlider/DTSlider.h" 20 | } 21 | -------------------------------------------------------------------------------- /Pods/Local Podspecs/DoubleThumbSlider.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DoubleThumbSlider", 3 | "version": "0.0.3", 4 | "summary": "A Slider extends UISlider with double thumb controller.", 5 | "description": "You can use for a range, such as: age-range, distance-range...\nUse it as UISlider. Supporting custom image and setter with animation.", 6 | "homepage": "https://github.com/Magic-Unique/DoubleThumbSlider", 7 | "license": "MIT", 8 | "authors": { 9 | "冷秋": "516563564@qq.com" 10 | }, 11 | "platforms": { 12 | "ios": "7.0" 13 | }, 14 | "source": { 15 | "git": "https://github.com/Magic-Unique/DoubleThumbSlider.git", 16 | "tag": "0.0.3" 17 | }, 18 | "source_files": "DoubleThumbSlider/**/*.{h,m}", 19 | "public_header_files": "DoubleThumbSlider/DTSlider.h" 20 | } 21 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - DTSlider (0.0.3) 3 | 4 | DEPENDENCIES: 5 | - DTSlider (from `.`) 6 | 7 | EXTERNAL SOURCES: 8 | DTSlider: 9 | :path: "." 10 | 11 | SPEC CHECKSUMS: 12 | DTSlider: c42b960d282d536353e44726453a257fd3d4234a 13 | 14 | PODFILE CHECKSUM: 482c4841f2343d4f3d7d2406559bd94050c9166d 15 | 16 | COCOAPODS: 1.5.3 17 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 3132D9FEDC88414DBC2688DEFDE6D29E /* DTSlider+Private.m in Sources */ = {isa = PBXBuildFile; fileRef = 1277B45BA2A0918AEE8A8C4B64E5C3E4 /* DTSlider+Private.m */; }; 11 | 3C9A5B17C5FBF5CEBCAEF57B1FAFA46E /* DTSlider-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F34680F0AF1DAB72C4A9762770A3ED9F /* DTSlider-dummy.m */; }; 12 | 43AE8A25196B00C11FB4E7DDC901556D /* DTSlider.h in Headers */ = {isa = PBXBuildFile; fileRef = A4C191A178251F0FA3D191CC1E2353FD /* DTSlider.h */; settings = {ATTRIBUTES = (Project, ); }; }; 13 | 51DE8C1FE2CC840C57EA64E0001F2759 /* Pods-DoubleThumbSliderDemo-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A462DC7543D897795BFF46BB83F716B /* Pods-DoubleThumbSliderDemo-dummy.m */; }; 14 | 72930AFE3B88AF3D0E83D5074C8766C7 /* DTSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = 31BC7098DEBA8587B5FD6183856E5D0A /* DTSlider.m */; }; 15 | 7CF7F29AC82FB29CFBB6BE6AC41E8923 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; 16 | B68F27ED09E1C6F48E3C8C55C7F6A9BD /* DTSlider+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 8269FA1CEC0C4CF48215BE9DA0E92290 /* DTSlider+Private.h */; settings = {ATTRIBUTES = (Project, ); }; }; 17 | CBD82EAE12E0B017F9F92E1091B2AD0B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | CB9F2B32BC5952C5D7DE58994FDEC4F1 /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = 64F05A1FAAB2973CCDD91E8EA100AD48; 26 | remoteInfo = DTSlider; 27 | }; 28 | /* End PBXContainerItemProxy section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | 083C70A01FC6EBAE2293122BA55D680D /* Pods-DoubleThumbSliderDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DoubleThumbSliderDemo.debug.xcconfig"; sourceTree = ""; }; 32 | 0CAE658AD96F94A4CBBA7FA12567BF7A /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; 33 | 1277B45BA2A0918AEE8A8C4B64E5C3E4 /* DTSlider+Private.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "DTSlider+Private.m"; path = "DTSlider/DTSlider+Private.m"; sourceTree = ""; }; 34 | 15B04F59E5B83C7D27F84F113D803005 /* Pods-DoubleThumbSliderDemo-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-DoubleThumbSliderDemo-acknowledgements.plist"; sourceTree = ""; }; 35 | 1A462DC7543D897795BFF46BB83F716B /* Pods-DoubleThumbSliderDemo-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-DoubleThumbSliderDemo-dummy.m"; sourceTree = ""; }; 36 | 31BC7098DEBA8587B5FD6183856E5D0A /* DTSlider.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DTSlider.m; path = DTSlider/DTSlider.m; sourceTree = ""; }; 37 | 657C018CC2F0FDDEA503F2ACC608E331 /* libDTSlider.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libDTSlider.a; path = libDTSlider.a; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 39 | 8269FA1CEC0C4CF48215BE9DA0E92290 /* DTSlider+Private.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "DTSlider+Private.h"; path = "DTSlider/DTSlider+Private.h"; sourceTree = ""; }; 40 | 8DE78B4ABBA124C7BF40154723699620 /* DTSlider.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = DTSlider.xcconfig; sourceTree = ""; }; 41 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 42 | 9AE0F1E337837F23FC59AD0E56536B67 /* libPods-DoubleThumbSliderDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-DoubleThumbSliderDemo.a"; path = "libPods-DoubleThumbSliderDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | A4C191A178251F0FA3D191CC1E2353FD /* DTSlider.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DTSlider.h; path = DTSlider/DTSlider.h; sourceTree = ""; }; 44 | B80306D1D8D350ADD0D19B58D2C8ABF8 /* Pods-DoubleThumbSliderDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DoubleThumbSliderDemo.release.xcconfig"; sourceTree = ""; }; 45 | C0B8D34149C0075EF67FF37FBC054C49 /* Pods-DoubleThumbSliderDemo-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-DoubleThumbSliderDemo-acknowledgements.markdown"; sourceTree = ""; }; 46 | C143E31E16F71773C84D4E8D1EC69EE5 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; 47 | E74C6D0C0C1D3389AC363FB8F68CBE75 /* Pods-DoubleThumbSliderDemo-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DoubleThumbSliderDemo-resources.sh"; sourceTree = ""; }; 48 | F31061BEDABC1DC183713536876B3B84 /* Pods-DoubleThumbSliderDemo-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DoubleThumbSliderDemo-frameworks.sh"; sourceTree = ""; }; 49 | F34680F0AF1DAB72C4A9762770A3ED9F /* DTSlider-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "DTSlider-dummy.m"; sourceTree = ""; }; 50 | F7369E2AB3344B056A216A0E8804D39D /* DTSlider.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; path = DTSlider.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 51 | F7CEC1C7E91141CD9E89883B54C7787B /* DTSlider-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "DTSlider-prefix.pch"; sourceTree = ""; }; 52 | /* End PBXFileReference section */ 53 | 54 | /* Begin PBXFrameworksBuildPhase section */ 55 | 38DA8A0E17C020FAABA4B5C6C3737742 /* Frameworks */ = { 56 | isa = PBXFrameworksBuildPhase; 57 | buildActionMask = 2147483647; 58 | files = ( 59 | 7CF7F29AC82FB29CFBB6BE6AC41E8923 /* Foundation.framework in Frameworks */, 60 | ); 61 | runOnlyForDeploymentPostprocessing = 0; 62 | }; 63 | 58660AC241CE87727DBF82D3DF9721E1 /* Frameworks */ = { 64 | isa = PBXFrameworksBuildPhase; 65 | buildActionMask = 2147483647; 66 | files = ( 67 | CBD82EAE12E0B017F9F92E1091B2AD0B /* Foundation.framework in Frameworks */, 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | /* End PBXFrameworksBuildPhase section */ 72 | 73 | /* Begin PBXGroup section */ 74 | 0DCD5CF22AB3B1EDB11EBA132BB99BE1 /* Support Files */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 8DE78B4ABBA124C7BF40154723699620 /* DTSlider.xcconfig */, 78 | F34680F0AF1DAB72C4A9762770A3ED9F /* DTSlider-dummy.m */, 79 | F7CEC1C7E91141CD9E89883B54C7787B /* DTSlider-prefix.pch */, 80 | ); 81 | name = "Support Files"; 82 | path = "Pods/Target Support Files/DTSlider"; 83 | sourceTree = ""; 84 | }; 85 | 2E44BC6F14C3272B3C49C2D5AAC1DDE0 /* Pod */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | F7369E2AB3344B056A216A0E8804D39D /* DTSlider.podspec */, 89 | C143E31E16F71773C84D4E8D1EC69EE5 /* LICENSE */, 90 | 0CAE658AD96F94A4CBBA7FA12567BF7A /* README.md */, 91 | ); 92 | name = Pod; 93 | sourceTree = ""; 94 | }; 95 | 316DD9890A967ECEB450E34CEDB93AE1 /* Products */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | 657C018CC2F0FDDEA503F2ACC608E331 /* libDTSlider.a */, 99 | 9AE0F1E337837F23FC59AD0E56536B67 /* libPods-DoubleThumbSliderDemo.a */, 100 | ); 101 | name = Products; 102 | sourceTree = ""; 103 | }; 104 | 38F74BEB6BA6CD8AD3D42382123ECCB7 /* Pods-DoubleThumbSliderDemo */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | C0B8D34149C0075EF67FF37FBC054C49 /* Pods-DoubleThumbSliderDemo-acknowledgements.markdown */, 108 | 15B04F59E5B83C7D27F84F113D803005 /* Pods-DoubleThumbSliderDemo-acknowledgements.plist */, 109 | 1A462DC7543D897795BFF46BB83F716B /* Pods-DoubleThumbSliderDemo-dummy.m */, 110 | F31061BEDABC1DC183713536876B3B84 /* Pods-DoubleThumbSliderDemo-frameworks.sh */, 111 | E74C6D0C0C1D3389AC363FB8F68CBE75 /* Pods-DoubleThumbSliderDemo-resources.sh */, 112 | 083C70A01FC6EBAE2293122BA55D680D /* Pods-DoubleThumbSliderDemo.debug.xcconfig */, 113 | B80306D1D8D350ADD0D19B58D2C8ABF8 /* Pods-DoubleThumbSliderDemo.release.xcconfig */, 114 | ); 115 | name = "Pods-DoubleThumbSliderDemo"; 116 | path = "Target Support Files/Pods-DoubleThumbSliderDemo"; 117 | sourceTree = ""; 118 | }; 119 | 4594B1C1EC3E7F31051CEFFB688D13FE /* Targets Support Files */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 38F74BEB6BA6CD8AD3D42382123ECCB7 /* Pods-DoubleThumbSliderDemo */, 123 | ); 124 | name = "Targets Support Files"; 125 | sourceTree = ""; 126 | }; 127 | 7DB346D0F39D3F0E887471402A8071AB = { 128 | isa = PBXGroup; 129 | children = ( 130 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 131 | AF117C6A0DF0D099A96BDACA62A8F4EF /* Development Pods */, 132 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 133 | 316DD9890A967ECEB450E34CEDB93AE1 /* Products */, 134 | 4594B1C1EC3E7F31051CEFFB688D13FE /* Targets Support Files */, 135 | ); 136 | sourceTree = ""; 137 | }; 138 | AF117C6A0DF0D099A96BDACA62A8F4EF /* Development Pods */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | FB01CEC87E92A6CFF019BD4DC5DAD0D2 /* DTSlider */, 142 | ); 143 | name = "Development Pods"; 144 | sourceTree = ""; 145 | }; 146 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | D35AF013A5F0BAD4F32504907A52519E /* iOS */, 150 | ); 151 | name = Frameworks; 152 | sourceTree = ""; 153 | }; 154 | D35AF013A5F0BAD4F32504907A52519E /* iOS */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */, 158 | ); 159 | name = iOS; 160 | sourceTree = ""; 161 | }; 162 | FB01CEC87E92A6CFF019BD4DC5DAD0D2 /* DTSlider */ = { 163 | isa = PBXGroup; 164 | children = ( 165 | A4C191A178251F0FA3D191CC1E2353FD /* DTSlider.h */, 166 | 31BC7098DEBA8587B5FD6183856E5D0A /* DTSlider.m */, 167 | 8269FA1CEC0C4CF48215BE9DA0E92290 /* DTSlider+Private.h */, 168 | 1277B45BA2A0918AEE8A8C4B64E5C3E4 /* DTSlider+Private.m */, 169 | 2E44BC6F14C3272B3C49C2D5AAC1DDE0 /* Pod */, 170 | 0DCD5CF22AB3B1EDB11EBA132BB99BE1 /* Support Files */, 171 | ); 172 | name = DTSlider; 173 | path = ..; 174 | sourceTree = ""; 175 | }; 176 | /* End PBXGroup section */ 177 | 178 | /* Begin PBXHeadersBuildPhase section */ 179 | 8882E44E071E8B442660EE31173B6192 /* Headers */ = { 180 | isa = PBXHeadersBuildPhase; 181 | buildActionMask = 2147483647; 182 | files = ( 183 | B68F27ED09E1C6F48E3C8C55C7F6A9BD /* DTSlider+Private.h in Headers */, 184 | 43AE8A25196B00C11FB4E7DDC901556D /* DTSlider.h in Headers */, 185 | ); 186 | runOnlyForDeploymentPostprocessing = 0; 187 | }; 188 | /* End PBXHeadersBuildPhase section */ 189 | 190 | /* Begin PBXNativeTarget section */ 191 | 15479D9B5FD3F4B69A0398A29F93B8D4 /* Pods-DoubleThumbSliderDemo */ = { 192 | isa = PBXNativeTarget; 193 | buildConfigurationList = 937CC39A493BEDB8EB45F71C0DCB9079 /* Build configuration list for PBXNativeTarget "Pods-DoubleThumbSliderDemo" */; 194 | buildPhases = ( 195 | 9A4C5C1E61842BAF4A86E76AA11F8607 /* Sources */, 196 | 58660AC241CE87727DBF82D3DF9721E1 /* Frameworks */, 197 | ); 198 | buildRules = ( 199 | ); 200 | dependencies = ( 201 | F3F59508AF0FDF982E9EE8FD6662D3A3 /* PBXTargetDependency */, 202 | ); 203 | name = "Pods-DoubleThumbSliderDemo"; 204 | productName = "Pods-DoubleThumbSliderDemo"; 205 | productReference = 9AE0F1E337837F23FC59AD0E56536B67 /* libPods-DoubleThumbSliderDemo.a */; 206 | productType = "com.apple.product-type.library.static"; 207 | }; 208 | 64F05A1FAAB2973CCDD91E8EA100AD48 /* DTSlider */ = { 209 | isa = PBXNativeTarget; 210 | buildConfigurationList = 1D3E45CDAB2410C193D6E3C22C22EB83 /* Build configuration list for PBXNativeTarget "DTSlider" */; 211 | buildPhases = ( 212 | C8B3A46805110696A93A4A0EE0F8F468 /* Sources */, 213 | 38DA8A0E17C020FAABA4B5C6C3737742 /* Frameworks */, 214 | 8882E44E071E8B442660EE31173B6192 /* Headers */, 215 | ); 216 | buildRules = ( 217 | ); 218 | dependencies = ( 219 | ); 220 | name = DTSlider; 221 | productName = DTSlider; 222 | productReference = 657C018CC2F0FDDEA503F2ACC608E331 /* libDTSlider.a */; 223 | productType = "com.apple.product-type.library.static"; 224 | }; 225 | /* End PBXNativeTarget section */ 226 | 227 | /* Begin PBXProject section */ 228 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 229 | isa = PBXProject; 230 | attributes = { 231 | LastSwiftUpdateCheck = 0930; 232 | LastUpgradeCheck = 0930; 233 | }; 234 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 235 | compatibilityVersion = "Xcode 3.2"; 236 | developmentRegion = English; 237 | hasScannedForEncodings = 0; 238 | knownRegions = ( 239 | en, 240 | ); 241 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 242 | productRefGroup = 316DD9890A967ECEB450E34CEDB93AE1 /* Products */; 243 | projectDirPath = ""; 244 | projectRoot = ""; 245 | targets = ( 246 | 64F05A1FAAB2973CCDD91E8EA100AD48 /* DTSlider */, 247 | 15479D9B5FD3F4B69A0398A29F93B8D4 /* Pods-DoubleThumbSliderDemo */, 248 | ); 249 | }; 250 | /* End PBXProject section */ 251 | 252 | /* Begin PBXSourcesBuildPhase section */ 253 | 9A4C5C1E61842BAF4A86E76AA11F8607 /* Sources */ = { 254 | isa = PBXSourcesBuildPhase; 255 | buildActionMask = 2147483647; 256 | files = ( 257 | 51DE8C1FE2CC840C57EA64E0001F2759 /* Pods-DoubleThumbSliderDemo-dummy.m in Sources */, 258 | ); 259 | runOnlyForDeploymentPostprocessing = 0; 260 | }; 261 | C8B3A46805110696A93A4A0EE0F8F468 /* Sources */ = { 262 | isa = PBXSourcesBuildPhase; 263 | buildActionMask = 2147483647; 264 | files = ( 265 | 3132D9FEDC88414DBC2688DEFDE6D29E /* DTSlider+Private.m in Sources */, 266 | 3C9A5B17C5FBF5CEBCAEF57B1FAFA46E /* DTSlider-dummy.m in Sources */, 267 | 72930AFE3B88AF3D0E83D5074C8766C7 /* DTSlider.m in Sources */, 268 | ); 269 | runOnlyForDeploymentPostprocessing = 0; 270 | }; 271 | /* End PBXSourcesBuildPhase section */ 272 | 273 | /* Begin PBXTargetDependency section */ 274 | F3F59508AF0FDF982E9EE8FD6662D3A3 /* PBXTargetDependency */ = { 275 | isa = PBXTargetDependency; 276 | name = DTSlider; 277 | target = 64F05A1FAAB2973CCDD91E8EA100AD48 /* DTSlider */; 278 | targetProxy = CB9F2B32BC5952C5D7DE58994FDEC4F1 /* PBXContainerItemProxy */; 279 | }; 280 | /* End PBXTargetDependency section */ 281 | 282 | /* Begin XCBuildConfiguration section */ 283 | 2DD15F4AAEC3AB9681852EF1055A48E5 /* Debug */ = { 284 | isa = XCBuildConfiguration; 285 | baseConfigurationReference = 8DE78B4ABBA124C7BF40154723699620 /* DTSlider.xcconfig */; 286 | buildSettings = { 287 | CODE_SIGN_IDENTITY = "iPhone Developer"; 288 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 289 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 290 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 291 | GCC_PREFIX_HEADER = "Target Support Files/DTSlider/DTSlider-prefix.pch"; 292 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 293 | OTHER_LDFLAGS = ""; 294 | OTHER_LIBTOOLFLAGS = ""; 295 | PRIVATE_HEADERS_FOLDER_PATH = ""; 296 | PRODUCT_MODULE_NAME = DTSlider; 297 | PRODUCT_NAME = DTSlider; 298 | PUBLIC_HEADERS_FOLDER_PATH = ""; 299 | SDKROOT = iphoneos; 300 | SKIP_INSTALL = YES; 301 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 302 | TARGETED_DEVICE_FAMILY = "1,2"; 303 | }; 304 | name = Debug; 305 | }; 306 | 553022A828EE1991F07D2D73F565AEF8 /* Debug */ = { 307 | isa = XCBuildConfiguration; 308 | buildSettings = { 309 | ALWAYS_SEARCH_USER_PATHS = NO; 310 | CLANG_ANALYZER_NONNULL = YES; 311 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 312 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 313 | CLANG_CXX_LIBRARY = "libc++"; 314 | CLANG_ENABLE_MODULES = YES; 315 | CLANG_ENABLE_OBJC_ARC = YES; 316 | CLANG_ENABLE_OBJC_WEAK = YES; 317 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 318 | CLANG_WARN_BOOL_CONVERSION = YES; 319 | CLANG_WARN_COMMA = YES; 320 | CLANG_WARN_CONSTANT_CONVERSION = YES; 321 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 322 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 323 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 324 | CLANG_WARN_EMPTY_BODY = YES; 325 | CLANG_WARN_ENUM_CONVERSION = YES; 326 | CLANG_WARN_INFINITE_RECURSION = YES; 327 | CLANG_WARN_INT_CONVERSION = YES; 328 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 329 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 330 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 331 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 332 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 333 | CLANG_WARN_STRICT_PROTOTYPES = YES; 334 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 335 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 336 | CLANG_WARN_UNREACHABLE_CODE = YES; 337 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 338 | CODE_SIGNING_ALLOWED = NO; 339 | CODE_SIGNING_REQUIRED = NO; 340 | COPY_PHASE_STRIP = NO; 341 | DEBUG_INFORMATION_FORMAT = dwarf; 342 | ENABLE_STRICT_OBJC_MSGSEND = YES; 343 | ENABLE_TESTABILITY = YES; 344 | GCC_C_LANGUAGE_STANDARD = gnu11; 345 | GCC_DYNAMIC_NO_PIC = NO; 346 | GCC_NO_COMMON_BLOCKS = YES; 347 | GCC_OPTIMIZATION_LEVEL = 0; 348 | GCC_PREPROCESSOR_DEFINITIONS = ( 349 | "POD_CONFIGURATION_DEBUG=1", 350 | "DEBUG=1", 351 | "$(inherited)", 352 | ); 353 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 354 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 355 | GCC_WARN_UNDECLARED_SELECTOR = YES; 356 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 357 | GCC_WARN_UNUSED_FUNCTION = YES; 358 | GCC_WARN_UNUSED_VARIABLE = YES; 359 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 360 | MTL_ENABLE_DEBUG_INFO = YES; 361 | ONLY_ACTIVE_ARCH = YES; 362 | PRODUCT_NAME = "$(TARGET_NAME)"; 363 | STRIP_INSTALLED_PRODUCT = NO; 364 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 365 | SYMROOT = "${SRCROOT}/../build"; 366 | }; 367 | name = Debug; 368 | }; 369 | 58CE816B060A41D32CEC095441D0E3E0 /* Release */ = { 370 | isa = XCBuildConfiguration; 371 | buildSettings = { 372 | ALWAYS_SEARCH_USER_PATHS = NO; 373 | CLANG_ANALYZER_NONNULL = YES; 374 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 375 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 376 | CLANG_CXX_LIBRARY = "libc++"; 377 | CLANG_ENABLE_MODULES = YES; 378 | CLANG_ENABLE_OBJC_ARC = YES; 379 | CLANG_ENABLE_OBJC_WEAK = YES; 380 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 381 | CLANG_WARN_BOOL_CONVERSION = YES; 382 | CLANG_WARN_COMMA = YES; 383 | CLANG_WARN_CONSTANT_CONVERSION = YES; 384 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 385 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 386 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 387 | CLANG_WARN_EMPTY_BODY = YES; 388 | CLANG_WARN_ENUM_CONVERSION = YES; 389 | CLANG_WARN_INFINITE_RECURSION = YES; 390 | CLANG_WARN_INT_CONVERSION = YES; 391 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 392 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 393 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 394 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 395 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 396 | CLANG_WARN_STRICT_PROTOTYPES = YES; 397 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 398 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 399 | CLANG_WARN_UNREACHABLE_CODE = YES; 400 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 401 | CODE_SIGNING_ALLOWED = NO; 402 | CODE_SIGNING_REQUIRED = NO; 403 | COPY_PHASE_STRIP = NO; 404 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 405 | ENABLE_NS_ASSERTIONS = NO; 406 | ENABLE_STRICT_OBJC_MSGSEND = YES; 407 | GCC_C_LANGUAGE_STANDARD = gnu11; 408 | GCC_NO_COMMON_BLOCKS = YES; 409 | GCC_PREPROCESSOR_DEFINITIONS = ( 410 | "POD_CONFIGURATION_RELEASE=1", 411 | "$(inherited)", 412 | ); 413 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 414 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 415 | GCC_WARN_UNDECLARED_SELECTOR = YES; 416 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 417 | GCC_WARN_UNUSED_FUNCTION = YES; 418 | GCC_WARN_UNUSED_VARIABLE = YES; 419 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 420 | MTL_ENABLE_DEBUG_INFO = NO; 421 | PRODUCT_NAME = "$(TARGET_NAME)"; 422 | STRIP_INSTALLED_PRODUCT = NO; 423 | SYMROOT = "${SRCROOT}/../build"; 424 | }; 425 | name = Release; 426 | }; 427 | 9D9D46FA7656971AD7804E69CB8FEFCF /* Release */ = { 428 | isa = XCBuildConfiguration; 429 | baseConfigurationReference = 8DE78B4ABBA124C7BF40154723699620 /* DTSlider.xcconfig */; 430 | buildSettings = { 431 | CODE_SIGN_IDENTITY = "iPhone Developer"; 432 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 433 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 434 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 435 | GCC_PREFIX_HEADER = "Target Support Files/DTSlider/DTSlider-prefix.pch"; 436 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 437 | OTHER_LDFLAGS = ""; 438 | OTHER_LIBTOOLFLAGS = ""; 439 | PRIVATE_HEADERS_FOLDER_PATH = ""; 440 | PRODUCT_MODULE_NAME = DTSlider; 441 | PRODUCT_NAME = DTSlider; 442 | PUBLIC_HEADERS_FOLDER_PATH = ""; 443 | SDKROOT = iphoneos; 444 | SKIP_INSTALL = YES; 445 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 446 | TARGETED_DEVICE_FAMILY = "1,2"; 447 | VALIDATE_PRODUCT = YES; 448 | }; 449 | name = Release; 450 | }; 451 | BC693C5D9B0245FB4EF9C39798F2DDB0 /* Release */ = { 452 | isa = XCBuildConfiguration; 453 | baseConfigurationReference = B80306D1D8D350ADD0D19B58D2C8ABF8 /* Pods-DoubleThumbSliderDemo.release.xcconfig */; 454 | buildSettings = { 455 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 456 | CLANG_ENABLE_OBJC_WEAK = NO; 457 | CODE_SIGN_IDENTITY = "iPhone Developer"; 458 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 459 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 460 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 461 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 462 | MACH_O_TYPE = staticlib; 463 | OTHER_LDFLAGS = ""; 464 | OTHER_LIBTOOLFLAGS = ""; 465 | PODS_ROOT = "$(SRCROOT)"; 466 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 467 | SDKROOT = iphoneos; 468 | SKIP_INSTALL = YES; 469 | TARGETED_DEVICE_FAMILY = "1,2"; 470 | VALIDATE_PRODUCT = YES; 471 | }; 472 | name = Release; 473 | }; 474 | E2F4A0E6F38E9ECE87434375EBB1280F /* Debug */ = { 475 | isa = XCBuildConfiguration; 476 | baseConfigurationReference = 083C70A01FC6EBAE2293122BA55D680D /* Pods-DoubleThumbSliderDemo.debug.xcconfig */; 477 | buildSettings = { 478 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 479 | CLANG_ENABLE_OBJC_WEAK = NO; 480 | CODE_SIGN_IDENTITY = "iPhone Developer"; 481 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 482 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 483 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 484 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 485 | MACH_O_TYPE = staticlib; 486 | OTHER_LDFLAGS = ""; 487 | OTHER_LIBTOOLFLAGS = ""; 488 | PODS_ROOT = "$(SRCROOT)"; 489 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 490 | SDKROOT = iphoneos; 491 | SKIP_INSTALL = YES; 492 | TARGETED_DEVICE_FAMILY = "1,2"; 493 | }; 494 | name = Debug; 495 | }; 496 | /* End XCBuildConfiguration section */ 497 | 498 | /* Begin XCConfigurationList section */ 499 | 1D3E45CDAB2410C193D6E3C22C22EB83 /* Build configuration list for PBXNativeTarget "DTSlider" */ = { 500 | isa = XCConfigurationList; 501 | buildConfigurations = ( 502 | 2DD15F4AAEC3AB9681852EF1055A48E5 /* Debug */, 503 | 9D9D46FA7656971AD7804E69CB8FEFCF /* Release */, 504 | ); 505 | defaultConfigurationIsVisible = 0; 506 | defaultConfigurationName = Release; 507 | }; 508 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 509 | isa = XCConfigurationList; 510 | buildConfigurations = ( 511 | 553022A828EE1991F07D2D73F565AEF8 /* Debug */, 512 | 58CE816B060A41D32CEC095441D0E3E0 /* Release */, 513 | ); 514 | defaultConfigurationIsVisible = 0; 515 | defaultConfigurationName = Release; 516 | }; 517 | 937CC39A493BEDB8EB45F71C0DCB9079 /* Build configuration list for PBXNativeTarget "Pods-DoubleThumbSliderDemo" */ = { 518 | isa = XCConfigurationList; 519 | buildConfigurations = ( 520 | E2F4A0E6F38E9ECE87434375EBB1280F /* Debug */, 521 | BC693C5D9B0245FB4EF9C39798F2DDB0 /* Release */, 522 | ); 523 | defaultConfigurationIsVisible = 0; 524 | defaultConfigurationName = Release; 525 | }; 526 | /* End XCConfigurationList section */ 527 | }; 528 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 529 | } 530 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/shuang.xcuserdatad/xcschemes/DTSlider.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 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/shuang.xcuserdatad/xcschemes/Pods-DoubleThumbSliderDemo.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 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/shuang.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | DTSlider.xcscheme 8 | 9 | isShown 10 | 11 | orderHint 12 | 0 13 | 14 | Pods-DoubleThumbSliderDemo.xcscheme 15 | 16 | isShown 17 | 18 | orderHint 19 | 1 20 | 21 | 22 | SuppressBuildableAutocreation 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Pods/Target Support Files/DTSlider/DTSlider-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_DTSlider : NSObject 3 | @end 4 | @implementation PodsDummy_DTSlider 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/DTSlider/DTSlider-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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/DTSlider/DTSlider.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/DTSlider 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/DTSlider" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DTSlider" 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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-DoubleThumbSliderDemo/Pods-DoubleThumbSliderDemo-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## DTSlider 5 | 6 | MIT License 7 | 8 | Copyright (c) 2018 冷秋 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | Generated by CocoaPods - https://cocoapods.org 29 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-DoubleThumbSliderDemo/Pods-DoubleThumbSliderDemo-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 | MIT License 18 | 19 | Copyright (c) 2018 冷秋 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | 39 | License 40 | MIT 41 | Title 42 | DTSlider 43 | Type 44 | PSGroupSpecifier 45 | 46 | 47 | FooterText 48 | Generated by CocoaPods - https://cocoapods.org 49 | Title 50 | 51 | Type 52 | PSGroupSpecifier 53 | 54 | 55 | StringsTable 56 | Acknowledgements 57 | Title 58 | Acknowledgements 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-DoubleThumbSliderDemo/Pods-DoubleThumbSliderDemo-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_DoubleThumbSliderDemo : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_DoubleThumbSliderDemo 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-DoubleThumbSliderDemo/Pods-DoubleThumbSliderDemo-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 7 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # frameworks to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 13 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 14 | 15 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 16 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 17 | 18 | # Used as a return value for each invocation of `strip_invalid_archs` function. 19 | STRIP_BINARY_RETVAL=0 20 | 21 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 22 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 23 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 24 | 25 | # Copies and strips a vendored framework 26 | install_framework() 27 | { 28 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 29 | local source="${BUILT_PRODUCTS_DIR}/$1" 30 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 31 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 32 | elif [ -r "$1" ]; then 33 | local source="$1" 34 | fi 35 | 36 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 37 | 38 | if [ -L "${source}" ]; then 39 | echo "Symlinked..." 40 | source="$(readlink "${source}")" 41 | fi 42 | 43 | # Use filter instead of exclude so missing patterns don't throw errors. 44 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 45 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 46 | 47 | local basename 48 | basename="$(basename -s .framework "$1")" 49 | binary="${destination}/${basename}.framework/${basename}" 50 | if ! [ -r "$binary" ]; then 51 | binary="${destination}/${basename}" 52 | fi 53 | 54 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 55 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 56 | strip_invalid_archs "$binary" 57 | fi 58 | 59 | # Resign the code if required by the build settings to avoid unstable apps 60 | code_sign_if_enabled "${destination}/$(basename "$1")" 61 | 62 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 63 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 64 | local swift_runtime_libs 65 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 66 | for lib in $swift_runtime_libs; do 67 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 68 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 69 | code_sign_if_enabled "${destination}/${lib}" 70 | done 71 | fi 72 | } 73 | 74 | # Copies and strips a vendored dSYM 75 | install_dsym() { 76 | local source="$1" 77 | if [ -r "$source" ]; then 78 | # Copy the dSYM into a the targets temp dir. 79 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 80 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 81 | 82 | local basename 83 | basename="$(basename -s .framework.dSYM "$source")" 84 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 85 | 86 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 87 | if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then 88 | strip_invalid_archs "$binary" 89 | fi 90 | 91 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 92 | # Move the stripped file into its final destination. 93 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 94 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 95 | else 96 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 97 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 98 | fi 99 | fi 100 | } 101 | 102 | # Signs a framework with the provided identity 103 | code_sign_if_enabled() { 104 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 105 | # Use the current code_sign_identitiy 106 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 107 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 108 | 109 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 110 | code_sign_cmd="$code_sign_cmd &" 111 | fi 112 | echo "$code_sign_cmd" 113 | eval "$code_sign_cmd" 114 | fi 115 | } 116 | 117 | # Strip invalid architectures 118 | strip_invalid_archs() { 119 | binary="$1" 120 | # Get architectures for current target binary 121 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 122 | # Intersect them with the architectures we are building for 123 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 124 | # If there are no archs supported by this binary then warn the user 125 | if [[ -z "$intersected_archs" ]]; then 126 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 127 | STRIP_BINARY_RETVAL=0 128 | return 129 | fi 130 | stripped="" 131 | for arch in $binary_archs; do 132 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 133 | # Strip non-valid architectures in-place 134 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 135 | stripped="$stripped $arch" 136 | fi 137 | done 138 | if [[ "$stripped" ]]; then 139 | echo "Stripped $binary of architectures:$stripped" 140 | fi 141 | STRIP_BINARY_RETVAL=1 142 | } 143 | 144 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 145 | wait 146 | fi 147 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-DoubleThumbSliderDemo/Pods-DoubleThumbSliderDemo-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then 7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # resources to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 13 | 14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 15 | > "$RESOURCES_TO_COPY" 16 | 17 | XCASSET_FILES=() 18 | 19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 22 | 23 | case "${TARGETED_DEVICE_FAMILY:-}" in 24 | 1,2) 25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 26 | ;; 27 | 1) 28 | TARGET_DEVICE_ARGS="--target-device iphone" 29 | ;; 30 | 2) 31 | TARGET_DEVICE_ARGS="--target-device ipad" 32 | ;; 33 | 3) 34 | TARGET_DEVICE_ARGS="--target-device tv" 35 | ;; 36 | 4) 37 | TARGET_DEVICE_ARGS="--target-device watch" 38 | ;; 39 | *) 40 | TARGET_DEVICE_ARGS="--target-device mac" 41 | ;; 42 | esac 43 | 44 | install_resource() 45 | { 46 | if [[ "$1" = /* ]] ; then 47 | RESOURCE_PATH="$1" 48 | else 49 | RESOURCE_PATH="${PODS_ROOT}/$1" 50 | fi 51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 52 | cat << EOM 53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 54 | EOM 55 | exit 1 56 | fi 57 | case $RESOURCE_PATH in 58 | *.storyboard) 59 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 60 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 61 | ;; 62 | *.xib) 63 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 64 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 65 | ;; 66 | *.framework) 67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 71 | ;; 72 | *.xcdatamodel) 73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 75 | ;; 76 | *.xcdatamodeld) 77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 79 | ;; 80 | *.xcmappingmodel) 81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 83 | ;; 84 | *.xcassets) 85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 87 | ;; 88 | *) 89 | echo "$RESOURCE_PATH" || true 90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 91 | ;; 92 | esac 93 | } 94 | 95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 100 | fi 101 | rm -f "$RESOURCES_TO_COPY" 102 | 103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] 104 | then 105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 107 | while read line; do 108 | if [[ $line != "${PODS_ROOT}*" ]]; then 109 | XCASSET_FILES+=("$line") 110 | fi 111 | done <<<"$OTHER_XCASSETS" 112 | 113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then 114 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 115 | else 116 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" 117 | fi 118 | fi 119 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-DoubleThumbSliderDemo/Pods-DoubleThumbSliderDemo.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DTSlider" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/DTSlider" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/DTSlider" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"DTSlider" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-DoubleThumbSliderDemo/Pods-DoubleThumbSliderDemo.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DTSlider" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/DTSlider" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/DTSlider" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"DTSlider" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DoubleThumbSlider 2 | 3 | A slider with two thumbs. 4 | 5 | 双滑块控件 6 | 7 | ## Warning !! 8 | 9 | > **for 0.0.4 [Refused by Apple](https://github.com/Magic-Unique/DoubleThumbSlider/issues/1)** 10 | > 11 | > DTSlider use private APIs of UISlider class, It will cause your App refused by App Store. 12 | > 13 | > DTSlider 用到了 UISlider 类中的私有 API,这将会导致你的 App 会被拒绝上传至 App Store。 14 | 15 | > **for 0.1.0** 16 | > 17 | > DTSlider has confuse private APIs, but did not test on App Store. 18 | > 19 | > DTSlider 混淆了私有 APIs,但是并没有做上传 App Store 测试。 20 | 21 | ## Preview 效果图 22 | 23 | ![gif](Slider.gif) 24 | 25 | ## USAGE 使用方式 26 | 27 | ### CocoaPods 28 | 29 | ```ruby 30 | pod 'DTSlider' 31 | ``` 32 | 33 | ### Source 34 | 35 | drag *DTSlider* folder into your project. 36 | 37 | ### Import 38 | 39 | ```objc 40 | #import "DTSlider.h" 41 | ``` 42 | 43 | ```objc 44 | // DTSlider.h 45 | 46 | @interface DTSlider : UISlider 47 | 48 | @property (nonatomic, assign) float maxValue; 49 | 50 | @property (nonatomic, assign) float minValue; 51 | 52 | - (void)setMinValue:(float)minValue animated:(BOOL)animated; 53 | - (void)setMaxValue:(float)maxValue animated:(BOOL)animated; 54 | - (void)setMinValue:(float)minValue maxValue:(float)maxValue animated:(BOOL)animated; 55 | 56 | @end 57 | ``` 58 | 59 | ### Create Instance 60 | 61 | ```objective-c 62 | // in the other file. 63 | DTSlider *slider = [[DTSlider alloc] init]; 64 | slider.maxValue = 100.0; // init value 65 | slider.minValue = 0.0; // init value 66 | [slider addTarget:self action:@selector(sender:event:) forControlEvents:UIControlEventValueChanged]; 67 | 68 | // selector 69 | - (void)sender:(DTSlider *)sender event:(UIControlEvent)event { 70 | NSLog(@"min value:%f\nmax value:%f\n", sender.minValue, sender.maxValue); 71 | } 72 | 73 | // set value without animation 74 | slider.maxValue = 100.0; 75 | slider.minValue = 0.0; 76 | 77 | // set value with animation 78 | [slider setMaxValue:100.0 animated:YES]; 79 | [slider setMinValue:1.0 animated:YES]; 80 | ``` 81 | 82 | 83 | You can use the component like UISlider, and set the value with `minValue` and `maxValue` properties. In the mean time, you can also set target-action to touch the event of value changing, call getters of the properties to get new value. The `value` property of super-class is the value which changed by user, it means that `value` will equal to `minValue` or `maxValue`. 84 | 85 | 使用方式类似系统自带的 UISlider,可以通过 `minValue` 和 `maxValue` 来设置控件的值。同时,可以通过设置 target-action 的方式来监听 ValueChanged 事件,并且通过这两个属性来获取到新的值。父类中的 `value` 属性代表着用户变化的那个值,这意味着 `value` 属性可能等于 `maxValue` 也可能等于 `minValue` 。 86 | 87 | ## LICENSE 88 | 89 | MIT. 90 | -------------------------------------------------------------------------------- /Slider.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Magic-Unique/DoubleThumbSlider/46d40b819a61063f2cb88c3a79dd7fc6f15fee63/Slider.gif --------------------------------------------------------------------------------