├── .DS_Store ├── FLDragView.podspec ├── FLDragView ├── UIView+drag.h └── UIView+drag.m ├── FLDragViewDemo ├── .DS_Store ├── FLSlideView.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── clarence.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ ├── clarence.xcuserdatad │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ │ ├── FLSlideView.xcscheme │ │ │ └── xcschememanagement.plist │ │ └── kongfanlie.xcuserdatad │ │ └── xcschemes │ │ ├── FLSlideView.xcscheme │ │ └── xcschememanagement.plist ├── FLSlideView.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ ├── clarence.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ │ └── kongfanlie.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist ├── FLSlideView │ ├── .DS_Store │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── FLView.h │ ├── FLView.m │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.m │ ├── main.m │ └── u=3464439138,106868108&fm=85&s=265468231A9211F71114090A0100E0E0.jpeg ├── Podfile ├── Podfile.lock └── Pods │ ├── FLDragView │ ├── FLDragView │ │ ├── UIView+drag.h │ │ └── UIView+drag.m │ ├── LICENSE │ └── README.md │ ├── Headers │ ├── Private │ │ └── FLDragView │ │ │ └── UIView+drag.h │ └── Public │ │ └── FLDragView │ │ └── UIView+drag.h │ ├── Manifest.lock │ ├── Pods.xcodeproj │ ├── project.pbxproj │ └── xcuserdata │ │ ├── clarence.xcuserdatad │ │ └── xcschemes │ │ │ ├── FLDragView.xcscheme │ │ │ ├── Pods-FLSlideView.xcscheme │ │ │ └── xcschememanagement.plist │ │ └── kongfanlie.xcuserdatad │ │ └── xcschemes │ │ ├── FLDragView.xcscheme │ │ ├── Pods-FLSlideView.xcscheme │ │ └── xcschememanagement.plist │ └── Target Support Files │ ├── FLDragView │ ├── FLDragView-dummy.m │ ├── FLDragView-prefix.pch │ └── FLDragView.xcconfig │ └── Pods-FLSlideView │ ├── Pods-FLSlideView-acknowledgements.markdown │ ├── Pods-FLSlideView-acknowledgements.plist │ ├── Pods-FLSlideView-dummy.m │ ├── Pods-FLSlideView-frameworks.sh │ ├── Pods-FLSlideView-resources.sh │ ├── Pods-FLSlideView.debug.xcconfig │ └── Pods-FLSlideView.release.xcconfig ├── LICENSE └── README.md /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitkong/FLDragView/dc773afbf121b2bb3b217b09c6626d5be7863271/.DS_Store -------------------------------------------------------------------------------- /FLDragView.podspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | Pod::Spec.new do |s| 4 | 5 | s.name = "FLDragView" 6 | s.version = "1.0.0" 7 | s.summary = "你使用过最简单最好用拖拽的view" 8 | 9 | s.homepage = "https://github.com/gitkong/FLDragView" 10 | 11 | s.license = "MIT" 12 | 13 | s.author = { "gitkong" => "13751855378@163.com" } 14 | 15 | s.platform = :ios 16 | 17 | s.source = { :git => "https://github.com/gitkong/FLDragView", :tag => "#{s.version}" } 18 | 19 | s.source_files = "FLDragView/*.{h,m}" 20 | 21 | 22 | end 23 | -------------------------------------------------------------------------------- /FLDragView/UIView+drag.h: -------------------------------------------------------------------------------- 1 | /* 2 | * author 孔凡列 3 | * 4 | * gitHub https://github.com/gitkong 5 | * cocoaChina http://code.cocoachina.com/user/ 6 | * 简书 http://www.jianshu.com/users/fe5700cfb223/latest_articles 7 | * QQ 279761135 8 | * 微信公众号 原创技术分享 9 | * 喜欢就给个like 和 star 喔~ 10 | */ 11 | 12 | #import 13 | 14 | @interface UIView (drag) 15 | /** 16 | * @author gitKong 17 | * 18 | * 是否允许拖拽,默认关闭(可以在XIB或SB中设置) 19 | */ 20 | @property (nonatomic,assign)IBInspectable BOOL fl_canDrag; 21 | /** 22 | * @author gitKong 23 | * 24 | * 是否需要边界弹簧效果,默认开启(可以在XIB或SB中设置) 25 | */ 26 | @property (nonatomic,assign)IBInspectable BOOL fl_bounces; 27 | /** 28 | * @author gitKong 29 | * 30 | * 是否需要吸附边界效果,默认开启(可以在XIB或SB中设置) 31 | */ 32 | @property (nonatomic,assign)IBInspectable BOOL fl_isAdsorb; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /FLDragView/UIView+drag.m: -------------------------------------------------------------------------------- 1 | /* 2 | * author 孔凡列 3 | * 4 | * gitHub https://github.com/gitkong 5 | * cocoaChina http://code.cocoachina.com/user/ 6 | * 简书 http://www.jianshu.com/users/fe5700cfb223/latest_articles 7 | * QQ 279761135 8 | * 微信公众号 原创技术分享 9 | * 喜欢就给个like 和 star 喔~ 10 | */ 11 | 12 | #import "UIView+drag.h" 13 | #import 14 | @interface UIView () 15 | @property (nonatomic,weak)UIPanGestureRecognizer *panG; 16 | 17 | @property (nonatomic,assign)CGFloat fl_x; 18 | 19 | @property (nonatomic,assign)CGFloat fl_y; 20 | 21 | @property (nonatomic,assign)CGFloat fl_centerX; 22 | 23 | @property (nonatomic,assign)CGFloat fl_centerY; 24 | 25 | @property (nonatomic,assign)CGFloat fl_width; 26 | 27 | @property (nonatomic,assign)CGFloat fl_height; 28 | 29 | @end 30 | 31 | @implementation UIView (drag) 32 | 33 | static char *static_fl_canDrag = "static_fl_canDrag"; 34 | static char *static_fl_bounces = "static_fl_bounces"; 35 | static char *static_fl_adsorb = "static_fl_adsorb"; 36 | static char *static_fl_panG = "static_fl_panG"; 37 | /** 38 | * @author gitKong 39 | * 40 | * 控件当前的下标 41 | */ 42 | static NSUInteger _currentIndex; 43 | /** 44 | * @author gitKong 45 | * 46 | * 防止先设置bounces 再设置 fl_canDrag 而重置fl_bounces的值 47 | */ 48 | BOOL _bounces = YES; 49 | BOOL _absorb = YES; 50 | 51 | - (void)setFl_canDrag:(BOOL)fl_canDrag{ 52 | objc_setAssociatedObject(self, &static_fl_canDrag, @(fl_canDrag), OBJC_ASSOCIATION_ASSIGN); 53 | if (fl_canDrag) { 54 | [self fl_addPanGesture]; 55 | self.fl_bounces = _bounces; 56 | self.fl_isAdsorb = _absorb; 57 | _currentIndex = [self.superview.subviews indexOfObject:self]; 58 | } 59 | else{ 60 | [self fl_removePanGesture]; 61 | } 62 | } 63 | 64 | - (BOOL)fl_canDrag{ 65 | NSNumber *flagNum = objc_getAssociatedObject(self, &static_fl_canDrag); 66 | return flagNum.boolValue; 67 | } 68 | 69 | - (void)setPanG:(UIPanGestureRecognizer *)panG{ 70 | objc_setAssociatedObject(self, &static_fl_panG, panG, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 71 | } 72 | 73 | - (UIPanGestureRecognizer *)panG{ 74 | return objc_getAssociatedObject(self, &static_fl_panG); 75 | } 76 | 77 | - (void)setFl_bounces:(BOOL)fl_bounces{ 78 | objc_setAssociatedObject(self, &static_fl_bounces, @(fl_bounces), OBJC_ASSOCIATION_ASSIGN); 79 | _bounces = fl_bounces; 80 | } 81 | 82 | - (BOOL)fl_bounces{ 83 | NSNumber *flagNum = objc_getAssociatedObject(self, &static_fl_bounces); 84 | return flagNum.boolValue; 85 | } 86 | 87 | - (void)setFl_isAdsorb:(BOOL)fl_isAdsorb{ 88 | objc_setAssociatedObject(self, &static_fl_adsorb, @(fl_isAdsorb), OBJC_ASSOCIATION_ASSIGN); 89 | _absorb = fl_isAdsorb; 90 | } 91 | 92 | - (BOOL)fl_isAdsorb{ 93 | NSNumber *flagNum = objc_getAssociatedObject(self, &static_fl_adsorb); 94 | return flagNum.boolValue; 95 | } 96 | 97 | 98 | #pragma mark -- private method 99 | 100 | - (void)fl_addPanGesture{ 101 | self.userInteractionEnabled = YES; 102 | UIPanGestureRecognizer *panG = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panOperation:)]; 103 | self.panG = panG; 104 | [self addGestureRecognizer:panG]; 105 | } 106 | 107 | - (void)fl_removePanGesture{ 108 | [self removeGestureRecognizer:self.panG]; 109 | self.panG = nil; 110 | } 111 | 112 | - (void)panOperation:(UIPanGestureRecognizer *)gesR{ 113 | 114 | CGPoint translatedPoint = [gesR translationInView:self]; 115 | CGFloat x = gesR.view.fl_centerX + translatedPoint.x; 116 | CGFloat y = gesR.view.fl_centerY + translatedPoint.y; 117 | 118 | switch (gesR.state) { 119 | case UIGestureRecognizerStateBegan:{ 120 | // 遮盖处理 121 | [[self superview] bringSubviewToFront:self]; 122 | break; 123 | } 124 | case UIGestureRecognizerStateChanged:{ 125 | if (!self.fl_bounces) { 126 | if (x < self.fl_width / 2) { 127 | x = self.fl_width / 2; 128 | } 129 | else if (x > self.superview.fl_width - self.fl_width / 2) { 130 | x = self.superview.fl_width - self.fl_width / 2; 131 | } 132 | if (y < self.fl_height / 2) { 133 | y = self.fl_width / 2; 134 | } 135 | else if(y > self.superview.fl_height - self.fl_height / 2){ 136 | y = self.superview.fl_height - self.fl_height / 2; 137 | } 138 | } 139 | gesR.view.center = CGPointMake(x, y); 140 | break; 141 | } 142 | case UIGestureRecognizerStateEnded:{ 143 | [self layoutIfNeeded]; 144 | if (y < self.fl_height / 2) { 145 | y = self.fl_width / 2; 146 | } 147 | else if(y > self.superview.fl_height - self.fl_height / 2){ 148 | y = self.superview.fl_height - self.fl_height / 2; 149 | } 150 | 151 | if (!self.fl_isAdsorb) { 152 | if (gesR.view.fl_x < self.superview.fl_x) { 153 | x = self.superview.fl_x + gesR.view.fl_width / 2; 154 | } 155 | else if (gesR.view.fl_x + gesR.view.fl_width > self.superview.fl_width){ 156 | x = self.superview.fl_width - gesR.view.fl_width / 2; 157 | } 158 | [UIView animateWithDuration:0.25 animations:^{ 159 | gesR.view.center = CGPointMake(x, y); 160 | }]; 161 | } 162 | else{ 163 | // 此时需要加上父类的x值,比较的应该是绝对位置,而不是相对位置 164 | if (gesR.view.fl_centerX + self.superview.fl_x > self.superview.fl_centerX) { 165 | [UIView animateWithDuration:0.25 animations:^{ 166 | gesR.view.center = CGPointMake(self.superview.fl_width - self.fl_width / 2, y); 167 | }]; 168 | 169 | } 170 | else{ 171 | [UIView animateWithDuration:0.25 animations:^{ 172 | gesR.view.center = CGPointMake(self.fl_width / 2, y); 173 | }]; 174 | 175 | } 176 | } 177 | // 遮盖处理,如果不遮盖,重置原来位置 178 | if (![self fl_isCover]) { 179 | [self.superview insertSubview:self atIndex:_currentIndex]; 180 | } 181 | else{ 182 | [self.superview bringSubviewToFront:self]; 183 | } 184 | break; 185 | } 186 | case UIGestureRecognizerStateCancelled:{ 187 | break; 188 | } 189 | case UIGestureRecognizerStateFailed:{ 190 | NSAssert(YES, @"手势失败"); 191 | break; 192 | } 193 | default: 194 | break; 195 | } 196 | // 重置 197 | [gesR setTranslation:CGPointMake(0, 0) inView:self]; 198 | } 199 | 200 | - (BOOL)fl_isCover{ 201 | BOOL flag = NO; 202 | for (UIView *view in self.superview.subviews) { 203 | if (view == self) continue; 204 | if ([self fl_intersectsWithView:view]) { 205 | flag = YES; 206 | } 207 | } 208 | return flag; 209 | } 210 | 211 | - (BOOL)fl_intersectsWithView:(UIView *)view{ 212 | //都先转换为相对于窗口的坐标,然后进行判断是否重合 213 | CGRect selfRect = [self convertRect:self.bounds toView:nil]; 214 | CGRect viewRect = [view convertRect:view.bounds toView:nil]; 215 | return CGRectIntersectsRect(selfRect, viewRect); 216 | } 217 | 218 | 219 | - (CGFloat)fl_x{ 220 | return self.frame.origin.x; 221 | } 222 | 223 | - (CGFloat)fl_y{ 224 | return self.frame.origin.y; 225 | } 226 | 227 | - (CGFloat)fl_centerX{ 228 | return self.center.x; 229 | } 230 | 231 | - (CGFloat)fl_centerY{ 232 | return self.center.y; 233 | } 234 | 235 | - (CGFloat)fl_width{ 236 | return self.frame.size.width; 237 | } 238 | 239 | - (CGFloat)fl_height{ 240 | return self.frame.size.height; 241 | } 242 | 243 | - (void)setFl_x:(CGFloat)fl_x{ 244 | self.frame = (CGRect){ 245 | .origin = {.x = fl_x, .y = self.fl_y}, 246 | .size = {.width = self.fl_width, .height = self.fl_height} 247 | }; 248 | } 249 | 250 | - (void)setFl_y:(CGFloat)fl_y{ 251 | self.frame = (CGRect){ 252 | .origin = {.x = self.fl_x, .y = fl_y}, 253 | .size = {.width = self.fl_width, .height = self.fl_height} 254 | }; 255 | } 256 | 257 | - (void)setFl_centerX:(CGFloat)fl_centerX{ 258 | CGPoint center = self.center; 259 | center.x = fl_centerX; 260 | self.center = center; 261 | } 262 | 263 | - (void)setFl_centerY:(CGFloat)fl_centerY{ 264 | CGPoint center = self.center; 265 | center.y = fl_centerY; 266 | self.center = center; 267 | } 268 | 269 | 270 | - (void)setFl_width:(CGFloat)fl_width{ 271 | self.frame = (CGRect){ 272 | .origin = {.x = self.fl_x, .y = self.fl_y}, 273 | .size = {.width = fl_width, .height = self.fl_height} 274 | }; 275 | } 276 | 277 | - (void)setFl_height:(CGFloat)fl_height{ 278 | self.frame = (CGRect){ 279 | .origin = {.x = self.fl_x, .y = self.fl_y}, 280 | .size = {.width = self.fl_width, .height = self.fl_height} 281 | }; 282 | } 283 | 284 | 285 | @end 286 | -------------------------------------------------------------------------------- /FLDragViewDemo/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitkong/FLDragView/dc773afbf121b2bb3b217b09c6626d5be7863271/FLDragViewDemo/.DS_Store -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 113023D91E0B6E1C006B6C98 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 113023D81E0B6E1C006B6C98 /* main.m */; }; 11 | 113023DC1E0B6E1C006B6C98 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 113023DB1E0B6E1C006B6C98 /* AppDelegate.m */; }; 12 | 113023DF1E0B6E1C006B6C98 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 113023DE1E0B6E1C006B6C98 /* ViewController.m */; }; 13 | 113023E21E0B6E1C006B6C98 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 113023E01E0B6E1C006B6C98 /* Main.storyboard */; }; 14 | 113023E41E0B6E1C006B6C98 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 113023E31E0B6E1C006B6C98 /* Assets.xcassets */; }; 15 | 113023E71E0B6E1C006B6C98 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 113023E51E0B6E1C006B6C98 /* LaunchScreen.storyboard */; }; 16 | 113024001E0BE2A8006B6C98 /* u=3464439138,106868108&fm=85&s=265468231A9211F71114090A0100E0E0.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = 113023FF1E0BE2A8006B6C98 /* u=3464439138,106868108&fm=85&s=265468231A9211F71114090A0100E0E0.jpeg */; }; 17 | 3F617BB81F4C36EB009987B2 /* FLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3F617BB71F4C36EB009987B2 /* FLView.m */; }; 18 | 523DA2D31BC546FA8AD0EF5C /* libPods-FLSlideView.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 62CF85C0326E26BDE23714A4 /* libPods-FLSlideView.a */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXFileReference section */ 22 | 113023D41E0B6E1C006B6C98 /* FLSlideView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FLSlideView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 23 | 113023D81E0B6E1C006B6C98 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 24 | 113023DA1E0B6E1C006B6C98 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 25 | 113023DB1E0B6E1C006B6C98 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 26 | 113023DD1E0B6E1C006B6C98 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 27 | 113023DE1E0B6E1C006B6C98 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 28 | 113023E11E0B6E1C006B6C98 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 29 | 113023E31E0B6E1C006B6C98 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 30 | 113023E61E0B6E1C006B6C98 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 31 | 113023E81E0B6E1C006B6C98 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32 | 113023FF1E0BE2A8006B6C98 /* u=3464439138,106868108&fm=85&s=265468231A9211F71114090A0100E0E0.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "u=3464439138,106868108&fm=85&s=265468231A9211F71114090A0100E0E0.jpeg"; sourceTree = ""; }; 33 | 3F617BB61F4C36EB009987B2 /* FLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FLView.h; sourceTree = ""; }; 34 | 3F617BB71F4C36EB009987B2 /* FLView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FLView.m; sourceTree = ""; }; 35 | 5AD13C3FC706FA055182EDD5 /* Pods-FLSlideView.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FLSlideView.release.xcconfig"; path = "Pods/Target Support Files/Pods-FLSlideView/Pods-FLSlideView.release.xcconfig"; sourceTree = ""; }; 36 | 62CF85C0326E26BDE23714A4 /* libPods-FLSlideView.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-FLSlideView.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 37 | 657656C6764C1CD11481A0A8 /* Pods-FLSlideView.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FLSlideView.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FLSlideView/Pods-FLSlideView.debug.xcconfig"; sourceTree = ""; }; 38 | /* End PBXFileReference section */ 39 | 40 | /* Begin PBXFrameworksBuildPhase section */ 41 | 113023D11E0B6E1B006B6C98 /* Frameworks */ = { 42 | isa = PBXFrameworksBuildPhase; 43 | buildActionMask = 2147483647; 44 | files = ( 45 | 523DA2D31BC546FA8AD0EF5C /* libPods-FLSlideView.a in Frameworks */, 46 | ); 47 | runOnlyForDeploymentPostprocessing = 0; 48 | }; 49 | /* End PBXFrameworksBuildPhase section */ 50 | 51 | /* Begin PBXGroup section */ 52 | 113023CB1E0B6E1B006B6C98 = { 53 | isa = PBXGroup; 54 | children = ( 55 | 113023D61E0B6E1C006B6C98 /* FLSlideView */, 56 | 113023D51E0B6E1C006B6C98 /* Products */, 57 | 14A1C8A3A9EDA8951E6C291D /* Pods */, 58 | DC4ECB2F1ED36C13B135CB61 /* Frameworks */, 59 | ); 60 | sourceTree = ""; 61 | }; 62 | 113023D51E0B6E1C006B6C98 /* Products */ = { 63 | isa = PBXGroup; 64 | children = ( 65 | 113023D41E0B6E1C006B6C98 /* FLSlideView.app */, 66 | ); 67 | name = Products; 68 | sourceTree = ""; 69 | }; 70 | 113023D61E0B6E1C006B6C98 /* FLSlideView */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | 113023DA1E0B6E1C006B6C98 /* AppDelegate.h */, 74 | 113023DB1E0B6E1C006B6C98 /* AppDelegate.m */, 75 | 113023DD1E0B6E1C006B6C98 /* ViewController.h */, 76 | 113023DE1E0B6E1C006B6C98 /* ViewController.m */, 77 | 3F617BB61F4C36EB009987B2 /* FLView.h */, 78 | 3F617BB71F4C36EB009987B2 /* FLView.m */, 79 | 113023E01E0B6E1C006B6C98 /* Main.storyboard */, 80 | 113023FF1E0BE2A8006B6C98 /* u=3464439138,106868108&fm=85&s=265468231A9211F71114090A0100E0E0.jpeg */, 81 | 113023E31E0B6E1C006B6C98 /* Assets.xcassets */, 82 | 113023E51E0B6E1C006B6C98 /* LaunchScreen.storyboard */, 83 | 113023E81E0B6E1C006B6C98 /* Info.plist */, 84 | 113023D71E0B6E1C006B6C98 /* Supporting Files */, 85 | ); 86 | path = FLSlideView; 87 | sourceTree = ""; 88 | }; 89 | 113023D71E0B6E1C006B6C98 /* Supporting Files */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | 113023D81E0B6E1C006B6C98 /* main.m */, 93 | ); 94 | name = "Supporting Files"; 95 | sourceTree = ""; 96 | }; 97 | 14A1C8A3A9EDA8951E6C291D /* Pods */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 657656C6764C1CD11481A0A8 /* Pods-FLSlideView.debug.xcconfig */, 101 | 5AD13C3FC706FA055182EDD5 /* Pods-FLSlideView.release.xcconfig */, 102 | ); 103 | name = Pods; 104 | sourceTree = ""; 105 | }; 106 | DC4ECB2F1ED36C13B135CB61 /* Frameworks */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 62CF85C0326E26BDE23714A4 /* libPods-FLSlideView.a */, 110 | ); 111 | name = Frameworks; 112 | sourceTree = ""; 113 | }; 114 | /* End PBXGroup section */ 115 | 116 | /* Begin PBXNativeTarget section */ 117 | 113023D31E0B6E1B006B6C98 /* FLSlideView */ = { 118 | isa = PBXNativeTarget; 119 | buildConfigurationList = 113023EB1E0B6E1C006B6C98 /* Build configuration list for PBXNativeTarget "FLSlideView" */; 120 | buildPhases = ( 121 | 0436FACFD487DB2D63936CB7 /* [CP] Check Pods Manifest.lock */, 122 | 113023D01E0B6E1B006B6C98 /* Sources */, 123 | 113023D11E0B6E1B006B6C98 /* Frameworks */, 124 | 113023D21E0B6E1B006B6C98 /* Resources */, 125 | A2A7C72A08F1EE95346D954A /* [CP] Embed Pods Frameworks */, 126 | 5053AF2E04EC785B1572137B /* [CP] Copy Pods Resources */, 127 | ); 128 | buildRules = ( 129 | ); 130 | dependencies = ( 131 | ); 132 | name = FLSlideView; 133 | productName = FLSlideView; 134 | productReference = 113023D41E0B6E1C006B6C98 /* FLSlideView.app */; 135 | productType = "com.apple.product-type.application"; 136 | }; 137 | /* End PBXNativeTarget section */ 138 | 139 | /* Begin PBXProject section */ 140 | 113023CC1E0B6E1B006B6C98 /* Project object */ = { 141 | isa = PBXProject; 142 | attributes = { 143 | LastUpgradeCheck = 0810; 144 | ORGANIZATIONNAME = gitKong; 145 | TargetAttributes = { 146 | 113023D31E0B6E1B006B6C98 = { 147 | CreatedOnToolsVersion = 8.1; 148 | DevelopmentTeam = GB8FE8WWF8; 149 | ProvisioningStyle = Automatic; 150 | }; 151 | }; 152 | }; 153 | buildConfigurationList = 113023CF1E0B6E1B006B6C98 /* Build configuration list for PBXProject "FLSlideView" */; 154 | compatibilityVersion = "Xcode 3.2"; 155 | developmentRegion = English; 156 | hasScannedForEncodings = 0; 157 | knownRegions = ( 158 | en, 159 | Base, 160 | ); 161 | mainGroup = 113023CB1E0B6E1B006B6C98; 162 | productRefGroup = 113023D51E0B6E1C006B6C98 /* Products */; 163 | projectDirPath = ""; 164 | projectRoot = ""; 165 | targets = ( 166 | 113023D31E0B6E1B006B6C98 /* FLSlideView */, 167 | ); 168 | }; 169 | /* End PBXProject section */ 170 | 171 | /* Begin PBXResourcesBuildPhase section */ 172 | 113023D21E0B6E1B006B6C98 /* Resources */ = { 173 | isa = PBXResourcesBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | 113023E71E0B6E1C006B6C98 /* LaunchScreen.storyboard in Resources */, 177 | 113023E41E0B6E1C006B6C98 /* Assets.xcassets in Resources */, 178 | 113024001E0BE2A8006B6C98 /* u=3464439138,106868108&fm=85&s=265468231A9211F71114090A0100E0E0.jpeg in Resources */, 179 | 113023E21E0B6E1C006B6C98 /* Main.storyboard in Resources */, 180 | ); 181 | runOnlyForDeploymentPostprocessing = 0; 182 | }; 183 | /* End PBXResourcesBuildPhase section */ 184 | 185 | /* Begin PBXShellScriptBuildPhase section */ 186 | 0436FACFD487DB2D63936CB7 /* [CP] Check Pods Manifest.lock */ = { 187 | isa = PBXShellScriptBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | ); 191 | inputPaths = ( 192 | ); 193 | name = "[CP] Check Pods Manifest.lock"; 194 | outputPaths = ( 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | shellPath = /bin/sh; 198 | shellScript = "diff \"${PODS_ROOT}/../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"; 199 | showEnvVarsInLog = 0; 200 | }; 201 | 5053AF2E04EC785B1572137B /* [CP] Copy Pods Resources */ = { 202 | isa = PBXShellScriptBuildPhase; 203 | buildActionMask = 2147483647; 204 | files = ( 205 | ); 206 | inputPaths = ( 207 | ); 208 | name = "[CP] Copy Pods Resources"; 209 | outputPaths = ( 210 | ); 211 | runOnlyForDeploymentPostprocessing = 0; 212 | shellPath = /bin/sh; 213 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FLSlideView/Pods-FLSlideView-resources.sh\"\n"; 214 | showEnvVarsInLog = 0; 215 | }; 216 | A2A7C72A08F1EE95346D954A /* [CP] Embed Pods Frameworks */ = { 217 | isa = PBXShellScriptBuildPhase; 218 | buildActionMask = 2147483647; 219 | files = ( 220 | ); 221 | inputPaths = ( 222 | ); 223 | name = "[CP] Embed Pods Frameworks"; 224 | outputPaths = ( 225 | ); 226 | runOnlyForDeploymentPostprocessing = 0; 227 | shellPath = /bin/sh; 228 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FLSlideView/Pods-FLSlideView-frameworks.sh\"\n"; 229 | showEnvVarsInLog = 0; 230 | }; 231 | /* End PBXShellScriptBuildPhase section */ 232 | 233 | /* Begin PBXSourcesBuildPhase section */ 234 | 113023D01E0B6E1B006B6C98 /* Sources */ = { 235 | isa = PBXSourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | 3F617BB81F4C36EB009987B2 /* FLView.m in Sources */, 239 | 113023DF1E0B6E1C006B6C98 /* ViewController.m in Sources */, 240 | 113023DC1E0B6E1C006B6C98 /* AppDelegate.m in Sources */, 241 | 113023D91E0B6E1C006B6C98 /* main.m in Sources */, 242 | ); 243 | runOnlyForDeploymentPostprocessing = 0; 244 | }; 245 | /* End PBXSourcesBuildPhase section */ 246 | 247 | /* Begin PBXVariantGroup section */ 248 | 113023E01E0B6E1C006B6C98 /* Main.storyboard */ = { 249 | isa = PBXVariantGroup; 250 | children = ( 251 | 113023E11E0B6E1C006B6C98 /* Base */, 252 | ); 253 | name = Main.storyboard; 254 | sourceTree = ""; 255 | }; 256 | 113023E51E0B6E1C006B6C98 /* LaunchScreen.storyboard */ = { 257 | isa = PBXVariantGroup; 258 | children = ( 259 | 113023E61E0B6E1C006B6C98 /* Base */, 260 | ); 261 | name = LaunchScreen.storyboard; 262 | sourceTree = ""; 263 | }; 264 | /* End PBXVariantGroup section */ 265 | 266 | /* Begin XCBuildConfiguration section */ 267 | 113023E91E0B6E1C006B6C98 /* Debug */ = { 268 | isa = XCBuildConfiguration; 269 | buildSettings = { 270 | ALWAYS_SEARCH_USER_PATHS = NO; 271 | CLANG_ANALYZER_NONNULL = YES; 272 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 273 | CLANG_CXX_LIBRARY = "libc++"; 274 | CLANG_ENABLE_MODULES = YES; 275 | CLANG_ENABLE_OBJC_ARC = YES; 276 | CLANG_WARN_BOOL_CONVERSION = YES; 277 | CLANG_WARN_CONSTANT_CONVERSION = YES; 278 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 279 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 280 | CLANG_WARN_EMPTY_BODY = YES; 281 | CLANG_WARN_ENUM_CONVERSION = YES; 282 | CLANG_WARN_INFINITE_RECURSION = YES; 283 | CLANG_WARN_INT_CONVERSION = YES; 284 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 285 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 286 | CLANG_WARN_UNREACHABLE_CODE = YES; 287 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 288 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 289 | COPY_PHASE_STRIP = NO; 290 | DEBUG_INFORMATION_FORMAT = dwarf; 291 | ENABLE_STRICT_OBJC_MSGSEND = YES; 292 | ENABLE_TESTABILITY = YES; 293 | GCC_C_LANGUAGE_STANDARD = gnu99; 294 | GCC_DYNAMIC_NO_PIC = NO; 295 | GCC_NO_COMMON_BLOCKS = YES; 296 | GCC_OPTIMIZATION_LEVEL = 0; 297 | GCC_PREPROCESSOR_DEFINITIONS = ( 298 | "DEBUG=1", 299 | "$(inherited)", 300 | ); 301 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 302 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 303 | GCC_WARN_UNDECLARED_SELECTOR = YES; 304 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 305 | GCC_WARN_UNUSED_FUNCTION = YES; 306 | GCC_WARN_UNUSED_VARIABLE = YES; 307 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 308 | MTL_ENABLE_DEBUG_INFO = YES; 309 | ONLY_ACTIVE_ARCH = YES; 310 | SDKROOT = iphoneos; 311 | }; 312 | name = Debug; 313 | }; 314 | 113023EA1E0B6E1C006B6C98 /* Release */ = { 315 | isa = XCBuildConfiguration; 316 | buildSettings = { 317 | ALWAYS_SEARCH_USER_PATHS = NO; 318 | CLANG_ANALYZER_NONNULL = YES; 319 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 320 | CLANG_CXX_LIBRARY = "libc++"; 321 | CLANG_ENABLE_MODULES = YES; 322 | CLANG_ENABLE_OBJC_ARC = YES; 323 | CLANG_WARN_BOOL_CONVERSION = YES; 324 | CLANG_WARN_CONSTANT_CONVERSION = YES; 325 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 326 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 327 | CLANG_WARN_EMPTY_BODY = YES; 328 | CLANG_WARN_ENUM_CONVERSION = YES; 329 | CLANG_WARN_INFINITE_RECURSION = YES; 330 | CLANG_WARN_INT_CONVERSION = YES; 331 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 332 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 333 | CLANG_WARN_UNREACHABLE_CODE = YES; 334 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 335 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 336 | COPY_PHASE_STRIP = NO; 337 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 338 | ENABLE_NS_ASSERTIONS = NO; 339 | ENABLE_STRICT_OBJC_MSGSEND = YES; 340 | GCC_C_LANGUAGE_STANDARD = gnu99; 341 | GCC_NO_COMMON_BLOCKS = YES; 342 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 343 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 344 | GCC_WARN_UNDECLARED_SELECTOR = YES; 345 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 346 | GCC_WARN_UNUSED_FUNCTION = YES; 347 | GCC_WARN_UNUSED_VARIABLE = YES; 348 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 349 | MTL_ENABLE_DEBUG_INFO = NO; 350 | SDKROOT = iphoneos; 351 | VALIDATE_PRODUCT = YES; 352 | }; 353 | name = Release; 354 | }; 355 | 113023EC1E0B6E1C006B6C98 /* Debug */ = { 356 | isa = XCBuildConfiguration; 357 | baseConfigurationReference = 657656C6764C1CD11481A0A8 /* Pods-FLSlideView.debug.xcconfig */; 358 | buildSettings = { 359 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 360 | DEVELOPMENT_TEAM = GB8FE8WWF8; 361 | INFOPLIST_FILE = FLSlideView/Info.plist; 362 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 363 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 364 | PRODUCT_BUNDLE_IDENTIFIER = gitKong.FLSlideView; 365 | PRODUCT_NAME = "$(TARGET_NAME)"; 366 | }; 367 | name = Debug; 368 | }; 369 | 113023ED1E0B6E1C006B6C98 /* Release */ = { 370 | isa = XCBuildConfiguration; 371 | baseConfigurationReference = 5AD13C3FC706FA055182EDD5 /* Pods-FLSlideView.release.xcconfig */; 372 | buildSettings = { 373 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 374 | DEVELOPMENT_TEAM = GB8FE8WWF8; 375 | INFOPLIST_FILE = FLSlideView/Info.plist; 376 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 377 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 378 | PRODUCT_BUNDLE_IDENTIFIER = gitKong.FLSlideView; 379 | PRODUCT_NAME = "$(TARGET_NAME)"; 380 | }; 381 | name = Release; 382 | }; 383 | /* End XCBuildConfiguration section */ 384 | 385 | /* Begin XCConfigurationList section */ 386 | 113023CF1E0B6E1B006B6C98 /* Build configuration list for PBXProject "FLSlideView" */ = { 387 | isa = XCConfigurationList; 388 | buildConfigurations = ( 389 | 113023E91E0B6E1C006B6C98 /* Debug */, 390 | 113023EA1E0B6E1C006B6C98 /* Release */, 391 | ); 392 | defaultConfigurationIsVisible = 0; 393 | defaultConfigurationName = Release; 394 | }; 395 | 113023EB1E0B6E1C006B6C98 /* Build configuration list for PBXNativeTarget "FLSlideView" */ = { 396 | isa = XCConfigurationList; 397 | buildConfigurations = ( 398 | 113023EC1E0B6E1C006B6C98 /* Debug */, 399 | 113023ED1E0B6E1C006B6C98 /* Release */, 400 | ); 401 | defaultConfigurationIsVisible = 0; 402 | defaultConfigurationName = Release; 403 | }; 404 | /* End XCConfigurationList section */ 405 | }; 406 | rootObject = 113023CC1E0B6E1B006B6C98 /* Project object */; 407 | } 408 | -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView.xcodeproj/project.xcworkspace/xcuserdata/clarence.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitkong/FLDragView/dc773afbf121b2bb3b217b09c6626d5be7863271/FLDragViewDemo/FLSlideView.xcodeproj/project.xcworkspace/xcuserdata/clarence.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView.xcodeproj/xcuserdata/clarence.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView.xcodeproj/xcuserdata/clarence.xcuserdatad/xcschemes/FLSlideView.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView.xcodeproj/xcuserdata/clarence.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | FLSlideView.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 113023D31E0B6E1B006B6C98 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView.xcodeproj/xcuserdata/kongfanlie.xcuserdatad/xcschemes/FLSlideView.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView.xcodeproj/xcuserdata/kongfanlie.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | FLSlideView.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 113023D31E0B6E1B006B6C98 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView.xcworkspace/xcuserdata/clarence.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitkong/FLDragView/dc773afbf121b2bb3b217b09c6626d5be7863271/FLDragViewDemo/FLSlideView.xcworkspace/xcuserdata/clarence.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView.xcworkspace/xcuserdata/kongfanlie.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitkong/FLDragView/dc773afbf121b2bb3b217b09c6626d5be7863271/FLDragViewDemo/FLSlideView.xcworkspace/xcuserdata/kongfanlie.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView.xcworkspace/xcuserdata/kongfanlie.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitkong/FLDragView/dc773afbf121b2bb3b217b09c6626d5be7863271/FLDragViewDemo/FLSlideView/.DS_Store -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // FLSlideView 4 | // 5 | // Created by clarence on 16/12/22. 6 | // Copyright © 2016年 gitKong. 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 | -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // FLSlideView 4 | // 5 | // Created by clarence on 16/12/22. 6 | // Copyright © 2016年 gitKong. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ViewController.h" 11 | 12 | @interface AppDelegate () 13 | 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | 19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 20 | // Override point for customization after application launch. 21 | self.window = [[UIWindow alloc] init]; 22 | ViewController *vc = [[ViewController alloc] init]; 23 | vc.view.backgroundColor = [UIColor whiteColor]; 24 | self.window.rootViewController = vc; 25 | [self.window makeKeyAndVisible]; 26 | return YES; 27 | } 28 | 29 | 30 | - (void)applicationWillResignActive:(UIApplication *)application { 31 | // 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. 32 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 33 | } 34 | 35 | 36 | - (void)applicationDidEnterBackground:(UIApplication *)application { 37 | // 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. 38 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 39 | } 40 | 41 | 42 | - (void)applicationWillEnterForeground:(UIApplication *)application { 43 | // 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. 44 | } 45 | 46 | 47 | - (void)applicationDidBecomeActive:(UIApplication *)application { 48 | // 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. 49 | } 50 | 51 | 52 | - (void)applicationWillTerminate:(UIApplication *)application { 53 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 54 | } 55 | 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView/FLView.h: -------------------------------------------------------------------------------- 1 | // 2 | // FLView.h 3 | // FLSlideView 4 | // 5 | // Created by 孔凡列 on 2017/8/22. 6 | // Copyright © 2017年 gitKong. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FLView : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView/FLView.m: -------------------------------------------------------------------------------- 1 | // 2 | // FLView.m 3 | // FLSlideView 4 | // 5 | // Created by 孔凡列 on 2017/8/22. 6 | // Copyright © 2017年 gitKong. All rights reserved. 7 | // 8 | 9 | #import "FLView.h" 10 | 11 | @implementation FLView 12 | 13 | - (instancetype)initWithCoder:(NSCoder *)aDecoder { 14 | if (self = [super initWithCoder:aDecoder]) { 15 | // NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(test) userInfo:nil repeats:YES]; 16 | // [[NSRunLoop currentRunLoop] addTimer:timer forMode:NSRunLoopCommonModes]; 17 | } 18 | return self; 19 | } 20 | 21 | - (instancetype)initWithFrame:(CGRect)frame { 22 | if (self = [super initWithFrame:frame]) { 23 | // NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(test) userInfo:nil repeats:YES]; 24 | // [[NSRunLoop currentRunLoop] addTimer:timer forMode:NSRunLoopCommonModes]; 25 | } 26 | return self; 27 | } 28 | 29 | - (void)test { 30 | NSLog(@"text"); 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIRequiredDeviceCapabilities 26 | 27 | armv7 28 | 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | NSAppTransportSecurity 36 | 37 | NSAllowsArbitraryLoads 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // FLSlideView 4 | // 5 | // Created by clarence on 16/12/22. 6 | // Copyright © 2016年 gitKong. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // FLSlideView 4 | // 5 | // Created by clarence on 16/12/22. 6 | // Copyright © 2016年 gitKong. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "UIView+drag.h" 11 | #import "FLView.h" 12 | #import 13 | @interface ViewController () 14 | 15 | @property (nonatomic,weak)UIView *firstView; 16 | @property (nonatomic, strong) AVPlayer *player; 17 | @property (nonatomic, strong) AVPlayerLayer * playerLayer; 18 | @end 19 | 20 | @implementation ViewController 21 | 22 | - (void)viewDidLoad { 23 | [super viewDidLoad]; 24 | // Do any additional setup after loading the view, typically from a nib. 25 | self.title = @"gitkong"; 26 | self.view.backgroundColor = [UIColor redColor]; 27 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 64, 100, 100)]; 28 | view.backgroundColor = [UIColor grayColor]; 29 | view.fl_isAdsorb = NO; 30 | view.fl_bounces = YES; 31 | view.fl_canSlide = YES; 32 | 33 | 34 | self.firstView = view; 35 | 36 | UISlider *slider = [[UISlider alloc] initWithFrame:CGRectMake(0, 0, 60, 30)]; 37 | [view addSubview:slider]; 38 | [self.view addSubview:view]; 39 | 40 | UIView *view1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 300, 300)]; 41 | view1.center = self.view.center; 42 | NSLog(@"vc = %.2lf",view1.frame.origin.x); 43 | view1.backgroundColor = [UIColor lightGrayColor]; 44 | [self.view addSubview:view1]; 45 | 46 | UIView *view2 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)]; 47 | // view2.backgroundColor = [UIColor redColor]; 48 | 49 | 50 | view2.fl_canSlide = YES; 51 | view2.fl_bounces = NO; 52 | view2.fl_isAdsorb = YES; 53 | [view1 addSubview:view2]; 54 | 55 | 56 | self.player = [AVPlayer playerWithURL:[NSURL URLWithString:@"http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"]]; 57 | [self.player play]; 58 | self.player.usesExternalPlaybackWhileExternalScreenIsActive=YES; 59 | self.playerLayer=[[AVPlayerLayer alloc]init]; 60 | self.playerLayer.backgroundColor=[UIColor blackColor].CGColor; 61 | self.playerLayer.player=self.player; 62 | self.playerLayer.frame=view2.bounds; 63 | [self.playerLayer displayIfNeeded]; 64 | [view2.layer insertSublayer:self.playerLayer atIndex:0]; 65 | self.playerLayer.videoGravity=AVLayerVideoGravityResizeAspect; 66 | 67 | FLView *view3 = [[FLView alloc] initWithFrame:CGRectMake(250, 0, 50, 50)]; 68 | view3.backgroundColor = [UIColor greenColor]; 69 | 70 | view3.fl_canSlide = YES; 71 | view3.fl_bounces = YES; 72 | view3.fl_isAdsorb = YES; 73 | [view1 addSubview:view3]; 74 | 75 | } 76 | 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // FLSlideView 4 | // 5 | // Created by clarence on 16/12/22. 6 | // Copyright © 2016年 gitKong. 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 | -------------------------------------------------------------------------------- /FLDragViewDemo/FLSlideView/u=3464439138,106868108&fm=85&s=265468231A9211F71114090A0100E0E0.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gitkong/FLDragView/dc773afbf121b2bb3b217b09c6626d5be7863271/FLDragViewDemo/FLSlideView/u=3464439138,106868108&fm=85&s=265468231A9211F71114090A0100E0E0.jpeg -------------------------------------------------------------------------------- /FLDragViewDemo/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'FLSlideView' 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 FLSlideView 9 | 10 | pod 'FLDragView' 11 | 12 | end 13 | -------------------------------------------------------------------------------- /FLDragViewDemo/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FLDragView (1.0.0) 3 | 4 | DEPENDENCIES: 5 | - FLDragView 6 | 7 | SPEC CHECKSUMS: 8 | FLDragView: 7bc914414b9ef1429348fbb969a9136e7ae4bd30 9 | 10 | PODFILE CHECKSUM: 15b08abdfe73f76df6c47307eb2c31c3977c1d5d 11 | 12 | COCOAPODS: 1.1.1 13 | -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/FLDragView/FLDragView/UIView+drag.h: -------------------------------------------------------------------------------- 1 | /* 2 | * author 孔凡列 3 | * 4 | * gitHub https://github.com/gitkong 5 | * cocoaChina http://code.cocoachina.com/user/ 6 | * 简书 http://www.jianshu.com/users/fe5700cfb223/latest_articles 7 | * QQ 279761135 8 | * 微信公众号 原创技术分享 9 | * 喜欢就给个like 和 star 喔~ 10 | */ 11 | 12 | #import 13 | 14 | @interface UIView (drag) 15 | /** 16 | * @author gitKong 17 | * 18 | * 是否允许拖拽,默认关闭(可以在XIB或SB中设置) 19 | */ 20 | @property (nonatomic,assign)IBInspectable BOOL fl_canSlide; 21 | /** 22 | * @author gitKong 23 | * 24 | * 是否需要边界弹簧效果,默认开启(可以在XIB或SB中设置) 25 | */ 26 | @property (nonatomic,assign)IBInspectable BOOL fl_bounces; 27 | /** 28 | * @author gitKong 29 | * 30 | * 是否需要吸附边界效果,默认开启(可以在XIB或SB中设置) 31 | */ 32 | @property (nonatomic,assign)IBInspectable BOOL fl_isAdsorb; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/FLDragView/FLDragView/UIView+drag.m: -------------------------------------------------------------------------------- 1 | /* 2 | * author 孔凡列 3 | * 4 | * gitHub https://github.com/gitkong 5 | * cocoaChina http://code.cocoachina.com/user/ 6 | * 简书 http://www.jianshu.com/users/fe5700cfb223/latest_articles 7 | * QQ 279761135 8 | * 微信公众号 原创技术分享 9 | * 喜欢就给个like 和 star 喔~ 10 | */ 11 | 12 | #import "UIView+drag.h" 13 | #import 14 | @interface UIView () 15 | @property (nonatomic,weak)UIPanGestureRecognizer *panG; 16 | 17 | @property (nonatomic,assign)CGFloat fl_x; 18 | 19 | @property (nonatomic,assign)CGFloat fl_y; 20 | 21 | @property (nonatomic,assign)CGFloat fl_centerX; 22 | 23 | @property (nonatomic,assign)CGFloat fl_centerY; 24 | 25 | @property (nonatomic,assign)CGFloat fl_width; 26 | 27 | @property (nonatomic,assign)CGFloat fl_height; 28 | 29 | @end 30 | 31 | @implementation UIView (drag) 32 | 33 | static char *static_fl_canSlider = "static_fl_canSlider"; 34 | static char *static_fl_bounces = "static_fl_bounces"; 35 | static char *static_fl_adsorb = "static_fl_adsorb"; 36 | static char *static_fl_panG = "static_fl_panG"; 37 | /** 38 | * @author gitKong 39 | * 40 | * 控件当前的下标 41 | */ 42 | static NSUInteger _currentIndex; 43 | /** 44 | * @author gitKong 45 | * 46 | * 防止先设置bounces 再设置 fl_canSlide 而重置fl_bounces的值 47 | */ 48 | BOOL _bounces = YES; 49 | BOOL _absorb = YES; 50 | 51 | - (void)setFl_canSlide:(BOOL)fl_canSlide{ 52 | objc_setAssociatedObject(self, &static_fl_canSlider, @(fl_canSlide), OBJC_ASSOCIATION_ASSIGN); 53 | if (fl_canSlide) { 54 | [self fl_addPanGesture]; 55 | self.fl_bounces = _bounces; 56 | self.fl_isAdsorb = _absorb; 57 | _currentIndex = [self.superview.subviews indexOfObject:self]; 58 | } 59 | else{ 60 | [self fl_removePanGesture]; 61 | } 62 | } 63 | 64 | - (BOOL)fl_canSlide{ 65 | NSNumber *flagNum = objc_getAssociatedObject(self, &static_fl_canSlider); 66 | return flagNum.boolValue; 67 | } 68 | 69 | - (void)setPanG:(UIPanGestureRecognizer *)panG{ 70 | objc_setAssociatedObject(self, &static_fl_panG, panG, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 71 | } 72 | 73 | - (UIPanGestureRecognizer *)panG{ 74 | return objc_getAssociatedObject(self, &static_fl_panG); 75 | } 76 | 77 | - (void)setFl_bounces:(BOOL)fl_bounces{ 78 | objc_setAssociatedObject(self, &static_fl_bounces, @(fl_bounces), OBJC_ASSOCIATION_ASSIGN); 79 | _bounces = fl_bounces; 80 | } 81 | 82 | - (BOOL)fl_bounces{ 83 | NSNumber *flagNum = objc_getAssociatedObject(self, &static_fl_bounces); 84 | return flagNum.boolValue; 85 | } 86 | 87 | - (void)setFl_isAdsorb:(BOOL)fl_isAdsorb{ 88 | objc_setAssociatedObject(self, &static_fl_adsorb, @(fl_isAdsorb), OBJC_ASSOCIATION_ASSIGN); 89 | _absorb = fl_isAdsorb; 90 | } 91 | 92 | - (BOOL)fl_isAdsorb{ 93 | NSNumber *flagNum = objc_getAssociatedObject(self, &static_fl_adsorb); 94 | return flagNum.boolValue; 95 | } 96 | 97 | #pragma mark -- private method 98 | 99 | - (void)fl_addPanGesture{ 100 | self.userInteractionEnabled = YES; 101 | UIPanGestureRecognizer *panG = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panOperation:)]; 102 | self.panG = panG; 103 | [self addGestureRecognizer:panG]; 104 | } 105 | 106 | - (void)fl_removePanGesture{ 107 | [self removeGestureRecognizer:self.panG]; 108 | self.panG = nil; 109 | } 110 | 111 | - (void)panOperation:(UIPanGestureRecognizer *)gesR{ 112 | 113 | CGPoint translatedPoint = [gesR translationInView:self]; 114 | CGFloat x = gesR.view.fl_centerX + translatedPoint.x; 115 | CGFloat y = gesR.view.fl_centerY + translatedPoint.y; 116 | 117 | switch (gesR.state) { 118 | case UIGestureRecognizerStateBegan:{ 119 | // 遮盖处理 120 | [[self superview] bringSubviewToFront:self]; 121 | break; 122 | } 123 | case UIGestureRecognizerStateChanged:{ 124 | if (!self.fl_bounces) { 125 | if (x < self.fl_width / 2) { 126 | x = self.fl_width / 2; 127 | } 128 | else if (x > self.superview.fl_width - self.fl_width / 2) { 129 | x = self.superview.fl_width - self.fl_width / 2; 130 | } 131 | if (y < self.fl_height / 2) { 132 | y = self.fl_width / 2; 133 | } 134 | else if(y > self.superview.fl_height - self.fl_height / 2){ 135 | y = self.superview.fl_height - self.fl_height / 2; 136 | } 137 | } 138 | gesR.view.center = CGPointMake(x, y); 139 | break; 140 | } 141 | case UIGestureRecognizerStateEnded:{ 142 | 143 | if (y < self.fl_height / 2) { 144 | y = self.fl_width / 2; 145 | } 146 | else if(y > self.superview.fl_height - self.fl_height / 2){ 147 | y = self.superview.fl_height - self.fl_height / 2; 148 | } 149 | 150 | if (!self.fl_isAdsorb) { 151 | if (gesR.view.fl_x < self.superview.fl_x) { 152 | x = self.superview.fl_x + gesR.view.fl_width / 2; 153 | } 154 | else if (gesR.view.fl_x + gesR.view.fl_width > self.superview.fl_width){ 155 | x = self.superview.fl_width - gesR.view.fl_width / 2; 156 | } 157 | [UIView animateWithDuration:0.25 animations:^{ 158 | gesR.view.center = CGPointMake(x, y); 159 | }]; 160 | } 161 | else{ 162 | // 此时需要加上父类的x值,比较的应该是绝对位置,而不是相对位置 163 | if (gesR.view.fl_centerX + self.superview.fl_x > self.superview.fl_centerX) { 164 | [UIView animateWithDuration:0.25 animations:^{ 165 | gesR.view.center = CGPointMake(self.superview.fl_width - self.fl_width / 2, y); 166 | }]; 167 | 168 | } 169 | else{ 170 | [UIView animateWithDuration:0.25 animations:^{ 171 | gesR.view.center = CGPointMake(self.fl_width / 2, y); 172 | }]; 173 | 174 | } 175 | } 176 | // 遮盖处理,如果不遮盖,重置原来位置 177 | if (![self fl_isCover]) { 178 | [self.superview insertSubview:self atIndex:_currentIndex]; 179 | } 180 | else{ 181 | [self.superview bringSubviewToFront:self]; 182 | } 183 | break; 184 | } 185 | case UIGestureRecognizerStateCancelled:{ 186 | break; 187 | } 188 | case UIGestureRecognizerStateFailed:{ 189 | NSAssert(YES, @"手势失败"); 190 | break; 191 | } 192 | default: 193 | break; 194 | } 195 | // 重置 196 | [gesR setTranslation:CGPointMake(0, 0) inView:self]; 197 | } 198 | 199 | - (BOOL)fl_isCover{ 200 | BOOL flag = NO; 201 | for (UIView *view in self.superview.subviews) { 202 | if (view == self) continue; 203 | if ([self fl_intersectsWithView:view]) { 204 | flag = YES; 205 | } 206 | } 207 | return flag; 208 | } 209 | 210 | - (BOOL)fl_intersectsWithView:(UIView *)view{ 211 | //都先转换为相对于窗口的坐标,然后进行判断是否重合 212 | CGRect selfRect = [self convertRect:self.bounds toView:nil]; 213 | CGRect viewRect = [view convertRect:view.bounds toView:nil]; 214 | return CGRectIntersectsRect(selfRect, viewRect); 215 | } 216 | 217 | 218 | - (CGFloat)fl_x{ 219 | return self.frame.origin.x; 220 | } 221 | 222 | - (CGFloat)fl_y{ 223 | return self.frame.origin.y; 224 | } 225 | 226 | - (CGFloat)fl_centerX{ 227 | return self.center.x; 228 | } 229 | 230 | - (CGFloat)fl_centerY{ 231 | return self.center.y; 232 | } 233 | 234 | - (CGFloat)fl_width{ 235 | return self.frame.size.width; 236 | } 237 | 238 | - (CGFloat)fl_height{ 239 | return self.frame.size.height; 240 | } 241 | 242 | - (void)setFl_x:(CGFloat)fl_x{ 243 | self.frame = (CGRect){ 244 | .origin = {.x = fl_x, .y = self.fl_y}, 245 | .size = {.width = self.fl_width, .height = self.fl_height} 246 | }; 247 | } 248 | 249 | - (void)setFl_y:(CGFloat)fl_y{ 250 | self.frame = (CGRect){ 251 | .origin = {.x = self.fl_x, .y = fl_y}, 252 | .size = {.width = self.fl_width, .height = self.fl_height} 253 | }; 254 | } 255 | 256 | - (void)setFl_centerX:(CGFloat)fl_centerX{ 257 | CGPoint center = self.center; 258 | center.x = fl_centerX; 259 | self.center = center; 260 | } 261 | 262 | - (void)setFl_centerY:(CGFloat)fl_centerY{ 263 | CGPoint center = self.center; 264 | center.y = fl_centerY; 265 | self.center = center; 266 | } 267 | 268 | 269 | - (void)setFl_width:(CGFloat)fl_width{ 270 | self.frame = (CGRect){ 271 | .origin = {.x = self.fl_x, .y = self.fl_y}, 272 | .size = {.width = fl_width, .height = self.fl_height} 273 | }; 274 | } 275 | 276 | - (void)setFl_height:(CGFloat)fl_height{ 277 | self.frame = (CGRect){ 278 | .origin = {.x = self.fl_x, .y = self.fl_y}, 279 | .size = {.width = self.fl_width, .height = self.fl_height} 280 | }; 281 | } 282 | 283 | 284 | @end 285 | -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/FLDragView/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Clarencelie 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 | -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/FLDragView/README.md: -------------------------------------------------------------------------------- 1 | # FLDragView 2 | 拖拽的view 3 | -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/Headers/Private/FLDragView/UIView+drag.h: -------------------------------------------------------------------------------- 1 | ../../../FLDragView/FLDragView/UIView+drag.h -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/Headers/Public/FLDragView/UIView+drag.h: -------------------------------------------------------------------------------- 1 | ../../../FLDragView/FLDragView/UIView+drag.h -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FLDragView (1.0.0) 3 | 4 | DEPENDENCIES: 5 | - FLDragView 6 | 7 | SPEC CHECKSUMS: 8 | FLDragView: 7bc914414b9ef1429348fbb969a9136e7ae4bd30 9 | 10 | PODFILE CHECKSUM: 15b08abdfe73f76df6c47307eb2c31c3977c1d5d 11 | 12 | COCOAPODS: 1.1.1 13 | -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0AE908E78DFDF49A9073BB71A063DE08 /* UIView+drag.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B62C0FB5686A45EAE2737C73FC1E904 /* UIView+drag.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; 11 | 483E9090AA2F269E6F53F781813A6DCB /* UIView+drag.h in Headers */ = {isa = PBXBuildFile; fileRef = 51B755EAED22E1DCBEEBD8A66A9E59C0 /* UIView+drag.h */; settings = {ATTRIBUTES = (Public, ); }; }; 12 | 583419801D95092E7C8CCAD4589917EF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; 13 | 822C40A72E16A4142BA53BB90C3E188D /* Pods-FLSlideView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9AE369C850FA2B970536057905D9F856 /* Pods-FLSlideView-dummy.m */; }; 14 | B04034336853B4E82D5B712E675739CA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; 15 | B13F2D623B77C33E54B140A729572FCE /* FLDragView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 91827961263DFC7419ED3FBBA07A3CCA /* FLDragView-dummy.m */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXContainerItemProxy section */ 19 | D89F789CE35967156FA8FC3542E121A8 /* PBXContainerItemProxy */ = { 20 | isa = PBXContainerItemProxy; 21 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 22 | proxyType = 1; 23 | remoteGlobalIDString = DF9A2B22C49AF77664BD5E03373E5577; 24 | remoteInfo = FLDragView; 25 | }; 26 | /* End PBXContainerItemProxy section */ 27 | 28 | /* Begin PBXFileReference section */ 29 | 09139237F738AF09376B29B608EF24BB /* Pods-FLSlideView-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-FLSlideView-acknowledgements.plist"; sourceTree = ""; }; 30 | 1DB142CAC8F6BCC00EC1495BF4743234 /* Pods-FLSlideView.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-FLSlideView.release.xcconfig"; sourceTree = ""; }; 31 | 26FCDA6AA8E02E91EF24294A9980FE47 /* Pods-FLSlideView.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-FLSlideView.debug.xcconfig"; sourceTree = ""; }; 32 | 34A7138B1CB778139334268FBF29A5B2 /* libFLDragView.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libFLDragView.a; path = libFLDragView.a; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | 46967509A1408CF34123A789335DEF11 /* FLDragView-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "FLDragView-prefix.pch"; sourceTree = ""; }; 34 | 51B755EAED22E1DCBEEBD8A66A9E59C0 /* UIView+drag.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIView+drag.h"; path = "FLDragView/UIView+drag.h"; sourceTree = ""; }; 35 | 585A6B6B26FEC335FB91D5654F4E293F /* Pods-FLSlideView-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-FLSlideView-frameworks.sh"; sourceTree = ""; }; 36 | 67896A6699599659A61575472D14A748 /* Pods-FLSlideView-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-FLSlideView-acknowledgements.markdown"; sourceTree = ""; }; 37 | 8EFCF3DFB87926076F7092092BF3898A /* Pods-FLSlideView-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-FLSlideView-resources.sh"; sourceTree = ""; }; 38 | 91827961263DFC7419ED3FBBA07A3CCA /* FLDragView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "FLDragView-dummy.m"; sourceTree = ""; }; 39 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 40 | 9AE369C850FA2B970536057905D9F856 /* Pods-FLSlideView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-FLSlideView-dummy.m"; sourceTree = ""; }; 41 | 9B62C0FB5686A45EAE2737C73FC1E904 /* UIView+drag.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIView+drag.m"; path = "FLDragView/UIView+drag.m"; sourceTree = ""; }; 42 | B078985F31D3C22170A6DE641F7D9A02 /* FLDragView.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = FLDragView.xcconfig; sourceTree = ""; }; 43 | CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 44 | FFE904EF1BED14C224ADAD23786C99D1 /* libPods-FLSlideView.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-FLSlideView.a"; path = "libPods-FLSlideView.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 4CBF94A6CA55F157B3067F45A8304233 /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | 583419801D95092E7C8CCAD4589917EF /* Foundation.framework in Frameworks */, 53 | ); 54 | runOnlyForDeploymentPostprocessing = 0; 55 | }; 56 | A72B58DBE288AB041712D5B1CFE99437 /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | B04034336853B4E82D5B712E675739CA /* Foundation.framework in Frameworks */, 61 | ); 62 | runOnlyForDeploymentPostprocessing = 0; 63 | }; 64 | /* End PBXFrameworksBuildPhase section */ 65 | 66 | /* Begin PBXGroup section */ 67 | 1E1ACDA6A88FBF009F413461B1D605AB /* Pods-FLSlideView */ = { 68 | isa = PBXGroup; 69 | children = ( 70 | 67896A6699599659A61575472D14A748 /* Pods-FLSlideView-acknowledgements.markdown */, 71 | 09139237F738AF09376B29B608EF24BB /* Pods-FLSlideView-acknowledgements.plist */, 72 | 9AE369C850FA2B970536057905D9F856 /* Pods-FLSlideView-dummy.m */, 73 | 585A6B6B26FEC335FB91D5654F4E293F /* Pods-FLSlideView-frameworks.sh */, 74 | 8EFCF3DFB87926076F7092092BF3898A /* Pods-FLSlideView-resources.sh */, 75 | 26FCDA6AA8E02E91EF24294A9980FE47 /* Pods-FLSlideView.debug.xcconfig */, 76 | 1DB142CAC8F6BCC00EC1495BF4743234 /* Pods-FLSlideView.release.xcconfig */, 77 | ); 78 | name = "Pods-FLSlideView"; 79 | path = "Target Support Files/Pods-FLSlideView"; 80 | sourceTree = ""; 81 | }; 82 | 5360E7100214C00395C87DE485EE7165 /* Targets Support Files */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | 1E1ACDA6A88FBF009F413461B1D605AB /* Pods-FLSlideView */, 86 | ); 87 | name = "Targets Support Files"; 88 | sourceTree = ""; 89 | }; 90 | 67C45A38AE727E9FE9696AF2021B6C6A /* Products */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 34A7138B1CB778139334268FBF29A5B2 /* libFLDragView.a */, 94 | FFE904EF1BED14C224ADAD23786C99D1 /* libPods-FLSlideView.a */, 95 | ); 96 | name = Products; 97 | sourceTree = ""; 98 | }; 99 | 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */, 103 | ); 104 | name = iOS; 105 | sourceTree = ""; 106 | }; 107 | 7DB346D0F39D3F0E887471402A8071AB = { 108 | isa = PBXGroup; 109 | children = ( 110 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 111 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 112 | B63FA8E2B3F8021CE24EBB89E85FB569 /* Pods */, 113 | 67C45A38AE727E9FE9696AF2021B6C6A /* Products */, 114 | 5360E7100214C00395C87DE485EE7165 /* Targets Support Files */, 115 | ); 116 | sourceTree = ""; 117 | }; 118 | B63FA8E2B3F8021CE24EBB89E85FB569 /* Pods */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | CD21B06E41CCF49557338BB8EFC3F9FB /* FLDragView */, 122 | ); 123 | name = Pods; 124 | sourceTree = ""; 125 | }; 126 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */, 130 | ); 131 | name = Frameworks; 132 | sourceTree = ""; 133 | }; 134 | CD21B06E41CCF49557338BB8EFC3F9FB /* FLDragView */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | 51B755EAED22E1DCBEEBD8A66A9E59C0 /* UIView+drag.h */, 138 | 9B62C0FB5686A45EAE2737C73FC1E904 /* UIView+drag.m */, 139 | F49BC6C217055FD7E7C694BDAB85CFAE /* Support Files */, 140 | ); 141 | name = FLDragView; 142 | path = FLDragView; 143 | sourceTree = ""; 144 | }; 145 | F49BC6C217055FD7E7C694BDAB85CFAE /* Support Files */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | B078985F31D3C22170A6DE641F7D9A02 /* FLDragView.xcconfig */, 149 | 91827961263DFC7419ED3FBBA07A3CCA /* FLDragView-dummy.m */, 150 | 46967509A1408CF34123A789335DEF11 /* FLDragView-prefix.pch */, 151 | ); 152 | name = "Support Files"; 153 | path = "../Target Support Files/FLDragView"; 154 | sourceTree = ""; 155 | }; 156 | /* End PBXGroup section */ 157 | 158 | /* Begin PBXHeadersBuildPhase section */ 159 | 79AC4EBF31F1B6D96C87634A9ABABD4C /* Headers */ = { 160 | isa = PBXHeadersBuildPhase; 161 | buildActionMask = 2147483647; 162 | files = ( 163 | 483E9090AA2F269E6F53F781813A6DCB /* UIView+drag.h in Headers */, 164 | ); 165 | runOnlyForDeploymentPostprocessing = 0; 166 | }; 167 | /* End PBXHeadersBuildPhase section */ 168 | 169 | /* Begin PBXNativeTarget section */ 170 | D74E4806786702B2375CA37EB0019908 /* Pods-FLSlideView */ = { 171 | isa = PBXNativeTarget; 172 | buildConfigurationList = 2A00F3F8B7D19A9EF84894DEC5585896 /* Build configuration list for PBXNativeTarget "Pods-FLSlideView" */; 173 | buildPhases = ( 174 | 6E0B63AF8A94A6A0F59D90F63906C1C0 /* Sources */, 175 | 4CBF94A6CA55F157B3067F45A8304233 /* Frameworks */, 176 | ); 177 | buildRules = ( 178 | ); 179 | dependencies = ( 180 | DA30DC9C4F614BAC1D1A76D6E340C485 /* PBXTargetDependency */, 181 | ); 182 | name = "Pods-FLSlideView"; 183 | productName = "Pods-FLSlideView"; 184 | productReference = FFE904EF1BED14C224ADAD23786C99D1 /* libPods-FLSlideView.a */; 185 | productType = "com.apple.product-type.library.static"; 186 | }; 187 | DF9A2B22C49AF77664BD5E03373E5577 /* FLDragView */ = { 188 | isa = PBXNativeTarget; 189 | buildConfigurationList = 23C2AAE204A192EB975065C7DD8AC139 /* Build configuration list for PBXNativeTarget "FLDragView" */; 190 | buildPhases = ( 191 | F874AFBF7001109E40025867AE49A1AB /* Sources */, 192 | A72B58DBE288AB041712D5B1CFE99437 /* Frameworks */, 193 | 79AC4EBF31F1B6D96C87634A9ABABD4C /* Headers */, 194 | ); 195 | buildRules = ( 196 | ); 197 | dependencies = ( 198 | ); 199 | name = FLDragView; 200 | productName = FLDragView; 201 | productReference = 34A7138B1CB778139334268FBF29A5B2 /* libFLDragView.a */; 202 | productType = "com.apple.product-type.library.static"; 203 | }; 204 | /* End PBXNativeTarget section */ 205 | 206 | /* Begin PBXProject section */ 207 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 208 | isa = PBXProject; 209 | attributes = { 210 | LastSwiftUpdateCheck = 0730; 211 | LastUpgradeCheck = 0700; 212 | }; 213 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 214 | compatibilityVersion = "Xcode 3.2"; 215 | developmentRegion = English; 216 | hasScannedForEncodings = 0; 217 | knownRegions = ( 218 | en, 219 | ); 220 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 221 | productRefGroup = 67C45A38AE727E9FE9696AF2021B6C6A /* Products */; 222 | projectDirPath = ""; 223 | projectRoot = ""; 224 | targets = ( 225 | DF9A2B22C49AF77664BD5E03373E5577 /* FLDragView */, 226 | D74E4806786702B2375CA37EB0019908 /* Pods-FLSlideView */, 227 | ); 228 | }; 229 | /* End PBXProject section */ 230 | 231 | /* Begin PBXSourcesBuildPhase section */ 232 | 6E0B63AF8A94A6A0F59D90F63906C1C0 /* Sources */ = { 233 | isa = PBXSourcesBuildPhase; 234 | buildActionMask = 2147483647; 235 | files = ( 236 | 822C40A72E16A4142BA53BB90C3E188D /* Pods-FLSlideView-dummy.m in Sources */, 237 | ); 238 | runOnlyForDeploymentPostprocessing = 0; 239 | }; 240 | F874AFBF7001109E40025867AE49A1AB /* Sources */ = { 241 | isa = PBXSourcesBuildPhase; 242 | buildActionMask = 2147483647; 243 | files = ( 244 | B13F2D623B77C33E54B140A729572FCE /* FLDragView-dummy.m in Sources */, 245 | 0AE908E78DFDF49A9073BB71A063DE08 /* UIView+drag.m in Sources */, 246 | ); 247 | runOnlyForDeploymentPostprocessing = 0; 248 | }; 249 | /* End PBXSourcesBuildPhase section */ 250 | 251 | /* Begin PBXTargetDependency section */ 252 | DA30DC9C4F614BAC1D1A76D6E340C485 /* PBXTargetDependency */ = { 253 | isa = PBXTargetDependency; 254 | name = FLDragView; 255 | target = DF9A2B22C49AF77664BD5E03373E5577 /* FLDragView */; 256 | targetProxy = D89F789CE35967156FA8FC3542E121A8 /* PBXContainerItemProxy */; 257 | }; 258 | /* End PBXTargetDependency section */ 259 | 260 | /* Begin XCBuildConfiguration section */ 261 | 015A368F878AC3E2CEAE21DDE8026304 /* Debug */ = { 262 | isa = XCBuildConfiguration; 263 | buildSettings = { 264 | ALWAYS_SEARCH_USER_PATHS = NO; 265 | CLANG_ANALYZER_NONNULL = YES; 266 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 267 | CLANG_CXX_LIBRARY = "libc++"; 268 | CLANG_ENABLE_MODULES = YES; 269 | CLANG_ENABLE_OBJC_ARC = YES; 270 | CLANG_WARN_BOOL_CONVERSION = YES; 271 | CLANG_WARN_CONSTANT_CONVERSION = YES; 272 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 273 | CLANG_WARN_EMPTY_BODY = YES; 274 | CLANG_WARN_ENUM_CONVERSION = YES; 275 | CLANG_WARN_INT_CONVERSION = YES; 276 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 277 | CLANG_WARN_UNREACHABLE_CODE = YES; 278 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 279 | CODE_SIGNING_REQUIRED = NO; 280 | COPY_PHASE_STRIP = NO; 281 | ENABLE_TESTABILITY = YES; 282 | GCC_C_LANGUAGE_STANDARD = gnu99; 283 | GCC_DYNAMIC_NO_PIC = NO; 284 | GCC_OPTIMIZATION_LEVEL = 0; 285 | GCC_PREPROCESSOR_DEFINITIONS = ( 286 | "POD_CONFIGURATION_DEBUG=1", 287 | "DEBUG=1", 288 | "$(inherited)", 289 | ); 290 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 291 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 292 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 293 | GCC_WARN_UNDECLARED_SELECTOR = YES; 294 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 295 | GCC_WARN_UNUSED_FUNCTION = YES; 296 | GCC_WARN_UNUSED_VARIABLE = YES; 297 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 298 | ONLY_ACTIVE_ARCH = YES; 299 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 300 | STRIP_INSTALLED_PRODUCT = NO; 301 | SYMROOT = "${SRCROOT}/../build"; 302 | }; 303 | name = Debug; 304 | }; 305 | 028F7A14B7423BA2F6DFA0EA13385FDF /* Release */ = { 306 | isa = XCBuildConfiguration; 307 | baseConfigurationReference = 1DB142CAC8F6BCC00EC1495BF4743234 /* Pods-FLSlideView.release.xcconfig */; 308 | buildSettings = { 309 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 310 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 311 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 312 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 313 | ENABLE_STRICT_OBJC_MSGSEND = YES; 314 | GCC_NO_COMMON_BLOCKS = YES; 315 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 316 | MACH_O_TYPE = staticlib; 317 | MTL_ENABLE_DEBUG_INFO = NO; 318 | OTHER_LDFLAGS = ""; 319 | OTHER_LIBTOOLFLAGS = ""; 320 | PODS_ROOT = "$(SRCROOT)"; 321 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 322 | PRODUCT_NAME = "$(TARGET_NAME)"; 323 | SDKROOT = iphoneos; 324 | SKIP_INSTALL = YES; 325 | }; 326 | name = Release; 327 | }; 328 | 0FED4957ACFAFAFCE575C30E457A3C6D /* Release */ = { 329 | isa = XCBuildConfiguration; 330 | baseConfigurationReference = B078985F31D3C22170A6DE641F7D9A02 /* FLDragView.xcconfig */; 331 | buildSettings = { 332 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 333 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 334 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 335 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 336 | ENABLE_STRICT_OBJC_MSGSEND = YES; 337 | GCC_NO_COMMON_BLOCKS = YES; 338 | GCC_PREFIX_HEADER = "Target Support Files/FLDragView/FLDragView-prefix.pch"; 339 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 340 | MTL_ENABLE_DEBUG_INFO = NO; 341 | OTHER_LDFLAGS = ""; 342 | OTHER_LIBTOOLFLAGS = ""; 343 | PRIVATE_HEADERS_FOLDER_PATH = ""; 344 | PRODUCT_NAME = "$(TARGET_NAME)"; 345 | PUBLIC_HEADERS_FOLDER_PATH = ""; 346 | SDKROOT = iphoneos; 347 | SKIP_INSTALL = YES; 348 | }; 349 | name = Release; 350 | }; 351 | 1887C2CBA9159737247C97E9D3D1B746 /* Debug */ = { 352 | isa = XCBuildConfiguration; 353 | baseConfigurationReference = 26FCDA6AA8E02E91EF24294A9980FE47 /* Pods-FLSlideView.debug.xcconfig */; 354 | buildSettings = { 355 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 356 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 357 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 358 | DEBUG_INFORMATION_FORMAT = dwarf; 359 | ENABLE_STRICT_OBJC_MSGSEND = YES; 360 | GCC_NO_COMMON_BLOCKS = YES; 361 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 362 | MACH_O_TYPE = staticlib; 363 | MTL_ENABLE_DEBUG_INFO = YES; 364 | OTHER_LDFLAGS = ""; 365 | OTHER_LIBTOOLFLAGS = ""; 366 | PODS_ROOT = "$(SRCROOT)"; 367 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 368 | PRODUCT_NAME = "$(TARGET_NAME)"; 369 | SDKROOT = iphoneos; 370 | SKIP_INSTALL = YES; 371 | }; 372 | name = Debug; 373 | }; 374 | 44CDBB6D11DE06DB64D6268622BDC47E /* Release */ = { 375 | isa = XCBuildConfiguration; 376 | buildSettings = { 377 | ALWAYS_SEARCH_USER_PATHS = NO; 378 | CLANG_ANALYZER_NONNULL = YES; 379 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 380 | CLANG_CXX_LIBRARY = "libc++"; 381 | CLANG_ENABLE_MODULES = YES; 382 | CLANG_ENABLE_OBJC_ARC = YES; 383 | CLANG_WARN_BOOL_CONVERSION = YES; 384 | CLANG_WARN_CONSTANT_CONVERSION = YES; 385 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 386 | CLANG_WARN_EMPTY_BODY = YES; 387 | CLANG_WARN_ENUM_CONVERSION = YES; 388 | CLANG_WARN_INT_CONVERSION = YES; 389 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 390 | CLANG_WARN_UNREACHABLE_CODE = YES; 391 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 392 | CODE_SIGNING_REQUIRED = NO; 393 | COPY_PHASE_STRIP = YES; 394 | ENABLE_NS_ASSERTIONS = NO; 395 | GCC_C_LANGUAGE_STANDARD = gnu99; 396 | GCC_PREPROCESSOR_DEFINITIONS = ( 397 | "POD_CONFIGURATION_RELEASE=1", 398 | "$(inherited)", 399 | ); 400 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 401 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 402 | GCC_WARN_UNDECLARED_SELECTOR = YES; 403 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 404 | GCC_WARN_UNUSED_FUNCTION = YES; 405 | GCC_WARN_UNUSED_VARIABLE = YES; 406 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 407 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 408 | STRIP_INSTALLED_PRODUCT = NO; 409 | SYMROOT = "${SRCROOT}/../build"; 410 | VALIDATE_PRODUCT = YES; 411 | }; 412 | name = Release; 413 | }; 414 | CE2EA911214F1EB6A8F2F636B5939C09 /* Debug */ = { 415 | isa = XCBuildConfiguration; 416 | baseConfigurationReference = B078985F31D3C22170A6DE641F7D9A02 /* FLDragView.xcconfig */; 417 | buildSettings = { 418 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 419 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 420 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 421 | DEBUG_INFORMATION_FORMAT = dwarf; 422 | ENABLE_STRICT_OBJC_MSGSEND = YES; 423 | GCC_NO_COMMON_BLOCKS = YES; 424 | GCC_PREFIX_HEADER = "Target Support Files/FLDragView/FLDragView-prefix.pch"; 425 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 426 | MTL_ENABLE_DEBUG_INFO = YES; 427 | OTHER_LDFLAGS = ""; 428 | OTHER_LIBTOOLFLAGS = ""; 429 | PRIVATE_HEADERS_FOLDER_PATH = ""; 430 | PRODUCT_NAME = "$(TARGET_NAME)"; 431 | PUBLIC_HEADERS_FOLDER_PATH = ""; 432 | SDKROOT = iphoneos; 433 | SKIP_INSTALL = YES; 434 | }; 435 | name = Debug; 436 | }; 437 | /* End XCBuildConfiguration section */ 438 | 439 | /* Begin XCConfigurationList section */ 440 | 23C2AAE204A192EB975065C7DD8AC139 /* Build configuration list for PBXNativeTarget "FLDragView" */ = { 441 | isa = XCConfigurationList; 442 | buildConfigurations = ( 443 | CE2EA911214F1EB6A8F2F636B5939C09 /* Debug */, 444 | 0FED4957ACFAFAFCE575C30E457A3C6D /* Release */, 445 | ); 446 | defaultConfigurationIsVisible = 0; 447 | defaultConfigurationName = Release; 448 | }; 449 | 2A00F3F8B7D19A9EF84894DEC5585896 /* Build configuration list for PBXNativeTarget "Pods-FLSlideView" */ = { 450 | isa = XCConfigurationList; 451 | buildConfigurations = ( 452 | 1887C2CBA9159737247C97E9D3D1B746 /* Debug */, 453 | 028F7A14B7423BA2F6DFA0EA13385FDF /* Release */, 454 | ); 455 | defaultConfigurationIsVisible = 0; 456 | defaultConfigurationName = Release; 457 | }; 458 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 459 | isa = XCConfigurationList; 460 | buildConfigurations = ( 461 | 015A368F878AC3E2CEAE21DDE8026304 /* Debug */, 462 | 44CDBB6D11DE06DB64D6268622BDC47E /* Release */, 463 | ); 464 | defaultConfigurationIsVisible = 0; 465 | defaultConfigurationName = Release; 466 | }; 467 | /* End XCConfigurationList section */ 468 | }; 469 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 470 | } 471 | -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/Pods.xcodeproj/xcuserdata/clarence.xcuserdatad/xcschemes/FLDragView.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 | -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/Pods.xcodeproj/xcuserdata/clarence.xcuserdatad/xcschemes/Pods-FLSlideView.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 | -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/Pods.xcodeproj/xcuserdata/clarence.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | FLDragView.xcscheme 8 | 9 | isShown 10 | 11 | 12 | Pods-FLSlideView.xcscheme 13 | 14 | isShown 15 | 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | D74E4806786702B2375CA37EB0019908 21 | 22 | primary 23 | 24 | 25 | DF9A2B22C49AF77664BD5E03373E5577 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/Pods.xcodeproj/xcuserdata/kongfanlie.xcuserdatad/xcschemes/FLDragView.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/Pods.xcodeproj/xcuserdata/kongfanlie.xcuserdatad/xcschemes/Pods-FLSlideView.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/Pods.xcodeproj/xcuserdata/kongfanlie.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | FLDragView.xcscheme 8 | 9 | orderHint 10 | 1 11 | 12 | Pods-FLSlideView.xcscheme 13 | 14 | orderHint 15 | 2 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | D74E4806786702B2375CA37EB0019908 21 | 22 | primary 23 | 24 | 25 | DF9A2B22C49AF77664BD5E03373E5577 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/Target Support Files/FLDragView/FLDragView-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_FLDragView : NSObject 3 | @end 4 | @implementation PodsDummy_FLDragView 5 | @end 6 | -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/Target Support Files/FLDragView/FLDragView-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/Target Support Files/FLDragView/FLDragView.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/FLDragView 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/FLDragView" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/FLDragView" 4 | PODS_BUILD_DIR = $BUILD_DIR 5 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 8 | SKIP_INSTALL = YES 9 | -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/Target Support Files/Pods-FLSlideView/Pods-FLSlideView-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## FLDragView 5 | 6 | MIT License 7 | 8 | Copyright (c) 2016 Clarencelie 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 | -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/Target Support Files/Pods-FLSlideView/Pods-FLSlideView-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) 2016 Clarencelie 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 | FLDragView 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 | -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/Target Support Files/Pods-FLSlideView/Pods-FLSlideView-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_FLSlideView : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_FLSlideView 5 | @end 6 | -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/Target Support Files/Pods-FLSlideView/Pods-FLSlideView-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/Target Support Files/Pods-FLSlideView/Pods-FLSlideView-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | *) 22 | TARGET_DEVICE_ARGS="--target-device mac" 23 | ;; 24 | esac 25 | 26 | install_resource() 27 | { 28 | if [[ "$1" = /* ]] ; then 29 | RESOURCE_PATH="$1" 30 | else 31 | RESOURCE_PATH="${PODS_ROOT}/$1" 32 | fi 33 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 34 | cat << EOM 35 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 36 | EOM 37 | exit 1 38 | fi 39 | case $RESOURCE_PATH in 40 | *.storyboard) 41 | 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}" 42 | 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} 43 | ;; 44 | *.xib) 45 | 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}" 46 | 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} 47 | ;; 48 | *.framework) 49 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 50 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 51 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 52 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 53 | ;; 54 | *.xcdatamodel) 55 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 56 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 57 | ;; 58 | *.xcdatamodeld) 59 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 60 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 61 | ;; 62 | *.xcmappingmodel) 63 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 64 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 65 | ;; 66 | *.xcassets) 67 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 68 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 69 | ;; 70 | *) 71 | echo "$RESOURCE_PATH" 72 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 73 | ;; 74 | esac 75 | } 76 | 77 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 78 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 79 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 80 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 81 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 82 | fi 83 | rm -f "$RESOURCES_TO_COPY" 84 | 85 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 86 | then 87 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 88 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 89 | while read line; do 90 | if [[ $line != "${PODS_ROOT}*" ]]; then 91 | XCASSET_FILES+=("$line") 92 | fi 93 | done <<<"$OTHER_XCASSETS" 94 | 95 | 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}" 96 | fi 97 | -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/Target Support Files/Pods-FLSlideView/Pods-FLSlideView.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/FLDragView" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/FLDragView" 5 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/FLDragView" 6 | OTHER_LDFLAGS = $(inherited) -ObjC -l"FLDragView" 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /FLDragViewDemo/Pods/Target Support Files/Pods-FLSlideView/Pods-FLSlideView.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/FLDragView" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/FLDragView" 5 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/FLDragView" 6 | OTHER_LDFLAGS = $(inherited) -ObjC -l"FLDragView" 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Clarencelie 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #一、前言 2 | - **1、写了10多天的小程序代码,有兴趣的可以看我这篇[小程序官方文档-小程序版【持续更新】](http://www.jianshu.com/p/5a781c989299),被坑得有点晕,突然想换换口味,写点iOS的,看群上有人提过这个拖拽view的功能,应该挺多人需要的,那就造一个分享吧。** 3 | 4 | - **2、公司有自己的一个直播项目,看其他直播app都有小屏幕可拖拽播放的view(如下图),虽然还没有这个需求,早点准备好。** 5 | 6 | ![截图来自某牙直播](http://upload-images.jianshu.io/upload_images/1085031-702608b4a959f9d9.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/600) 7 | 8 | 9 | - **3、而且很久没分享了,像往常一样,封装轮子的过程都会详细介绍,分享更多的都是封装的思想。** 10 | 11 | - **4、来看看效果图先吧:** 12 | ![演示效果图,还可以吧](http://upload-images.jianshu.io/upload_images/1085031-da24d75b67f1e537.gif?imageMogr2/auto-orient/strip) 13 | 14 | #二、功能分析(针对所有控件) 15 | 16 | - 1、**可拖拽**。最基本的功能,拖出父容器松手后可复位,可关闭。 17 | 18 | - 2、**拖拽不遮盖**。同级层次的控件,如果拖拽过程中出现重叠,会显示在最上层。 19 | 20 | - 3、**可吸附边界**。吸附这点参考苹果的AssistiveTouch,只能在屏幕的左边或者右边,可关闭。 21 | 22 | - 4、**弹簧效果**。如果超出屏幕,会有弹簧效果,这点参考scrollView 的 bounces 效果,可关闭。 23 | 24 | - 5、**支持xib、storyboard 参数设置**。很多控件都是在xib或storyboard 中创建,此时可通过,看下图: 25 | 26 | ![支持xib、storyboard 参数设置](http://upload-images.jianshu.io/upload_images/1085031-64f6d296519d228a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/800) 27 | 28 | #三、API 分析设计 29 | 30 | - 1、**是否允许拖拽,默认关闭,支持xib、storyboard 参数设置** 31 | 32 | ``` 33 | /** 34 |  *  @author gitKong 35 |  * 36 |  *  是否允许拖拽,默认关闭(可以在XIB或SB中设置) 37 |  */ 38 | @property (nonatomic,assign)IBInspectable BOOL fl_canDrag; 39 | ``` 40 | 41 | - 2、**是否需要边界弹簧效果,默认开启,支持xib、storyboard 参数设置** 42 | 43 | ``` 44 | /** 45 |  *  @author gitKong 46 |  * 47 |  *  是否需要边界弹簧效果,默认开启(可以在XIB或SB中设置) 48 |  */ 49 | @property (nonatomic,assign)IBInspectable BOOL fl_bounces; 50 | ``` 51 | 52 | - 3、**是否需要吸附边界效果,默认开启(可以在XIB或SB中设置** 53 | 54 | ``` 55 | /** 56 |  *  @author gitKong 57 |  * 58 |  *  是否需要吸附边界效果,默认开启(可以在XIB或SB中设置) 59 |  */ 60 | @property (nonatomic,assign)IBInspectable BOOL fl_isAdsorb; 61 | ``` 62 | 63 | #四、功能实现分析 64 | - **1、分类或继承实现**。因为需要支持所有控件,我们都知道控件都是直接或者间接继承 `UIView` ,此时可以有两种办法实现,` 继承` 和 ` 分类` ,此时我是用分类实现的,至于为什么呢? 65 | - (1)、如果我当前的view是已经继承了另一个自定义view,而且功能很独立,此时如果要给当前view添加拖拽功能的话,就必须融合两个功能的代码,这将变得很麻烦,而且会很乱。 66 | 67 | - (2)、如果我需要给一个按钮添加拖拽功能,那么继承就没办法实现了,因为你给这个按钮修改了继承,就没了自带的功能了。 68 | 69 | - **2、监听拖拽**。拖拽事件可以通过 `- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event` 方法去监听,也可以通过添加 pan 拖拽手势,至于为什么要用 手势呢? 70 | - (1)、需要在分类中实现 touchesMoved 方法,此时如果外界也实现了这个方法,那么就很容易起冲突。 71 | - (2)、虽然动态修改拖拽功能开关,但 会 多次调用 touchesMoved 方法,即使关闭了拖拽功能,相对手势实现就没那么灵活了。 72 | 73 | - **3、Setter 方法里添加pan事件**。一开始想到的是通过 runtime 的 `Swizzle` 替换掉 系统的 `init` 方法,进而在自己的方法里面实现 拖拽手势添加,但后来考虑到,此时是给UIView 添加分类,而页面上的所有控件都是UIView 的 子类,此时 init 就会调用多次,会造成页面显示慢;于是直接在setter方法里面判断,当需要拖拽的时候,我才添加事件,不需要拖拽的时候移除手势,算是一个小优化。**此时还需要记录当前控件在父容器中的 `index` ,这个等下就知道要用来干嘛。** 74 | 75 | - **4、遮盖处理**。我们都知道,控件通过 `addSubviews` 添加到父容器中,是有顺序的,后面添加的会在上层;此时如果我先添加 view1 在添加 view2,我拖拽 view1 到 view2 的时候,就会被 view2 挡住。做法如下: 76 | - (1)、遍历父类view 的 subViews 数组,判断是否与当前view重合,用系统自带的 `CGRectIntersectsRect` 方法判断。 77 | - (2)、在拖拽开始(`UIGestureRecognizerStateBegan`)的时候,用 `bringSubviewToFront` 将拖拽的view 移到最上层。 78 | - (3)、在拖拽结束(`UIGestureRecognizerStateEnd`)的时候,判断此时状态是否还重合,如果不重合,通过 `insertSubview` 将控件重置回原来的顺序(通过上面第三点记录的 `index`) 79 | 80 | - **5、支持xib、storyboard 参数设置**。这个只需要添加一个 关键字修饰就行 `IBInspectable` ,用法可以看我API 设计,这个主要`作用是使view内的变量可视化,并且可以修改后马上看到` 81 | 82 | - **6、弹簧效果和吸附效果**。这个可以使用UIView 的 动画就可以实现,此时有一个**注意点**,判断吸附到左边还是右边,比较的应该是绝对位置,而不是相对位置,需要加上父类的x值 83 | 84 | ``` 85 | if (gesR.view.fl_centerX + self.superview.fl_x > self.superview.fl_centerX) { 86 |     [UIView animateWithDuration:0.25 animations:^{ 87 |         gesR.view.center = CGPointMake(self.superview.fl_width - self.fl_width / 2, y); 88 |     }]; 89 |      90 | } 91 | else{ 92 |     [UIView animateWithDuration:0.25 animations:^{ 93 |         gesR.view.center = CGPointMake(self.fl_width / 2, y); 94 |     }]; 95 | } 96 | ``` 97 | 98 | ![计算小坑](http://upload-images.jianshu.io/upload_images/1085031-85821e9f5b229bb8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 99 | 100 | 101 | #五、注意点: 102 | - 1、如果你是使用约束来布局的话,此时可能出现当你拖拽出一定范围后,能正常停留在当前位置;但当你此时拖拽后的位置在约束好的位置附近,就会被吸附回去,如下图:(**此时图片是使用约束布局**) 103 | 104 | ![使用约束布局可能会出现这种情况](http://upload-images.jianshu.io/upload_images/1085031-366a0e53b67e67a2.gif?imageMogr2/auto-orient/strip) 105 | 106 | - 2、如果手势失败,会有断言提示。 107 | 108 | #六、总结 109 | - **1、为了方便大家使用,支持cocoapod,通过 `pod search FLDragView` 就能搜到。如果你搜不到,先清理一下吧,执行 `rm ~/Library/Caches/CocoaPods/search_index.json` 执行完重新 search 就行** 110 | 111 | ![cocoapod](http://upload-images.jianshu.io/upload_images/1085031-eb99cb25bcbaa15c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 112 | 113 | - **2、代码不难实现,具体代码就不拷贝上来了,代码中计算相对多一点,文字分析应该比较清楚了,如果还有什么其他问题,尽管找我。** 114 | 115 | - **3、[简书地址](http://www.jianshu.com/users/fe5700cfb223/latest_articles) ,欢迎大家关注我,喜欢给个star 和 like ,你的支持是我最大的动力,会随时更新原创文章喔!** 116 | --------------------------------------------------------------------------------