├── .DS_Store ├── FlowMenuAnimation.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── bear.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ ├── apple.xcuserdatad │ └── xcschemes │ │ ├── FlowMenuAnimation.xcscheme │ │ └── xcschememanagement.plist │ └── bear.xcuserdatad │ └── xcschemes │ ├── FlowMenuAnimation.xcscheme │ └── xcschememanagement.plist ├── FlowMenuAnimation.xcworkspace ├── contents.xcworkspacedata └── xcuserdata │ ├── apple.xcuserdatad │ ├── UserInterfaceState.xcuserstate │ └── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ └── bear.xcuserdatad │ ├── UserInterfaceState.xcuserstate │ └── xcdebugger │ └── Breakpoints_v2.xcbkptlist ├── FlowMenuAnimation ├── .DS_Store ├── AppDelegate.h ├── AppDelegate.m ├── ArrowAnimationView.h ├── ArrowAnimationView.m ├── Assets.xcassets │ ├── .DS_Store │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── add.imageset │ │ ├── Contents.json │ │ └── add.png │ ├── art.imageset │ │ ├── Contents.json │ │ └── art.png │ ├── food.imageset │ │ ├── Contents.json │ │ └── food.png │ ├── like.imageset │ │ ├── Contents.json │ │ └── like.png │ ├── share.imageset │ │ ├── Contents.json │ │ └── share.png │ └── wine.imageset │ │ ├── Contents.json │ │ └── wine.png ├── AssignInfoSingleCellView.h ├── AssignInfoSingleCellView.m ├── AssignInfoView.h ├── AssignInfoView.m ├── AssignPointModel.h ├── AssignPointModel.m ├── AssignPointView.h ├── AssignPointView.m ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── ButtonsView.h ├── ButtonsView.m ├── CellDataModel.h ├── CellDataModel.m ├── FlowMenuView.h ├── FlowMenuView.m ├── FlowMenuViewCell.h ├── FlowMenuViewCell.m ├── Info.plist ├── MainInfoView.h ├── MainInfoView.m ├── PrefixHeader.pch ├── SpecialBtn.h ├── SpecialBtn.m ├── StartBtn.h ├── StartBtn.m ├── UIView+SetSize.h ├── UIView+SetSize.m ├── ViewController.h ├── ViewController.m └── main.m ├── FlowMenuAnimationTests ├── FlowMenuAnimationTests.m └── Info.plist ├── FlowMenuAnimationUITests ├── FlowMenuAnimationUITests.m └── Info.plist ├── Podfile ├── Podfile.lock ├── Pods ├── BearSkill │ ├── LICENSE │ ├── Pod │ │ └── Classes │ │ │ ├── AttributeString │ │ │ ├── NSMutableAttributedString+BearSet.h │ │ │ └── NSMutableAttributedString+BearSet.m │ │ │ ├── Constants │ │ │ ├── BearConstants.h │ │ │ └── BearConstants.m │ │ │ ├── Layout │ │ │ ├── UITableView+BearStoreCellHeight.h │ │ │ ├── UITableView+BearStoreCellHeight.m │ │ │ ├── UIView+BearSet.h │ │ │ └── UIView+BearSet.m │ │ │ └── UI&Extend │ │ │ ├── BearAlertView │ │ │ ├── BearAlertBtnsView.h │ │ │ ├── BearAlertBtnsView.m │ │ │ ├── BearAlertContentView.h │ │ │ ├── BearAlertContentView.m │ │ │ ├── BearAlertView.h │ │ │ └── BearAlertView.m │ │ │ ├── BearCutOutView.h │ │ │ ├── BearCutOutView.m │ │ │ ├── UILabel+BearSet.h │ │ │ ├── UILabel+BearSet.m │ │ │ ├── UITextField+BearLimitLength.h │ │ │ ├── UITextField+BearLimitLength.m │ │ │ ├── UITextField+BearSet.h │ │ │ └── UITextField+BearSet.m │ └── README.md ├── Headers │ ├── Private │ │ └── BearSkill │ │ │ ├── BearAlertBtnsView.h │ │ │ ├── BearAlertContentView.h │ │ │ ├── BearAlertView.h │ │ │ ├── BearConstants.h │ │ │ ├── BearCutOutView.h │ │ │ ├── NSMutableAttributedString+BearSet.h │ │ │ ├── UILabel+BearSet.h │ │ │ ├── UITableView+BearStoreCellHeight.h │ │ │ ├── UITextField+BearLimitLength.h │ │ │ ├── UITextField+BearSet.h │ │ │ └── UIView+BearSet.h │ └── Public │ │ └── BearSkill │ │ ├── BearAlertBtnsView.h │ │ ├── BearAlertContentView.h │ │ ├── BearAlertView.h │ │ ├── BearConstants.h │ │ ├── BearCutOutView.h │ │ ├── NSMutableAttributedString+BearSet.h │ │ ├── UILabel+BearSet.h │ │ ├── UITableView+BearStoreCellHeight.h │ │ ├── UITextField+BearLimitLength.h │ │ ├── UITextField+BearSet.h │ │ └── UIView+BearSet.h ├── Manifest.lock ├── Pods.xcodeproj │ ├── project.pbxproj │ └── xcuserdata │ │ └── bear.xcuserdatad │ │ └── xcschemes │ │ ├── BearSkill-BearSkill.xcscheme │ │ ├── BearSkill.xcscheme │ │ ├── Pods-FlowMenuAnimation.xcscheme │ │ ├── Pods-FlowMenuAnimationTests.xcscheme │ │ ├── Pods-FlowMenuAnimationUITests.xcscheme │ │ └── xcschememanagement.plist └── Target Support Files │ ├── BearSkill │ ├── BearSkill-dummy.m │ ├── BearSkill-prefix.pch │ ├── BearSkill.xcconfig │ └── ResourceBundle-BearSkill-Info.plist │ ├── Pods-FlowMenuAnimation │ ├── Pods-FlowMenuAnimation-acknowledgements.markdown │ ├── Pods-FlowMenuAnimation-acknowledgements.plist │ ├── Pods-FlowMenuAnimation-dummy.m │ ├── Pods-FlowMenuAnimation-frameworks.sh │ ├── Pods-FlowMenuAnimation-resources.sh │ ├── Pods-FlowMenuAnimation.debug.xcconfig │ └── Pods-FlowMenuAnimation.release.xcconfig │ ├── Pods-FlowMenuAnimationTests │ ├── Pods-FlowMenuAnimationTests-acknowledgements.markdown │ ├── Pods-FlowMenuAnimationTests-acknowledgements.plist │ ├── Pods-FlowMenuAnimationTests-dummy.m │ ├── Pods-FlowMenuAnimationTests-frameworks.sh │ ├── Pods-FlowMenuAnimationTests-resources.sh │ ├── Pods-FlowMenuAnimationTests.debug.xcconfig │ └── Pods-FlowMenuAnimationTests.release.xcconfig │ └── Pods-FlowMenuAnimationUITests │ ├── Pods-FlowMenuAnimationUITests-acknowledgements.markdown │ ├── Pods-FlowMenuAnimationUITests-acknowledgements.plist │ ├── Pods-FlowMenuAnimationUITests-dummy.m │ ├── Pods-FlowMenuAnimationUITests-frameworks.sh │ ├── Pods-FlowMenuAnimationUITests-resources.sh │ ├── Pods-FlowMenuAnimationUITests.debug.xcconfig │ └── Pods-FlowMenuAnimationUITests.release.xcconfig ├── README.md └── READMEResource ├── 1464710155460041.gif └── FlowMenuAniamtion.gif /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BearRan/FlowMenuAnimation/85a3b7a5bee49402b942a90c2fb95ea591f5f1ad/.DS_Store -------------------------------------------------------------------------------- /FlowMenuAnimation.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FlowMenuAnimation.xcodeproj/project.xcworkspace/xcuserdata/bear.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BearRan/FlowMenuAnimation/85a3b7a5bee49402b942a90c2fb95ea591f5f1ad/FlowMenuAnimation.xcodeproj/project.xcworkspace/xcuserdata/bear.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /FlowMenuAnimation.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/FlowMenuAnimation.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /FlowMenuAnimation.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | FlowMenuAnimation.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 09D2F1AC1D1AD2A100093946 16 | 17 | primary 18 | 19 | 20 | 09D2F1C51D1AD2A100093946 21 | 22 | primary 23 | 24 | 25 | 09D2F1D01D1AD2A100093946 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /FlowMenuAnimation.xcodeproj/xcuserdata/bear.xcuserdatad/xcschemes/FlowMenuAnimation.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /FlowMenuAnimation.xcodeproj/xcuserdata/bear.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | FlowMenuAnimation.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 09D2F1AC1D1AD2A100093946 16 | 17 | primary 18 | 19 | 20 | 09D2F1C51D1AD2A100093946 21 | 22 | primary 23 | 24 | 25 | 09D2F1D01D1AD2A100093946 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /FlowMenuAnimation.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /FlowMenuAnimation.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BearRan/FlowMenuAnimation/85a3b7a5bee49402b942a90c2fb95ea591f5f1ad/FlowMenuAnimation.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /FlowMenuAnimation.xcworkspace/xcuserdata/apple.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /FlowMenuAnimation.xcworkspace/xcuserdata/bear.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BearRan/FlowMenuAnimation/85a3b7a5bee49402b942a90c2fb95ea591f5f1ad/FlowMenuAnimation.xcworkspace/xcuserdata/bear.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /FlowMenuAnimation.xcworkspace/xcuserdata/bear.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 20 | 21 | 22 | 24 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /FlowMenuAnimation/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BearRan/FlowMenuAnimation/85a3b7a5bee49402b942a90c2fb95ea591f5f1ad/FlowMenuAnimation/.DS_Store -------------------------------------------------------------------------------- /FlowMenuAnimation/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/6/22. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | static BOOL showAssistantPoint = NO; //显示辅助点 12 | static BOOL showPath = NO; //显示路径 13 | static BOOL showPathBgViewColor = NO; //显示路径层的背景色 14 | static BOOL flowViewClipBounds = YES; //主view clipBounds 15 | static BOOL needDragGesture = NO; //是否需要拖动手势 16 | static BOOL showSingleFlowDemo = NO; //只显示一个demo view 17 | 18 | @interface AppDelegate : UIResponder 19 | 20 | @property (strong, nonatomic) UIWindow *window; 21 | 22 | 23 | @end 24 | 25 | -------------------------------------------------------------------------------- /FlowMenuAnimation/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/6/22. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // 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. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // 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. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // 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. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /FlowMenuAnimation/ArrowAnimationView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ArrowAnimationView.h 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/7/3. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ArrowAnimationView : UIView 12 | 13 | @property (assign, nonatomic) BOOL open; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /FlowMenuAnimation/ArrowAnimationView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ArrowAnimationView.m 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/7/3. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import "ArrowAnimationView.h" 10 | 11 | static CGFloat animationDuring = 0.5; 12 | 13 | @interface ArrowAnimationView () 14 | { 15 | UIView *_pointVL; 16 | UIView *_pointVC; 17 | UIView *_pointVR; 18 | 19 | CGPoint _pointL_open; 20 | CGPoint _pointC_open; 21 | CGPoint _pointR_open; 22 | 23 | CGPoint _pointL_close; 24 | CGPoint _pointC_close; 25 | CGPoint _pointR_close; 26 | 27 | UIBezierPath *_bezierPath; 28 | CAShapeLayer *_shapeLayer; 29 | CADisplayLink *_displayLink; 30 | BOOL _firstLoad; 31 | } 32 | 33 | @end 34 | 35 | @implementation ArrowAnimationView 36 | 37 | - (instancetype)initWithFrame:(CGRect)frame 38 | { 39 | self = [super initWithFrame:frame]; 40 | 41 | if (self) { 42 | 43 | self.userInteractionEnabled = NO; 44 | 45 | [self createView]; 46 | } 47 | 48 | return self; 49 | } 50 | 51 | - (void)createView 52 | { 53 | _firstLoad = YES; 54 | 55 | _pointL_open = CGPointMake(0, 0); 56 | _pointC_open = CGPointMake(self.width / 2.0, self.height); 57 | _pointR_open = CGPointMake(self.width, 0); 58 | 59 | _pointL_close = CGPointMake(0, self.height); 60 | _pointC_close = CGPointMake(self.width / 2.0, 0); 61 | _pointR_close = CGPointMake(self.width, self.height); 62 | 63 | _pointVL = [self createSinglePointV:_pointL_open]; 64 | _pointVC = [self createSinglePointV:_pointC_open]; 65 | _pointVR = [self createSinglePointV:_pointR_open]; 66 | 67 | _bezierPath = [UIBezierPath bezierPath]; 68 | _shapeLayer = [CAShapeLayer layer]; 69 | _shapeLayer.fillColor = [UIColor clearColor].CGColor; 70 | _shapeLayer.strokeColor = [UIColor whiteColor].CGColor; 71 | _shapeLayer.lineWidth = 3.0; 72 | _shapeLayer.lineCap = kCALineCapRound; 73 | _shapeLayer.lineJoin = kCALineJoinRound; 74 | [self.layer addSublayer:_shapeLayer]; 75 | [self updateLayer]; 76 | 77 | _displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(updateLayer)]; 78 | [_displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; 79 | _displayLink.paused = YES; 80 | } 81 | 82 | - (UIView *)createSinglePointV:(CGPoint)center 83 | { 84 | UIView *tempPointV = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 5, 5)]; 85 | tempPointV.center = center; 86 | tempPointV.backgroundColor = [UIColor clearColor]; 87 | [self addSubview:tempPointV]; 88 | 89 | return tempPointV; 90 | } 91 | 92 | // 更新箭头layer 93 | - (void)updateLayer 94 | { 95 | CAShapeLayer *_pointVL_presentationLayer = _pointVL.layer.presentationLayer; 96 | CAShapeLayer *_pointVC_presentationLayer = _pointVC.layer.presentationLayer; 97 | CAShapeLayer *_pointVR_presentationLayer = _pointVR.layer.presentationLayer; 98 | 99 | CGPoint _tempCenter_L; 100 | CGPoint _tempCenter_C; 101 | CGPoint _tempCenter_R; 102 | 103 | if (_firstLoad == YES) { 104 | 105 | _firstLoad = NO; 106 | 107 | _tempCenter_L = _pointVL.center; 108 | _tempCenter_C = _pointVC.center; 109 | _tempCenter_R = _pointVR.center; 110 | }else{ 111 | 112 | _tempCenter_L = _pointVL_presentationLayer.position; 113 | _tempCenter_C = _pointVC_presentationLayer.position; 114 | _tempCenter_R = _pointVR_presentationLayer.position; 115 | } 116 | 117 | [_bezierPath removeAllPoints]; 118 | [_bezierPath moveToPoint:_tempCenter_L]; 119 | [_bezierPath addLineToPoint:_tempCenter_C]; 120 | [_bezierPath addLineToPoint:_tempCenter_R]; 121 | 122 | _shapeLayer.path = _bezierPath.CGPath; 123 | } 124 | 125 | @synthesize open = _open; 126 | - (void)setOpen:(BOOL)open 127 | { 128 | _open = open; 129 | _displayLink.paused = NO; 130 | 131 | if (open == YES) { 132 | [UIView animateWithDuration:animationDuring animations:^{ 133 | _pointVL.center = _pointL_open; 134 | _pointVC.center = _pointC_open; 135 | _pointVR.center = _pointR_open; 136 | }completion:^(BOOL finished) { 137 | _displayLink.paused = YES; 138 | }]; 139 | } 140 | else{ 141 | [UIView animateWithDuration:animationDuring animations:^{ 142 | _pointVL.center = _pointL_close; 143 | _pointVC.center = _pointC_close; 144 | _pointVR.center = _pointR_close; 145 | }completion:^(BOOL finished) { 146 | _displayLink.paused = YES; 147 | }]; 148 | } 149 | } 150 | 151 | @end 152 | -------------------------------------------------------------------------------- /FlowMenuAnimation/Assets.xcassets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BearRan/FlowMenuAnimation/85a3b7a5bee49402b942a90c2fb95ea591f5f1ad/FlowMenuAnimation/Assets.xcassets/.DS_Store -------------------------------------------------------------------------------- /FlowMenuAnimation/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 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "83.5x83.5", 66 | "scale" : "2x" 67 | } 68 | ], 69 | "info" : { 70 | "version" : 1, 71 | "author" : "xcode" 72 | } 73 | } -------------------------------------------------------------------------------- /FlowMenuAnimation/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /FlowMenuAnimation/Assets.xcassets/add.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "add.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /FlowMenuAnimation/Assets.xcassets/add.imageset/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BearRan/FlowMenuAnimation/85a3b7a5bee49402b942a90c2fb95ea591f5f1ad/FlowMenuAnimation/Assets.xcassets/add.imageset/add.png -------------------------------------------------------------------------------- /FlowMenuAnimation/Assets.xcassets/art.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "art.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /FlowMenuAnimation/Assets.xcassets/art.imageset/art.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BearRan/FlowMenuAnimation/85a3b7a5bee49402b942a90c2fb95ea591f5f1ad/FlowMenuAnimation/Assets.xcassets/art.imageset/art.png -------------------------------------------------------------------------------- /FlowMenuAnimation/Assets.xcassets/food.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "food.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /FlowMenuAnimation/Assets.xcassets/food.imageset/food.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BearRan/FlowMenuAnimation/85a3b7a5bee49402b942a90c2fb95ea591f5f1ad/FlowMenuAnimation/Assets.xcassets/food.imageset/food.png -------------------------------------------------------------------------------- /FlowMenuAnimation/Assets.xcassets/like.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "like.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /FlowMenuAnimation/Assets.xcassets/like.imageset/like.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BearRan/FlowMenuAnimation/85a3b7a5bee49402b942a90c2fb95ea591f5f1ad/FlowMenuAnimation/Assets.xcassets/like.imageset/like.png -------------------------------------------------------------------------------- /FlowMenuAnimation/Assets.xcassets/share.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "share.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /FlowMenuAnimation/Assets.xcassets/share.imageset/share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BearRan/FlowMenuAnimation/85a3b7a5bee49402b942a90c2fb95ea591f5f1ad/FlowMenuAnimation/Assets.xcassets/share.imageset/share.png -------------------------------------------------------------------------------- /FlowMenuAnimation/Assets.xcassets/wine.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "wine.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /FlowMenuAnimation/Assets.xcassets/wine.imageset/wine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BearRan/FlowMenuAnimation/85a3b7a5bee49402b942a90c2fb95ea591f5f1ad/FlowMenuAnimation/Assets.xcassets/wine.imageset/wine.png -------------------------------------------------------------------------------- /FlowMenuAnimation/AssignInfoSingleCellView.h: -------------------------------------------------------------------------------- 1 | // 2 | // AssignInfoSingleCellView.h 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/7/3. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AssignInfoSingleCellView : UIView 12 | 13 | @property (strong, nonatomic) UILabel *numLabel; 14 | @property (strong, nonatomic) UILabel *titleLabel; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /FlowMenuAnimation/AssignInfoSingleCellView.m: -------------------------------------------------------------------------------- 1 | // 2 | // AssignInfoSingleCellView.m 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/7/3. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import "AssignInfoSingleCellView.h" 10 | 11 | @implementation AssignInfoSingleCellView 12 | 13 | - (instancetype)init 14 | { 15 | self = [super init]; 16 | 17 | if (self) { 18 | 19 | _numLabel = [UILabel new]; 20 | _numLabel.font = [UIFont fontWithName:@"TrebuchetMS-Italic" size:13]; 21 | _numLabel.textColor = [UIColor whiteColor]; 22 | [self addSubview:_numLabel]; 23 | 24 | _titleLabel = [UILabel new]; 25 | _titleLabel.font = [UIFont fontWithName:@"Verdana" size:11]; 26 | _titleLabel.textColor = [UIColor whiteColor]; 27 | [self addSubview:_titleLabel]; 28 | } 29 | 30 | return self; 31 | } 32 | 33 | - (void)layoutSubviews 34 | { 35 | [super layoutSubviews]; 36 | 37 | [_numLabel sizeToFit]; 38 | [_titleLabel sizeToFit]; 39 | 40 | [self setWidth:MAX(_numLabel.width, _titleLabel.width)]; 41 | [UIView BearAutoLayViewArray:(NSMutableArray *)self.subviews layoutAxis:kLAYOUT_AXIS_Y center:YES gapDistance:2]; 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /FlowMenuAnimation/AssignInfoView.h: -------------------------------------------------------------------------------- 1 | // 2 | // AssignInfoView.h 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/7/3. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AssignInfoSingleCellView.h" 11 | 12 | @interface AssignInfoView : UIView 13 | 14 | @property (strong, nonatomic) AssignInfoSingleCellView *assignCellView_1; 15 | @property (strong, nonatomic) AssignInfoSingleCellView *assignCellView_2; 16 | @property (strong, nonatomic) AssignInfoSingleCellView *assignCellView_3; 17 | 18 | - (void)relayUI; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /FlowMenuAnimation/AssignInfoView.m: -------------------------------------------------------------------------------- 1 | // 2 | // AssignInfoView.m 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/7/3. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import "AssignInfoView.h" 10 | 11 | @implementation AssignInfoView 12 | 13 | - (instancetype)initWithFrame:(CGRect)frame 14 | { 15 | self = [super initWithFrame:frame]; 16 | 17 | if (self) { 18 | 19 | _assignCellView_1 = [AssignInfoSingleCellView new]; 20 | [_assignCellView_1 setHeight:self.height]; 21 | [self addSubview:_assignCellView_1]; 22 | 23 | _assignCellView_2 = [AssignInfoSingleCellView new]; 24 | [_assignCellView_2 setHeight:self.height]; 25 | [self addSubview:_assignCellView_2]; 26 | 27 | _assignCellView_3 = [AssignInfoSingleCellView new]; 28 | [_assignCellView_3 setHeight:self.height]; 29 | [self addSubview:_assignCellView_3]; 30 | } 31 | 32 | return self; 33 | } 34 | 35 | - (void)layoutSubviews 36 | { 37 | [super layoutSubviews]; 38 | 39 | [self relayUI]; 40 | } 41 | 42 | - (void)relayUI 43 | { 44 | for (AssignInfoSingleCellView *subView in self.subviews) { 45 | [subView layoutSubviews]; 46 | } 47 | [UIView BearAutoLayViewArray:(NSMutableArray *)self.subviews layoutAxis:kLAYOUT_AXIS_X center:YES gapDistance:30]; 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /FlowMenuAnimation/AssignPointModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // AssignPointModel.h 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/6/30. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AssignPointView.h" 11 | 12 | @interface AssignPointModel : NSObject 13 | 14 | @property (strong, nonatomic) AssignPointView *_controlPointView_0; 15 | @property (strong, nonatomic) AssignPointView *_controlPointView_A; 16 | @property (strong, nonatomic) AssignPointView *_controlPointView_B1; 17 | @property (strong, nonatomic) AssignPointView *_controlPointView_B2; 18 | @property (strong, nonatomic) AssignPointView *_controlPointView_B3; 19 | @property (strong, nonatomic) AssignPointView *_controlPointView_C1; 20 | @property (strong, nonatomic) AssignPointView *_controlPointView_C2; 21 | @property (strong, nonatomic) AssignPointView *_controlPointView_C3; 22 | @property (strong, nonatomic) AssignPointView *_controlPointView_D1; 23 | @property (strong, nonatomic) AssignPointView *_controlPointView_D2; 24 | @property (strong, nonatomic) AssignPointView *_controlPointView_D3; 25 | 26 | @property (strong, nonatomic) AssignPointView *_controlPointView_LeftUp; 27 | @property (strong, nonatomic) AssignPointView *_controlPointView_RightUp; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /FlowMenuAnimation/AssignPointModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // AssignPointModel.m 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/6/30. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import "AssignPointModel.h" 10 | 11 | @implementation AssignPointModel 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /FlowMenuAnimation/AssignPointView.h: -------------------------------------------------------------------------------- 1 | // 2 | // AssignPointView.h 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/6/23. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | static CGFloat poindWidth = 20; 12 | 13 | @interface AssignPointView : UIView 14 | 15 | @property (assign, nonatomic) CGPoint startPoint; 16 | @property (assign, nonatomic) CGPoint finalPoint; 17 | @property (strong, nonatomic) CAShapeLayer *presentationLayer; //演示层 18 | @property (assign, nonatomic) CGPoint prePosition; //演示层position 19 | 20 | + (AssignPointView *)normalPointView_width:(CGFloat)width fillColor:(UIColor *)fillColor; 21 | 22 | + (AssignPointView *)normalPointView; 23 | 24 | + (AssignPointView *)normalPointView_inView:(UIView *)inView finalPoint:(CGPoint)finalPoint; 25 | 26 | // 只有一个点,不会变,左上角和右上角的点 27 | + (AssignPointView *)normalPointView_inView:(UIView *)inView onlyPoint:(CGPoint)onlyPoint; 28 | 29 | - (void)setCenter_start; 30 | - (void)setCenter_final; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /FlowMenuAnimation/AssignPointView.m: -------------------------------------------------------------------------------- 1 | // 2 | // AssignPointView.m 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/6/23. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import "AssignPointView.h" 10 | 11 | @implementation AssignPointView 12 | 13 | + (AssignPointView *)normalPointView_width:(CGFloat)width fillColor:(UIColor *)fillColor 14 | { 15 | AssignPointView *assignPointView = [[AssignPointView alloc] initWithFrame:CGRectMake(0, 0, width, width)]; 16 | assignPointView.backgroundColor = fillColor; 17 | assignPointView.layer.cornerRadius = assignPointView.width / 2.0; 18 | assignPointView.layer.masksToBounds = YES; 19 | 20 | return assignPointView; 21 | } 22 | 23 | 24 | + (AssignPointView *)normalPointView 25 | { 26 | AssignPointView *assignPointView = [[AssignPointView alloc] initWithFrame:CGRectMake(0, 0, poindWidth, poindWidth)]; 27 | if (showAssistantPoint == YES) { 28 | assignPointView.backgroundColor = [UIColor blackColor]; 29 | }else{ 30 | assignPointView.backgroundColor = [UIColor clearColor]; 31 | } 32 | assignPointView.layer.cornerRadius = assignPointView.width / 2.0; 33 | assignPointView.layer.masksToBounds = YES; 34 | 35 | return assignPointView; 36 | } 37 | 38 | + (AssignPointView *)normalPointView_inView:(UIView *)inView finalPoint:(CGPoint)finalPoint 39 | { 40 | AssignPointView *assignPointView = [[AssignPointView alloc] initWithFrame:CGRectMake(0, 0, 20, 20)]; 41 | if (showAssistantPoint == YES) { 42 | assignPointView.backgroundColor = [UIColor blackColor]; 43 | }else{ 44 | assignPointView.backgroundColor = [UIColor clearColor]; 45 | } 46 | assignPointView.layer.cornerRadius = assignPointView.width / 2.0; 47 | assignPointView.layer.masksToBounds = YES; 48 | assignPointView.finalPoint = finalPoint; 49 | 50 | [assignPointView setStartY]; 51 | 52 | [inView addSubview:assignPointView]; 53 | assignPointView.center = assignPointView.startPoint; 54 | 55 | return assignPointView; 56 | } 57 | 58 | // 只有一个点,不会变,左上角和右上角的点 59 | + (AssignPointView *)normalPointView_inView:(UIView *)inView onlyPoint:(CGPoint)onlyPoint 60 | { 61 | AssignPointView *assignPointView = [[AssignPointView alloc] initWithFrame:CGRectMake(0, 0, 20, 20)]; 62 | if (showAssistantPoint == YES) { 63 | assignPointView.backgroundColor = [UIColor blackColor]; 64 | }else{ 65 | assignPointView.backgroundColor = [UIColor clearColor]; 66 | } 67 | assignPointView.layer.cornerRadius = assignPointView.width / 2.0; 68 | assignPointView.layer.masksToBounds = YES; 69 | assignPointView.startPoint = onlyPoint; 70 | 71 | [assignPointView setStartY]; 72 | 73 | [inView addSubview:assignPointView]; 74 | assignPointView.center = assignPointView.startPoint; 75 | 76 | 77 | return assignPointView; 78 | } 79 | 80 | - (void)setStartY 81 | { 82 | self.startPoint = CGPointMake(self.startPoint.x, - 50); 83 | } 84 | 85 | - (void)setCenter_start 86 | { 87 | self.center = _startPoint; 88 | } 89 | 90 | - (void)setCenter_final 91 | { 92 | self.center = _finalPoint; 93 | } 94 | 95 | - (instancetype)initWithFrame:(CGRect)frame 96 | { 97 | self = [super initWithFrame:frame]; 98 | 99 | if (self) { 100 | 101 | } 102 | 103 | return self; 104 | } 105 | 106 | @synthesize finalPoint = _finalPoint; 107 | - (void)setFinalPoint:(CGPoint)finalPoint 108 | { 109 | _finalPoint = finalPoint; 110 | 111 | _startPoint = CGPointMake(finalPoint.x, 0); 112 | } 113 | 114 | @synthesize presentationLayer = _presentationLayer; 115 | - (CAShapeLayer *)presentationLayer 116 | { 117 | _presentationLayer = self.layer.presentationLayer; 118 | return _presentationLayer; 119 | } 120 | 121 | @synthesize prePosition = _prePosition; 122 | - (CGPoint)prePosition 123 | { 124 | _prePosition = self.presentationLayer.position; 125 | return _prePosition; 126 | } 127 | 128 | /* 129 | // Only override drawRect: if you perform custom drawing. 130 | // An empty implementation adversely affects performance during animation. 131 | - (void)drawRect:(CGRect)rect { 132 | // Drawing code 133 | } 134 | */ 135 | 136 | @end 137 | -------------------------------------------------------------------------------- /FlowMenuAnimation/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 | -------------------------------------------------------------------------------- /FlowMenuAnimation/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 | -------------------------------------------------------------------------------- /FlowMenuAnimation/ButtonsView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ButtonsView.h 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/6/23. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef void(^DynamicAnimationCloseFinish)(); 12 | typedef void(^DynamicAnimationShowFinish)(); 13 | 14 | @interface ButtonsView : UIView 15 | 16 | @property (strong, nonatomic) UIBezierPath *beizerPath; 17 | @property (copy, nonatomic) DynamicAnimationCloseFinish dynamicAnimaionCloseFinsh; 18 | @property (copy, nonatomic) DynamicAnimationShowFinish dynamicAnimaionShowFinsh; 19 | 20 | - (instancetype)initWithFrame:(CGRect)frame btnsArray:(NSArray *)btnArray; 21 | 22 | - (void)showBtnsAnimation; 23 | - (void)closeBtnsAniamtion; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /FlowMenuAnimation/ButtonsView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ButtonsView.m 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/6/23. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import "ButtonsView.h" 10 | #import "SpecialBtn.h" 11 | #import "UIView+SetSize.h" 12 | 13 | typedef enum { 14 | kAnimatorStatus_null, 15 | kAnimatorStatus_open, 16 | kAnimatorStatus_close, 17 | }AnimatorStatus; 18 | 19 | @interface ButtonsView () 20 | { 21 | NSArray *_btnArray; 22 | CAShapeLayer *_pathLayer; 23 | UIDynamicAnimator *_animator; 24 | UIAttachmentBehavior *_firstBtnDragBehavior; 25 | AnimatorStatus _animatorStatus; 26 | 27 | UITapGestureRecognizer *_tapGesture; 28 | UIPanGestureRecognizer *_panGesture; 29 | } 30 | 31 | @end 32 | 33 | @implementation ButtonsView 34 | 35 | 36 | 37 | - (instancetype)initWithFrame:(CGRect)frame btnsArray:(NSArray *)btnArray 38 | { 39 | self = [super initWithFrame:CGRectMake(0, -20, frame.size.width, frame.size.height)]; 40 | 41 | if (self) { 42 | 43 | if (showPathBgViewColor == YES) { 44 | self.backgroundColor = [[UIColor brownColor] colorWithAlphaComponent:0.4]; 45 | }else{ 46 | self.backgroundColor = [UIColor clearColor]; 47 | } 48 | 49 | _btnArray = btnArray; 50 | _animatorStatus = kAnimatorStatus_null; 51 | _pathLayer = [CAShapeLayer layer]; 52 | 53 | if (!_animator) { 54 | _animator = [[UIDynamicAnimator alloc] initWithReferenceView:self]; 55 | _animator.delegate = self; 56 | } 57 | 58 | if (needDragGesture) { 59 | _tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(gestureEvent:)]; 60 | _tapGesture.numberOfTapsRequired = 1; 61 | [self addGestureRecognizer:_tapGesture]; 62 | 63 | _panGesture = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(gestureEvent:)]; 64 | [self addGestureRecognizer:_panGesture]; 65 | } 66 | } 67 | 68 | return self; 69 | } 70 | 71 | 72 | #pragma mark - 显现/消退动画 73 | 74 | #pragma mark 显现动画 75 | - (void)showBtnsAnimation 76 | { 77 | _animatorStatus = kAnimatorStatus_open; 78 | [_animator removeAllBehaviors]; 79 | 80 | if (showPath) { 81 | _pathLayer.path = _beizerPath.CGPath; 82 | _pathLayer.fillColor = [UIColor clearColor].CGColor; 83 | _pathLayer.strokeColor = [UIColor orangeColor].CGColor; 84 | _pathLayer.lineWidth = 2.0; 85 | [self.layer addSublayer:_pathLayer]; 86 | } 87 | 88 | CGFloat btn_gap = [self setXX:16]; 89 | for (int i = 0; i < [_btnArray count]; i++) { 90 | 91 | SpecialBtn *tempBtn = _btnArray[i]; 92 | tempBtn.tag = i; 93 | [self addSubview:tempBtn]; 94 | 95 | // 设定初始位置 96 | [tempBtn setX:(tempBtn.width + btn_gap) * ([_btnArray count] - 1 - i) + btn_gap]; 97 | [tempBtn setY:-tempBtn.height]; 98 | 99 | // 添加球与球之间的附着行为 100 | if (i > 0) { 101 | [self addAttachmentBehavior_item:_btnArray[i] attachToItem:_btnArray[i - 1]]; 102 | } 103 | 104 | // 重力行为 105 | UIGravityBehavior *gravityBehavior = [self addGravityBehavior:tempBtn]; 106 | if (i == [_btnArray count] - 1) { 107 | // 最后一个球处理重力行为 108 | [self dealLastBtnGravityBehavior:gravityBehavior tempBtn:tempBtn]; 109 | } 110 | 111 | // 碰撞行为 112 | [self addCollisionBehavior:tempBtn]; 113 | 114 | // 动力元素行为 115 | UIDynamicItemBehavior *itemBehavior = [self addDynamicItemBehavior:tempBtn]; 116 | if (i == [_btnArray count] - 1) { 117 | // 最后一个球增加密度,以防止出现的时候,由于惯性的原因导致飞起来 118 | itemBehavior.density = 1.8; 119 | } 120 | 121 | } 122 | 123 | // 第一个球向右的推力 124 | [self addPushBehavior_inFirstBtn]; 125 | } 126 | 127 | #pragma mark 消退动画 128 | - (void)closeBtnsAniamtion 129 | { 130 | NSLog(@"-- closeBtnsAniamtion"); 131 | 132 | _animatorStatus = kAnimatorStatus_close; 133 | SpecialBtn *lastBtn = (SpecialBtn *)[_btnArray lastObject]; 134 | 135 | [_animator removeAllBehaviors]; 136 | 137 | for (int i = 0; i < [_btnArray count]; i++) { 138 | 139 | // 添加球与球之间的附着行为 140 | if (i > 0) { 141 | 142 | UIAttachmentBehavior *attachmentBehavior = [self addAttachmentBehavior_item:_btnArray[i] attachToItem:_btnArray[i - 1]]; 143 | [attachmentBehavior setFrequency:5]; 144 | [attachmentBehavior setLength:lastBtn.width + 5]; 145 | } 146 | 147 | // 重力行为 148 | UIGravityBehavior *gravityBehavior = [self addGravityBehavior:_btnArray[i]]; 149 | if (i == 0) { 150 | [self dealFirstDisappearBtnGravityBehavior:gravityBehavior tempBtn:_btnArray[i]]; 151 | } 152 | 153 | // 碰撞行为 154 | [self addCollisionBehavior:_btnArray[i]]; 155 | 156 | // 动力元素行为 157 | [self addDynamicItemBehavior:_btnArray[i]]; 158 | } 159 | 160 | // 最后一个球向左push 161 | UIPushBehavior *pushBehavior = [[UIPushBehavior alloc] initWithItems:@[lastBtn] mode:UIPushBehaviorModeContinuous]; 162 | pushBehavior.pushDirection = CGVectorMake(-1, -0.5); 163 | pushBehavior.magnitude = 10.0; 164 | [_animator addBehavior:pushBehavior]; 165 | } 166 | 167 | 168 | 169 | #pragma mark - 添加各种行为 170 | 171 | #pragma mark 重力行为 172 | - (UIGravityBehavior *)addGravityBehavior:(id )item 173 | { 174 | UIGravityBehavior *gravityBehavior = [[UIGravityBehavior alloc] init]; 175 | [gravityBehavior addItem:item]; 176 | [_animator addBehavior:gravityBehavior]; 177 | 178 | return gravityBehavior; 179 | } 180 | 181 | #pragma mark 添加球与球之间的附着行为 182 | - (UIAttachmentBehavior *)addAttachmentBehavior_item:(id )item attachToItem:(id )attachToItem 183 | { 184 | SpecialBtn *tempBtn = (SpecialBtn *)item; 185 | 186 | UIAttachmentBehavior *attachmentBehavior = [[UIAttachmentBehavior alloc] initWithItem:item attachedToItem:attachToItem]; 187 | [attachmentBehavior setLength:tempBtn.width + 20]; 188 | [attachmentBehavior setDamping:10.01]; 189 | [attachmentBehavior setFrequency:1]; 190 | [_animator addBehavior:attachmentBehavior]; 191 | 192 | return attachmentBehavior; 193 | } 194 | 195 | #pragma mark 碰撞行为 196 | - (UICollisionBehavior *)addCollisionBehavior:(id )item 197 | { 198 | UICollisionBehavior *collisionBehavior = [[UICollisionBehavior alloc] init]; 199 | [collisionBehavior addItem:item]; 200 | [collisionBehavior addBoundaryWithIdentifier:@"path" forPath:_beizerPath]; 201 | [_animator addBehavior:collisionBehavior]; 202 | 203 | return collisionBehavior; 204 | } 205 | 206 | #pragma mark 动力元素行为 207 | - (UIDynamicItemBehavior *)addDynamicItemBehavior:(id )item 208 | { 209 | UIDynamicItemBehavior *itemBehavior = [[UIDynamicItemBehavior alloc] initWithItems:@[item]]; 210 | itemBehavior.resistance = 0; 211 | itemBehavior.allowsRotation = YES; 212 | itemBehavior.angularResistance = 4.0; 213 | itemBehavior.friction = 0.8; 214 | [_animator addBehavior:itemBehavior]; 215 | 216 | return itemBehavior; 217 | } 218 | 219 | #pragma mark 显现动画,第一个球向右的推力 220 | - (UIPushBehavior *)addPushBehavior_inFirstBtn 221 | { 222 | UIButton *tempBtn = _btnArray[0]; 223 | UIPushBehavior *pushBehavior = [[UIPushBehavior alloc] initWithItems:@[tempBtn] mode:UIPushBehaviorModeInstantaneous]; 224 | pushBehavior.pushDirection = CGVectorMake(1, 0.3); 225 | pushBehavior.magnitude = 1.6; 226 | [_animator addBehavior:pushBehavior]; 227 | 228 | return pushBehavior; 229 | } 230 | 231 | 232 | 233 | #pragma mark 显现动画时,对最后一个球回滚时的立即响应 234 | - (void)dealLastBtnGravityBehavior:(UIGravityBehavior *)gravityBehavior tempBtn:(SpecialBtn *)tempBtn 235 | { 236 | __block CGPoint positionLast = CGPointMake(0, 0); 237 | __block BOOL pushLeft = NO; 238 | 239 | [gravityBehavior setAction:^{ 240 | 241 | if (pushLeft == NO) { 242 | CGPoint positionNow = tempBtn.layer.position; 243 | 244 | // right 245 | if (positionNow.x - positionLast.x >= 0) { 246 | nil; 247 | } 248 | // left 249 | else{ 250 | 251 | pushLeft = YES; 252 | 253 | [_animator removeAllBehaviors]; 254 | 255 | for (int i = 0; i < [_btnArray count]; i++) { 256 | 257 | // 添加球与球之间的附着行为 258 | if (i > 0) { 259 | 260 | UIAttachmentBehavior *attachmentBehavior = [self addAttachmentBehavior_item:_btnArray[i] attachToItem:_btnArray[i - 1]]; 261 | [attachmentBehavior setFrequency:5]; 262 | [attachmentBehavior setLength:tempBtn.width + 5]; 263 | } 264 | 265 | // 重力行为 266 | [self addGravityBehavior:_btnArray[i]]; 267 | 268 | // 碰撞行为 269 | [self addCollisionBehavior:_btnArray[i]]; 270 | 271 | // 动力元素行为 272 | UIDynamicItemBehavior *itemBehavior = [self addDynamicItemBehavior:_btnArray[i]]; 273 | itemBehavior.angularResistance = 15.0; 274 | } 275 | 276 | // 最后一个球向左push 277 | UIPushBehavior *pushBehavior = [[UIPushBehavior alloc] initWithItems:@[tempBtn] mode:UIPushBehaviorModeContinuous]; 278 | pushBehavior.pushDirection = CGVectorMake(-1, -0.5); 279 | pushBehavior.magnitude = 2.3; 280 | [_animator addBehavior:pushBehavior]; 281 | 282 | // 允许点击按钮 283 | if (_animatorStatus == kAnimatorStatus_open) { 284 | if (self.dynamicAnimaionShowFinsh) { 285 | self.dynamicAnimaionShowFinsh(); 286 | } 287 | } 288 | } 289 | 290 | positionLast = positionNow; 291 | } 292 | }]; 293 | } 294 | 295 | #pragma mark 消退动画时,对一个球消失时的立即响应 296 | - (void)dealFirstDisappearBtnGravityBehavior:(UIGravityBehavior *)gravityBehavior tempBtn:(SpecialBtn *)tempBtn 297 | { 298 | __block BOOL disAppear = NO; 299 | 300 | [gravityBehavior setAction:^{ 301 | 302 | if (disAppear == NO) { 303 | 304 | if (tempBtn.maxY < 20) { 305 | 306 | disAppear = YES; 307 | if (_animatorStatus == kAnimatorStatus_close) { 308 | if (self.dynamicAnimaionCloseFinsh) { 309 | self.dynamicAnimaionCloseFinsh(); 310 | } 311 | } 312 | } 313 | } 314 | 315 | }]; 316 | } 317 | 318 | 319 | #pragma mark - 拖动手势 320 | 321 | - (void)gestureEvent:(UIGestureRecognizer *)gesture 322 | { 323 | CGPoint touchPoint = [gesture locationInView:self]; 324 | NSLog(@"tapPoint :%@", NSStringFromCGPoint(touchPoint)); 325 | 326 | if (gesture.state == UIGestureRecognizerStateBegan) { 327 | [self initDragBehaviourWithAnchorPosition:touchPoint]; 328 | [_animator addBehavior:_firstBtnDragBehavior]; 329 | } 330 | else if (gesture.state == UIGestureRecognizerStateChanged) { 331 | [_firstBtnDragBehavior setAnchorPoint:touchPoint]; 332 | } 333 | else if (gesture.state == UIGestureRecognizerStateEnded) { 334 | [_animator removeBehavior:_firstBtnDragBehavior]; 335 | } 336 | } 337 | 338 | - (void)initDragBehaviourWithAnchorPosition:(CGPoint)anchorPosition { 339 | UIView *ballView = [_btnArray lastObject]; 340 | _firstBtnDragBehavior = [[UIAttachmentBehavior alloc] initWithItem:ballView attachedToAnchor:anchorPosition]; 341 | double length = [self getDistanceBetweenAnchor:anchorPosition andBallView:ballView]; 342 | [_firstBtnDragBehavior setLength:((CGFloat) length < 20) ? (CGFloat) length : 20]; 343 | } 344 | 345 | - (double)getDistanceBetweenAnchor:(CGPoint)anchor andBallView:(UIView *)ballView { 346 | return sqrt(pow((anchor.x - ballView.center.x), 2.0) + pow((anchor.y - ballView.center.y), 2.0)); 347 | } 348 | 349 | #pragma mark - UIDynamicAnimatorDelegate 350 | 351 | - (void)dynamicAnimatorWillResume:(UIDynamicAnimator *)animator 352 | { 353 | NSLog(@"--dynamicAnimatorWillResume"); 354 | } 355 | 356 | - (void)dynamicAnimatorDidPause:(UIDynamicAnimator *)animator 357 | { 358 | NSLog(@"--dynamicAnimatorDidPause"); 359 | } 360 | 361 | 362 | @end 363 | -------------------------------------------------------------------------------- /FlowMenuAnimation/CellDataModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // CellDataModel.h 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/7/3. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CellDataModel : NSObject 12 | 13 | @property (strong, nonatomic) NSString *nameStr; 14 | @property (strong, nonatomic) NSString *imageNameStr; 15 | @property (strong, nonatomic) NSString *followersNum; 16 | @property (strong, nonatomic) NSString *favoritesNum; 17 | @property (strong, nonatomic) NSString *viewsNum; 18 | 19 | @property (strong, nonatomic) UIColor *myColor_dark; 20 | @property (strong, nonatomic) UIColor *myColor_normal; 21 | @property (strong, nonatomic) UIColor *myColor_light; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /FlowMenuAnimation/CellDataModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // CellDataModel.m 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/7/3. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import "CellDataModel.h" 10 | 11 | @implementation CellDataModel 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /FlowMenuAnimation/FlowMenuView.h: -------------------------------------------------------------------------------- 1 | // 2 | // FlowMenuView.h 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/6/22. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MainInfoView.h" 11 | #import "AssignInfoView.h" 12 | #import "CellDataModel.h" 13 | 14 | @interface FlowMenuView : UIView 15 | 16 | @property (strong, nonatomic) MainInfoView *mainInfoView; 17 | @property (strong, nonatomic) AssignInfoView *assignInfoView; 18 | 19 | - (instancetype)initWithFrame:(CGRect)frame withDataModel:(CellDataModel *)dataModel; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /FlowMenuAnimation/FlowMenuView.m: -------------------------------------------------------------------------------- 1 | // 2 | // FlowMenuView.m 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/6/22. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import "FlowMenuView.h" 10 | #import "AssignPointView.h" 11 | #import "ButtonsView.h" 12 | #import "SpecialBtn.h" 13 | #import "AssignPointModel.h" 14 | #import "UIView+SetSize.h" 15 | #import "StartBtn.h" 16 | 17 | static CGFloat moveInfoView_AnimationDuring = 0.3; 18 | static CGFloat grooveLayer_AnimationDuring = 0.5; 19 | 20 | @interface FlowMenuView () 21 | { 22 | UIBezierPath *_bezierPath_downGroove; 23 | CAShapeLayer *_grooveBgLayer; 24 | UIView *_grooveBgView; 25 | 26 | CADisplayLink *_displayLink; 27 | BOOL _showGrooveLayer; 28 | 29 | ButtonsView *_buttonsView; 30 | AssignPointModel *_assignPointModel; 31 | CellDataModel *_dataModel; 32 | } 33 | 34 | @property (strong, nonatomic) StartBtn *startBtn; 35 | 36 | @end 37 | 38 | 39 | @implementation FlowMenuView 40 | 41 | - (instancetype)initWithFrame:(CGRect)frame withDataModel:(CellDataModel *)dataModel 42 | { 43 | self = [super initWithFrame:frame]; 44 | 45 | if (self) { 46 | 47 | if (flowViewClipBounds) { 48 | self.clipsToBounds = YES; 49 | } 50 | 51 | self.backgroundColor = dataModel.myColor_light; 52 | _showGrooveLayer = NO; 53 | _dataModel = dataModel; 54 | 55 | [self createInfoView]; 56 | [self createUI]; 57 | } 58 | 59 | return self; 60 | } 61 | 62 | - (void)createInfoView 63 | { 64 | _mainInfoView = [[MainInfoView alloc] initWithFrame:CGRectMake(0, self.height * 0.32, self.width, 40)]; 65 | _mainInfoView.backgroundColor = [UIColor clearColor]; 66 | [self addSubview:_mainInfoView]; 67 | 68 | _assignInfoView = [[AssignInfoView alloc] initWithFrame:CGRectMake(0, _mainInfoView.maxY + self.height * 0.05, self.width, 50)]; 69 | _assignInfoView.backgroundColor = [UIColor clearColor]; 70 | [self addSubview:_assignInfoView]; 71 | } 72 | 73 | - (void)createUI 74 | { 75 | _grooveBgView = [[UIView alloc] initWithFrame:self.bounds]; 76 | [self addSubview:_grooveBgView]; 77 | 78 | // 初始化控制点 79 | 80 | CGFloat offScreen_x = 100; //超屏距离 81 | UIView *myView = self; 82 | CGPoint _point_0 = [self setPoint:-offScreen_x y:0]; 83 | CGPoint _point_A = [self setPoint:201.77 y:1.02]; 84 | CGPoint _point_B1 = [self setPoint:379.3 y:64.23]; 85 | CGPoint _point_B2 = [self setPoint:201.77 y:1.02]; 86 | CGPoint _point_B3 = [self setPoint:279.69 y:-6.26]; 87 | CGPoint _point_C1 = [self setPoint:658.03 y:387.82]; 88 | CGPoint _point_C2 = [self setPoint:481.08 y:136.27]; 89 | CGPoint _point_C3 = [self setPoint:530.1 y:350.79]; 90 | CGPoint _point_D1 = [self setPoint:1068.9 y:29.54]; 91 | CGPoint _point_D2 = [self setPoint:931.82 y:467.08]; 92 | CGPoint _point_D3 = [self setPoint:1068.9 y:29.54]; 93 | 94 | _assignPointModel = [AssignPointModel new]; 95 | _assignPointModel._controlPointView_0 = [AssignPointView normalPointView_inView:myView finalPoint:_point_0]; 96 | _assignPointModel._controlPointView_A = [AssignPointView normalPointView_inView:myView finalPoint:_point_A]; 97 | _assignPointModel._controlPointView_B1 = [AssignPointView normalPointView_inView:myView finalPoint:_point_B1]; 98 | _assignPointModel._controlPointView_B2 = [AssignPointView normalPointView_inView:myView finalPoint:_point_B2]; 99 | _assignPointModel._controlPointView_B3 = [AssignPointView normalPointView_inView:myView finalPoint:_point_B3]; 100 | _assignPointModel._controlPointView_C1 = [AssignPointView normalPointView_inView:myView finalPoint:_point_C1]; 101 | _assignPointModel._controlPointView_C2 = [AssignPointView normalPointView_inView:myView finalPoint:_point_C2]; 102 | _assignPointModel._controlPointView_C3 = [AssignPointView normalPointView_inView:myView finalPoint:_point_C3]; 103 | _assignPointModel._controlPointView_D1 = [AssignPointView normalPointView_inView:myView finalPoint:_point_D1]; 104 | _assignPointModel._controlPointView_D2 = [AssignPointView normalPointView_inView:myView finalPoint:_point_D2]; 105 | _assignPointModel._controlPointView_D3 = [AssignPointView normalPointView_inView:myView finalPoint:_point_D3]; 106 | 107 | _assignPointModel._controlPointView_LeftUp = [AssignPointView normalPointView_inView:myView onlyPoint:CGPointMake(-offScreen_x, 0)]; 108 | _assignPointModel._controlPointView_RightUp = [AssignPointView normalPointView_inView:myView onlyPoint:CGPointMake(self.width + offScreen_x, 0)]; 109 | 110 | 111 | // 初始化贝塞尔曲线 112 | [self updateGrooveLayer]; 113 | 114 | _displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(updateGrooveLayer)]; 115 | [_displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; 116 | _displayLink.paused = YES; 117 | 118 | 119 | // 开始按钮 120 | CGFloat btn_width = [self setXX:172]; 121 | _startBtn = [[StartBtn alloc] initWithFrame:CGRectMake(self.width - btn_width, 0, btn_width, btn_width) withDataModel:_dataModel]; 122 | [_startBtn addTarget:self action:@selector(startBtn_Event) forControlEvents:UIControlEventTouchUpInside]; 123 | [self addSubview:_startBtn]; 124 | } 125 | 126 | // 初始化设置buttonsView 127 | - (void)initSetButtonsView 128 | { 129 | CGFloat btn_width = 46; 130 | NSMutableArray *btnsArray = [NSMutableArray new]; 131 | 132 | SpecialBtn *btn_1 = [[SpecialBtn alloc] initWithFrame:CGRectMake(0, 0, btn_width, btn_width)]; 133 | btn_1.layer.cornerRadius = btn_1.width / 2.0; 134 | btn_1.layer.masksToBounds = YES; 135 | btn_1.collisionBoundsType = UIDynamicItemCollisionBoundsTypeEllipse; 136 | [btn_1 setImage:[UIImage imageNamed:@"share"] forState:UIControlStateNormal]; 137 | btn_1.backgroundColor = [UIColor whiteColor]; 138 | [btnsArray addObject:btn_1]; 139 | 140 | SpecialBtn *btn_2 = [[SpecialBtn alloc] initWithFrame:CGRectMake(0, 0, btn_width, btn_width)]; 141 | btn_2.layer.cornerRadius = btn_2.width / 2.0; 142 | btn_2.layer.masksToBounds = YES; 143 | btn_2.collisionBoundsType = UIDynamicItemCollisionBoundsTypeEllipse; 144 | [btn_2 setImage:[UIImage imageNamed:@"like"] forState:UIControlStateNormal]; 145 | btn_2.backgroundColor = [UIColor whiteColor]; 146 | [btnsArray addObject:btn_2]; 147 | 148 | SpecialBtn *btn_3 = [[SpecialBtn alloc] initWithFrame:CGRectMake(0, 0, btn_width, btn_width)]; 149 | btn_3.layer.cornerRadius = btn_3.width / 2.0; 150 | btn_3.layer.masksToBounds = YES; 151 | btn_3.collisionBoundsType = UIDynamicItemCollisionBoundsTypeEllipse; 152 | [btn_3 setImage:[UIImage imageNamed:@"add"] forState:UIControlStateNormal]; 153 | btn_3.backgroundColor = [UIColor whiteColor]; 154 | [btnsArray addObject:btn_3]; 155 | 156 | __weak __typeof__(self) weakSelf = self; 157 | _buttonsView = [[ButtonsView alloc] initWithFrame:self.bounds btnsArray:btnsArray]; 158 | _buttonsView.hidden = YES; 159 | _buttonsView.dynamicAnimaionCloseFinsh = ^(){ 160 | NSLog(@"--_buttonsView.dynamicAnimaionCloseFinsh"); 161 | [weakSelf closeGrooveAniamtion]; 162 | [weakSelf moveCenterInfoViewAniamtion]; 163 | }; 164 | _buttonsView.dynamicAnimaionShowFinsh = ^(){ 165 | weakSelf.startBtn.enabled = YES; 166 | }; 167 | [self addSubview:_buttonsView]; 168 | } 169 | 170 | #pragma mark - 左移/复位InfoView 171 | 172 | - (void)moveLeftInfoViewAniamtion 173 | { 174 | [UIView animateWithDuration:moveInfoView_AnimationDuring 175 | delay:0 176 | options:UIViewAnimationOptionCurveEaseInOut 177 | animations:^{ 178 | [self.mainInfoView setCenterX:0]; 179 | } completion:^(BOOL finished) { 180 | nil; 181 | }]; 182 | 183 | [UIView animateWithDuration:moveInfoView_AnimationDuring 184 | delay:0 185 | options:UIViewAnimationOptionCurveLinear 186 | animations:^{ 187 | [self.assignInfoView setCenterX:0]; 188 | } completion:^(BOOL finished) { 189 | nil; 190 | }]; 191 | } 192 | 193 | - (void)moveCenterInfoViewAniamtion 194 | { 195 | CGFloat delayTime = 0.3; 196 | 197 | [UIView animateWithDuration:moveInfoView_AnimationDuring 198 | delay:delayTime 199 | options:UIViewAnimationOptionCurveEaseInOut 200 | animations:^{ 201 | [self.mainInfoView BearSetCenterToParentViewWithAxis:kAXIS_X]; 202 | } completion:^(BOOL finished) { 203 | nil; 204 | }]; 205 | 206 | [UIView animateWithDuration:moveInfoView_AnimationDuring 207 | delay:delayTime 208 | options:UIViewAnimationOptionCurveLinear 209 | animations:^{ 210 | [self.assignInfoView BearSetCenterToParentViewWithAxis:kAXIS_X]; 211 | } completion:^(BOOL finished) { 212 | nil; 213 | }]; 214 | } 215 | 216 | #pragma mark - 显示/关闭沟槽动画 217 | 218 | - (void)showGrooveAniamtion 219 | { 220 | _displayLink.paused = NO; 221 | [UIView animateWithDuration:grooveLayer_AnimationDuring animations:^{ 222 | 223 | [_assignPointModel._controlPointView_0 setCenter_final]; 224 | [_assignPointModel._controlPointView_A setCenter_final]; 225 | [_assignPointModel._controlPointView_B1 setCenter_final]; 226 | [_assignPointModel._controlPointView_B2 setCenter_final]; 227 | [_assignPointModel._controlPointView_B3 setCenter_final]; 228 | [_assignPointModel._controlPointView_C1 setCenter_final]; 229 | [_assignPointModel._controlPointView_C2 setCenter_final]; 230 | [_assignPointModel._controlPointView_C3 setCenter_final]; 231 | [_assignPointModel._controlPointView_D1 setCenter_final]; 232 | [_assignPointModel._controlPointView_D2 setCenter_final]; 233 | [_assignPointModel._controlPointView_D3 setCenter_final]; 234 | 235 | }completion:^(BOOL finished) { 236 | 237 | _displayLink.paused = YES; 238 | 239 | [self initSetButtonsView]; 240 | [self bringSubviewToFront:_buttonsView]; 241 | [self bringSubviewToFront:_startBtn]; 242 | _buttonsView.hidden = NO; 243 | _buttonsView.beizerPath = _bezierPath_downGroove; 244 | [_buttonsView showBtnsAnimation]; 245 | }]; 246 | } 247 | 248 | - (void)closeGrooveAniamtion 249 | { 250 | _displayLink.paused = NO; 251 | [UIView animateWithDuration:grooveLayer_AnimationDuring animations:^{ 252 | 253 | [_assignPointModel._controlPointView_0 setCenter_start]; 254 | [_assignPointModel._controlPointView_A setCenter_start]; 255 | [_assignPointModel._controlPointView_B1 setCenter_start]; 256 | [_assignPointModel._controlPointView_B2 setCenter_start]; 257 | [_assignPointModel._controlPointView_B3 setCenter_start]; 258 | [_assignPointModel._controlPointView_C1 setCenter_start]; 259 | [_assignPointModel._controlPointView_C2 setCenter_start]; 260 | [_assignPointModel._controlPointView_C3 setCenter_start]; 261 | [_assignPointModel._controlPointView_D1 setCenter_start]; 262 | [_assignPointModel._controlPointView_D2 setCenter_start]; 263 | [_assignPointModel._controlPointView_D3 setCenter_start]; 264 | 265 | }completion:^(BOOL finished) { 266 | _displayLink.paused = YES; 267 | _buttonsView.hidden = YES; 268 | [_buttonsView removeFromSuperview]; 269 | _buttonsView = nil; 270 | _startBtn.enabled = YES; 271 | }]; 272 | } 273 | 274 | 275 | #pragma mark - 更新沟槽图层 276 | 277 | - (void)updateGrooveLayer 278 | { 279 | if (!_bezierPath_downGroove) { 280 | _bezierPath_downGroove = [UIBezierPath bezierPath]; 281 | } 282 | 283 | if (!_grooveBgLayer) { 284 | _grooveBgLayer = [CAShapeLayer layer]; 285 | BOOL showFillColor = YES; 286 | if (showFillColor) { 287 | _grooveBgLayer.fillColor = _dataModel.myColor_normal.CGColor; 288 | }else{ 289 | _grooveBgLayer.fillColor = [UIColor clearColor].CGColor; 290 | _grooveBgLayer.strokeColor = [UIColor greenColor].CGColor; 291 | _grooveBgLayer.lineWidth = 2.0; 292 | } 293 | } 294 | 295 | 296 | [_bezierPath_downGroove removeAllPoints]; 297 | _bezierPath_downGroove = UIBezierPath.bezierPath; 298 | [_bezierPath_downGroove moveToPoint: _assignPointModel._controlPointView_0.prePosition]; 299 | [_bezierPath_downGroove addLineToPoint: _assignPointModel._controlPointView_A.prePosition]; 300 | [_bezierPath_downGroove addCurveToPoint: _assignPointModel._controlPointView_B1.prePosition 301 | controlPoint1: _assignPointModel._controlPointView_B2.prePosition 302 | controlPoint2: _assignPointModel._controlPointView_B3.prePosition]; 303 | [_bezierPath_downGroove addCurveToPoint: _assignPointModel._controlPointView_C1.prePosition 304 | controlPoint1: _assignPointModel._controlPointView_C2.prePosition 305 | controlPoint2: _assignPointModel._controlPointView_C3.prePosition]; 306 | [_bezierPath_downGroove addCurveToPoint: _assignPointModel._controlPointView_D1.prePosition 307 | controlPoint1: _assignPointModel._controlPointView_D2.prePosition 308 | controlPoint2: _assignPointModel._controlPointView_D3.prePosition]; 309 | 310 | [_bezierPath_downGroove addLineToPoint:_assignPointModel._controlPointView_RightUp.prePosition]; 311 | [_bezierPath_downGroove addLineToPoint:_assignPointModel._controlPointView_LeftUp.prePosition]; 312 | [_bezierPath_downGroove closePath]; 313 | 314 | 315 | _grooveBgLayer.path = _bezierPath_downGroove.CGPath; 316 | [_grooveBgView.layer addSublayer:_grooveBgLayer]; 317 | } 318 | 319 | 320 | #pragma mark - btnClick 321 | 322 | - (void)startBtn_Event 323 | { 324 | _showGrooveLayer = !_showGrooveLayer; 325 | _startBtn.selected = _showGrooveLayer; 326 | _startBtn.enabled = NO; 327 | 328 | if (_showGrooveLayer) { 329 | NSLog(@"--1"); 330 | [self showGrooveAniamtion]; 331 | [self moveLeftInfoViewAniamtion]; 332 | 333 | }else{ 334 | NSLog(@"--2"); 335 | [_buttonsView closeBtnsAniamtion]; 336 | } 337 | } 338 | 339 | @end 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | -------------------------------------------------------------------------------- /FlowMenuAnimation/FlowMenuViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // FlowMenuViewCell.h 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/7/3. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "FlowMenuView.h" 11 | #import "CellDataModel.h" 12 | 13 | @interface FlowMenuViewCell : UITableViewCell 14 | 15 | @property (strong, nonatomic) FlowMenuView *flowMenuView; 16 | 17 | - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier withDataModel:(CellDataModel *)dataModel; 18 | 19 | - (void)relayUI; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /FlowMenuAnimation/FlowMenuViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // FlowMenuViewself.m 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/7/3. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import "FlowMenuViewCell.h" 10 | 11 | @implementation FlowMenuViewCell 12 | 13 | - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier withDataModel:(CellDataModel *)dataModel 14 | { 15 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 16 | 17 | if (self) { 18 | 19 | CGFloat width = WIDTH; 20 | CGFloat height = 220.0 / 372 * width; 21 | 22 | _flowMenuView = [[FlowMenuView alloc] initWithFrame:CGRectMake(0, 0, width, height) withDataModel:dataModel]; 23 | [self loadData:dataModel]; 24 | [self.contentView addSubview:_flowMenuView]; 25 | } 26 | 27 | return self; 28 | } 29 | 30 | - (void)loadData:(CellDataModel *)dataModel 31 | { 32 | self.flowMenuView.mainInfoView.label.text = dataModel.nameStr; 33 | self.flowMenuView.mainInfoView.imageView.image = [UIImage imageNamed:dataModel.imageNameStr]; 34 | self.flowMenuView.assignInfoView.assignCellView_1.numLabel.text = dataModel.followersNum; 35 | self.flowMenuView.assignInfoView.assignCellView_2.numLabel.text = dataModel.favoritesNum; 36 | self.flowMenuView.assignInfoView.assignCellView_3.numLabel.text = dataModel.viewsNum; 37 | self.flowMenuView.assignInfoView.assignCellView_1.titleLabel.text = @"FOLLOWERS"; 38 | self.flowMenuView.assignInfoView.assignCellView_2.titleLabel.text = @"FAVORITES"; 39 | self.flowMenuView.assignInfoView.assignCellView_3.titleLabel.text = @"VIEWS"; 40 | } 41 | 42 | - (void)layoutSubviews 43 | { 44 | [super layoutSubviews]; 45 | 46 | [self relayUI]; 47 | } 48 | 49 | - (void)relayUI 50 | { 51 | [_flowMenuView.assignInfoView relayUI]; 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /FlowMenuAnimation/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 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /FlowMenuAnimation/MainInfoView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MainInfoView.h 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/7/3. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MainInfoView : UIView 12 | 13 | @property (strong, nonatomic) UIImageView *imageView; 14 | @property (strong, nonatomic) UILabel *label; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /FlowMenuAnimation/MainInfoView.m: -------------------------------------------------------------------------------- 1 | // 2 | // MainInfoView.m 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/7/3. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import "MainInfoView.h" 10 | 11 | @implementation MainInfoView 12 | 13 | - (instancetype)initWithFrame:(CGRect)frame 14 | { 15 | self = [super initWithFrame:frame]; 16 | 17 | if (self) { 18 | 19 | _imageView = [UIImageView new]; 20 | [self addSubview:_imageView]; 21 | 22 | _label = [UILabel new]; 23 | _label.font = [UIFont fontWithName:@"ArialRoundedMTBold" size:20]; 24 | _label.textColor = [UIColor whiteColor]; 25 | [self addSubview:_label]; 26 | } 27 | 28 | return self; 29 | } 30 | 31 | - (void)layoutSubviews 32 | { 33 | [_imageView sizeToFit]; 34 | [_label sizeToFit]; 35 | 36 | [UIView BearAutoLayViewArray:(NSMutableArray *)self.subviews layoutAxis:kLAYOUT_AXIS_X center:YES gapDistance:10]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /FlowMenuAnimation/PrefixHeader.pch: -------------------------------------------------------------------------------- 1 | // 2 | // PrefixHeader.pch 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/6/22. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #ifndef PrefixHeader_pch 10 | #define PrefixHeader_pch 11 | 12 | #import "UIView+BearSet.h" 13 | #import "BearConstants.h" 14 | #import "AppDelegate.h" 15 | 16 | // Include any system framework and library headers here that should be included in all compilation units. 17 | // You will also need to set the Prefix Header build setting of one or more of your targets to reference this file. 18 | 19 | #endif /* PrefixHeader_pch */ 20 | -------------------------------------------------------------------------------- /FlowMenuAnimation/SpecialBtn.h: -------------------------------------------------------------------------------- 1 | // 2 | // SpecialBtn.h 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/6/23. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SpecialBtn : UIButton 12 | 13 | @property (nonatomic) UIDynamicItemCollisionBoundsType collisionBoundsType NS_AVAILABLE_IOS(9_0); 14 | @property (strong, nonatomic) CAKeyframeAnimation *keyFrameAniamtion; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /FlowMenuAnimation/SpecialBtn.m: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // SpecialBtn.m 4 | // FlowMenuAnimation 5 | // 6 | // Created by Bear on 16/6/23. 7 | // Copyright © 2016年 Bear. All rights reserved. 8 | // 9 | 10 | #import "SpecialBtn.h" 11 | 12 | @interface SpecialBtn () 13 | 14 | @end 15 | 16 | @implementation SpecialBtn 17 | 18 | @synthesize collisionBoundsType; 19 | 20 | - (instancetype)initWithFrame:(CGRect)frame 21 | { 22 | self = [super initWithFrame:frame]; 23 | 24 | if (self) { 25 | 26 | _keyFrameAniamtion = [CAKeyframeAnimation animation]; 27 | } 28 | 29 | return self; 30 | } 31 | 32 | /* 33 | // Only override drawRect: if you perform custom drawing. 34 | // An empty implementation adversely affects performance during animation. 35 | - (void)drawRect:(CGRect)rect { 36 | // Drawing code 37 | } 38 | */ 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /FlowMenuAnimation/StartBtn.h: -------------------------------------------------------------------------------- 1 | // 2 | // StartBtn.h 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/7/3. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "CellDataModel.h" 11 | 12 | @interface StartBtn : UIButton 13 | 14 | - (instancetype)initWithFrame:(CGRect)frame withDataModel:(CellDataModel *)dataModel; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /FlowMenuAnimation/StartBtn.m: -------------------------------------------------------------------------------- 1 | // 2 | // StartBtn.m 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/7/3. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import "StartBtn.h" 10 | #import "ArrowAnimationView.h" 11 | 12 | 13 | 14 | @interface StartBtn () 15 | { 16 | CAShapeLayer *_bgShapeLayer; 17 | UIBezierPath *_bgBezierPath; 18 | ArrowAnimationView *_arrowAnimationView; 19 | } 20 | 21 | @end 22 | 23 | @implementation StartBtn 24 | 25 | - (instancetype)initWithFrame:(CGRect)frame withDataModel:(CellDataModel *)dataModel 26 | { 27 | self = [super initWithFrame:frame]; 28 | 29 | if (self) { 30 | 31 | self.backgroundColor = dataModel.myColor_dark; 32 | 33 | _bgBezierPath = [UIBezierPath bezierPath]; 34 | [_bgBezierPath moveToPoint:CGPointMake(0, 0)]; 35 | [_bgBezierPath addArcWithCenter:CGPointMake(self.width, 0) radius:self.width startAngle:M_PI endAngle:M_PI_2 clockwise:NO]; 36 | [_bgBezierPath addLineToPoint:CGPointMake(self.width, 0)]; 37 | [_bgBezierPath closePath]; 38 | 39 | _bgShapeLayer = [CAShapeLayer layer]; 40 | _bgShapeLayer.fillColor = dataModel.myColor_dark.CGColor; 41 | _bgShapeLayer.path = _bgBezierPath.CGPath; 42 | self.layer.mask = _bgShapeLayer; 43 | 44 | CGFloat _arrow_width = 18; 45 | CGFloat _arrow_height = 9; 46 | _arrowAnimationView = [[ArrowAnimationView alloc] initWithFrame:CGRectMake(self.width - _arrow_width - 18, 23, _arrow_width, _arrow_height)]; 47 | _arrowAnimationView.backgroundColor = [UIColor clearColor]; 48 | [self addSubview:_arrowAnimationView]; 49 | } 50 | 51 | return self; 52 | } 53 | 54 | - (void)setSelected:(BOOL)selected 55 | { 56 | _arrowAnimationView.open = !selected; 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /FlowMenuAnimation/UIView+SetSize.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+SetSize.h 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/7/3. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (SetSize) 12 | 13 | - (CGFloat)setXX:(CGFloat)xx; 14 | - (CGPoint)setPoint:(CGFloat)x y:(CGFloat)y; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /FlowMenuAnimation/UIView+SetSize.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+SetSize.m 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/7/3. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import "UIView+SetSize.h" 10 | 11 | static CGFloat origin_width = 896; 12 | static CGFloat origin_height = 483; 13 | 14 | @implementation UIView (SetSize) 15 | 16 | - (CGFloat)setXX:(CGFloat)xx 17 | { 18 | CGFloat reffer_width = origin_width; 19 | CGFloat returnXX = 1.0 * xx / reffer_width * self.width; 20 | 21 | return returnXX; 22 | } 23 | 24 | - (CGPoint)setPoint:(CGFloat)x y:(CGFloat)y 25 | { 26 | CGFloat reffer_width = origin_width; 27 | CGFloat reffer_height = origin_height; 28 | 29 | CGPoint returnPoint = CGPointMake(1.0 * x / reffer_width * self.width, 1.0 * y / reffer_height * self.height); 30 | return returnPoint; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /FlowMenuAnimation/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/6/22. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /FlowMenuAnimation/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/6/22. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "FlowMenuView.h" 11 | #import "FlowMenuViewCell.h" 12 | #import "CellDataModel.h" 13 | 14 | @interface ViewController () 15 | { 16 | UITableView *_mainTableView; 17 | FlowMenuView *_flowMenuView; 18 | NSMutableArray *_dataModelArray; 19 | } 20 | 21 | @end 22 | 23 | @implementation ViewController 24 | 25 | - (void)viewDidLoad { 26 | [super viewDidLoad]; 27 | 28 | [self initSetDataArray]; 29 | [self createUI]; 30 | } 31 | 32 | - (void)createUI 33 | { 34 | if (showSingleFlowDemo == NO) { 35 | _mainTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT)]; 36 | _mainTableView.delegate = self; 37 | _mainTableView.dataSource = self; 38 | _mainTableView.tableFooterView = [UIView new]; 39 | _mainTableView.separatorStyle = UITableViewCellSeparatorStyleNone; 40 | _mainTableView.backgroundColor = UIColorFromHEX(0x61cab4); 41 | [self.view addSubview:_mainTableView]; 42 | } 43 | 44 | else{ 45 | CGFloat width = WIDTH; 46 | CGFloat height = 220.0 / 372 * width; 47 | 48 | CellDataModel *dataModel =_dataModelArray[0]; 49 | _flowMenuView = [[FlowMenuView alloc] initWithFrame:CGRectMake(0, 200, width, height) withDataModel:dataModel]; 50 | [self loadData:dataModel]; 51 | [self.view addSubview:_flowMenuView]; 52 | } 53 | } 54 | 55 | - (void)loadData:(CellDataModel *)dataModel 56 | { 57 | _flowMenuView.mainInfoView.label.text = dataModel.nameStr; 58 | _flowMenuView.mainInfoView.imageView.image = [UIImage imageNamed:dataModel.imageNameStr]; 59 | _flowMenuView.assignInfoView.assignCellView_1.numLabel.text = dataModel.followersNum; 60 | _flowMenuView.assignInfoView.assignCellView_2.numLabel.text = dataModel.favoritesNum; 61 | _flowMenuView.assignInfoView.assignCellView_3.numLabel.text = dataModel.viewsNum; 62 | _flowMenuView.assignInfoView.assignCellView_1.titleLabel.text = @"FOLLOWERS"; 63 | _flowMenuView.assignInfoView.assignCellView_2.titleLabel.text = @"FAVORITES"; 64 | _flowMenuView.assignInfoView.assignCellView_3.titleLabel.text = @"VIEWS"; 65 | } 66 | 67 | - (void)initSetDataArray 68 | { 69 | _dataModelArray = [NSMutableArray new]; 70 | 71 | [self addModel_NightLife]; 72 | [self addModel_ArtCulture]; 73 | [self addModel_FoodFestivals]; 74 | [self addModel_NightLife]; 75 | [self addModel_ArtCulture]; 76 | [self addModel_FoodFestivals]; 77 | } 78 | 79 | #define redDark UIColorFromHEX(0xcb5558) 80 | #define red UIColorFromHEX(0xd45d6e) 81 | #define redLight UIColorFromHEX(0xd7637e) 82 | 83 | - (void)addModel_NightLife 84 | { 85 | CellDataModel *tempModel = [CellDataModel new]; 86 | tempModel.nameStr = @"Night life"; 87 | tempModel.imageNameStr = @"wine"; 88 | tempModel.followersNum = @"517"; 89 | tempModel.favoritesNum = @"315"; 90 | tempModel.viewsNum = @"7815"; 91 | tempModel.myColor_dark = UIColorFromHEX(0xcb5558); 92 | tempModel.myColor_normal = UIColorFromHEX(0xd45d6e); 93 | tempModel.myColor_light = UIColorFromHEX(0xd7637e); 94 | [_dataModelArray addObject:tempModel]; 95 | } 96 | 97 | - (void)addModel_ArtCulture 98 | { 99 | CellDataModel *tempModel = [CellDataModel new]; 100 | tempModel.nameStr = @"Art & Culture"; 101 | tempModel.imageNameStr = @"art"; 102 | tempModel.followersNum = @"437"; 103 | tempModel.favoritesNum = @"526"; 104 | tempModel.viewsNum = @"8361"; 105 | tempModel.myColor_dark = UIColorFromHEX(0x5abca7); 106 | tempModel.myColor_normal = UIColorFromHEX(0x61cab4); 107 | tempModel.myColor_light = UIColorFromHEX(0x66d3bc); 108 | [_dataModelArray addObject:tempModel]; 109 | } 110 | 111 | - (void)addModel_FoodFestivals 112 | { 113 | CellDataModel *tempModel = [CellDataModel new]; 114 | tempModel.nameStr = @"Foot festivals"; 115 | tempModel.imageNameStr = @"food"; 116 | tempModel.followersNum = @"472"; 117 | tempModel.favoritesNum = @"214"; 118 | tempModel.viewsNum = @"2741"; 119 | tempModel.myColor_dark = UIColorFromHEX(0xb752eb); 120 | tempModel.myColor_normal = UIColorFromHEX(0xc165f0); 121 | tempModel.myColor_light = UIColorFromHEX(0xc873f4); 122 | [_dataModelArray addObject:tempModel]; 123 | } 124 | 125 | 126 | 127 | #pragma mark - tableView delegate 128 | 129 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 130 | { 131 | return [_dataModelArray count]; 132 | } 133 | 134 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 135 | { 136 | return 220.0 / 372 * WIDTH; 137 | } 138 | 139 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 140 | { 141 | NSString *cellID = @"cellID"; 142 | 143 | // 此处暂时不用复用机制 144 | // FlowMenuViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID]; 145 | // if (!cell) { 146 | // cell = [[FlowMenuViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID]; 147 | // } 148 | 149 | FlowMenuViewCell *cell = [[FlowMenuViewCell alloc] initWithStyle:UITableViewCellStyleDefault 150 | reuseIdentifier:cellID 151 | withDataModel:_dataModelArray[indexPath.row]]; 152 | cell.selectionStyle = UITableViewCellSelectionStyleNone; 153 | [cell relayUI]; 154 | 155 | return cell; 156 | } 157 | 158 | - (void)didReceiveMemoryWarning { 159 | [super didReceiveMemoryWarning]; 160 | // Dispose of any resources that can be recreated. 161 | } 162 | 163 | @end 164 | -------------------------------------------------------------------------------- /FlowMenuAnimation/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // FlowMenuAnimation 4 | // 5 | // Created by Bear on 16/6/22. 6 | // Copyright © 2016年 Bear. 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 | -------------------------------------------------------------------------------- /FlowMenuAnimationTests/FlowMenuAnimationTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // FlowMenuAnimationTests.m 3 | // FlowMenuAnimationTests 4 | // 5 | // Created by Bear on 16/6/22. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FlowMenuAnimationTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation FlowMenuAnimationTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /FlowMenuAnimationTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /FlowMenuAnimationUITests/FlowMenuAnimationUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // FlowMenuAnimationUITests.m 3 | // FlowMenuAnimationUITests 4 | // 5 | // Created by Bear on 16/6/22. 6 | // Copyright © 2016年 Bear. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FlowMenuAnimationUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation FlowMenuAnimationUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /FlowMenuAnimationUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '8.0' 3 | # Uncomment this line if you're using Swift 4 | # use_frameworks! 5 | 6 | target 'FlowMenuAnimation' do 7 | 8 | pod 'BearSkill', '0.1.1' 9 | 10 | end 11 | 12 | target 'FlowMenuAnimationTests' do 13 | 14 | end 15 | 16 | target 'FlowMenuAnimationUITests' do 17 | 18 | end 19 | 20 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - BearSkill (0.1.1) 3 | 4 | DEPENDENCIES: 5 | - BearSkill (= 0.1.1) 6 | 7 | SPEC CHECKSUMS: 8 | BearSkill: 35c7a9bd5d738820ac11bd2aa1c6c8ccb08672b8 9 | 10 | PODFILE CHECKSUM: df2831e6d96ae7003493e11fa2da844b7dcb13b5 11 | 12 | COCOAPODS: 1.2.1 13 | -------------------------------------------------------------------------------- /Pods/BearSkill/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Bear <648070256@qq.com> 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Pods/BearSkill/Pod/Classes/AttributeString/NSMutableAttributedString+BearSet.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableAttributedString+BearSet.h 3 | // Pods 4 | // 5 | // Created by apple on 16/5/16. 6 | // 7 | // 8 | 9 | 10 | // 11 | // 富文本设置 12 | // 适用于 UILabel, UITextField, UITextView 13 | // 适用于所有的AttributeString 14 | // 15 | 16 | #import 17 | 18 | @interface NSMutableAttributedString (BearSet) 19 | 20 | // 判断单个字符是否符合某一种正则 21 | - (BOOL)judgeCharacter_regex:(NSString *)regex withStr:(NSString *)str; 22 | 23 | // 对符合正则的字符串中的某些字符进行富文本设置 24 | - (void)setAttributeCharacter_regex:(NSString *)regex font:(UIFont *)font color:(UIColor *)color; 25 | 26 | // 对指定的字符串进行富文本设置 27 | - (void)setAttributeString_specifyStr:(NSString *)specifyStr font:(UIFont *)font color:(UIColor *)color; 28 | 29 | // 设置行间距 30 | - (void)setLineSpacing:(CGFloat)spacing; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Pods/BearSkill/Pod/Classes/AttributeString/NSMutableAttributedString+BearSet.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableAttributedString+BearSet.m 3 | // Pods 4 | // 5 | // Created by apple on 16/5/16. 6 | // 7 | // 8 | 9 | #import "NSMutableAttributedString+BearSet.h" 10 | 11 | @implementation NSMutableAttributedString (BearSet) 12 | 13 | // 判断单个字符是否符合某一种正则 14 | // 演示数据:regex = @"[0-9]|[.]|[+]|[-]"; 15 | - (BOOL)judgeCharacter_regex:(NSString *)regex withStr:(NSString *)str 16 | { 17 | NSPredicate *strPredicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex]; 18 | if ([strPredicate evaluateWithObject:str]) { 19 | return YES; 20 | } 21 | 22 | return NO; 23 | } 24 | 25 | // 对符合正则的字符串中的某些字符进行富文本设置 26 | - (void)setAttributeCharacter_regex:(NSString *)regex font:(UIFont *)font color:(UIColor *)color 27 | { 28 | NSString *string = self.string; 29 | 30 | for (int i = 0; i < [string length]; i++) { 31 | NSRange tempRange = NSMakeRange(i, 1); 32 | NSString *tempStr = [string substringWithRange:tempRange]; 33 | if ([self judgeCharacter_regex:regex withStr:tempStr]) { 34 | 35 | if (font) { 36 | [self addAttribute:NSFontAttributeName value:font range:tempRange]; 37 | } 38 | 39 | if (color) { 40 | [self addAttribute:NSForegroundColorAttributeName value:color range:tempRange]; 41 | } 42 | 43 | } 44 | } 45 | } 46 | 47 | // 对指定的字符串进行富文本设置 48 | - (void)setAttributeString_specifyStr:(NSString *)specifyStr font:(UIFont *)font color:(UIColor *)color 49 | { 50 | NSString *string = self.string; 51 | 52 | if ([string rangeOfString:specifyStr].location != NSNotFound) { 53 | 54 | NSRange tempRange = [string rangeOfString:specifyStr]; 55 | 56 | if (font) { 57 | [self addAttribute:NSFontAttributeName value:font range:tempRange]; 58 | } 59 | 60 | if (color) { 61 | [self addAttribute:NSForegroundColorAttributeName value:color range:tempRange]; 62 | } 63 | 64 | } 65 | } 66 | 67 | // 设置行间距 68 | - (void)setLineSpacing:(CGFloat)spacing 69 | { 70 | NSString *labelText = self.string; 71 | 72 | NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; 73 | [paragraphStyle setLineSpacing:spacing];//调整行间距 74 | 75 | [self addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [labelText length])]; 76 | } 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /Pods/BearSkill/Pod/Classes/Constants/BearConstants.h: -------------------------------------------------------------------------------- 1 | // 2 | // BearConstants.h 3 | // Bear 4 | // 5 | // Created by Bear on 30/12/24. 6 | // Copyright © 2015年 Bear. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | 13 | 14 | // NotificationCenter字段 15 | static NSString *NotificationTest = @"NotificationTest"; 16 | 17 | 18 | // UserDefaults字段 19 | static NSString *usTest = @"usTest"; 20 | 21 | 22 | 23 | /** 24 | * UserDefaults 25 | * 26 | * UDGET 获取UserDefaults数据 27 | * USSET 设置UserDefaults数据 28 | * UDDELETE 删除UserDefaults数据 29 | */ 30 | #define UDGET(key) [[NSUserDefaults standardUserDefaults] objectForKey:key]? [[NSUserDefaults standardUserDefaults] objectForKey:key] : @"" 31 | #define UDSET(value, key) [[NSUserDefaults standardUserDefaults] setObject:value forKey:key] 32 | #define UDDELETE(key) [[NSUserDefaults standardUserDefaults] removeObjectForKey:key]; 33 | 34 | 35 | 36 | /** 37 | * Bear自定义log 38 | */ 39 | #define ShowBearLog 1 40 | #if ShowBearLog 41 | //#define BearLog(FORMAT, ...) fprintf(stderr,"===== Bear Log =====\t\t%s:%d\n%s\n\n",[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]) 42 | #define BearLog(FORMAT, ...) fprintf(stderr,"== Bear ==\t%s\n", [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]) 43 | #else 44 | #define BearLog(FORMAT, ...) 45 | #endif 46 | 47 | 48 | 49 | /** 50 | * 判断系统版本 51 | * 52 | * 53 | */ 54 | #define SystemVersion [[[UIDevice currentDevice] systemVersion] floatValue] 55 | 56 | #define over_iOS7 [[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0 57 | #define over_iOS8 [[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0 58 | #define over_iOS9 [[[UIDevice currentDevice] systemVersion] floatValue] >= 9.0 59 | 60 | 61 | 62 | /** 63 | * RGB 64 | */ 65 | #define RGB(r, g, b) [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:1.0f] 66 | #define RGBAlpha(r, g, b, alpha) [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:alpha] 67 | #define UIColorFromHEX(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0] 68 | 69 | 70 | 71 | /** 72 | * 屏幕尺寸 73 | */ 74 | 75 | // 6p (物理点) 76 | #define WIDTH6P 414.0 77 | #define HEIGHT6P 736.0 78 | 79 | // 6p_N (像素点) 80 | #define NWIDTH6P 1242.0 81 | #define NHEIGHT6P 2208.0 82 | 83 | 84 | // 6 85 | #define WIDTH6 375.0 86 | #define HEIGHT6 667.0 87 | 88 | // 6_N 89 | #define NWIDTH6 750.0 90 | #define NHEIGHT6 1334.0 91 | 92 | 93 | // 5 | 5c | 5s 94 | #define WIDTH5 320.0 95 | #define HEIGHT5 568.0 96 | 97 | // 5 | 5c | 5s _N 98 | #define NWIDTH5 640.0 99 | #define NHEIGHT5 1136.0 100 | 101 | 102 | // 4|4s 103 | #define WIDTH4 320.0 104 | #define HEIGHT4 480.0 105 | 106 | // 4|4s _N 107 | #define NWIDTH4 640.0 108 | #define NHEIGHT4 960.0 109 | 110 | 111 | // 屏幕宽高 112 | #define WIDTH ([UIScreen mainScreen].bounds.size.width) 113 | #define HEIGHT ([UIScreen mainScreen].bounds.size.height) 114 | 115 | // tabbar高度 116 | #define TABBAR_HEIGHT self.tabBarController.tabBar.frame.size.height 117 | 118 | // 状态栏高度 119 | #define STATUS_HEIGHT [[UIApplication sharedApplication] statusBarFrame].size.height 120 | 121 | // Navigationbar高度 122 | #define NAVIGATIONBAR_HEIGHT self.navigationController.navigationBar.frame.size.height 123 | 124 | // Navigationbar高度 125 | #define NAV_44 44 126 | 127 | // Nav+Status 128 | #define NAV_STA (NAVIGATIONBAR_HEIGHT + STATUS_HEIGHT) 129 | 130 | // Nav+Status 131 | #define NAV44_STA (NAV_44 + STATUS_HEIGHT) 132 | 133 | // int 转换 NSNumber 134 | #define IntToNumber(int) [NSNumber numberWithInt:int] 135 | 136 | 137 | 138 | @interface BearConstants : NSObject 139 | 140 | // 获取当前时间,日期 141 | + (NSString *)getCurrentTimeStr; 142 | 143 | // dict取值并判断是否为空 144 | + (id)setDataWithDict:(NSDictionary *)dict keyStr:(NSString *)keyStr; 145 | 146 | // dict取值并判断是否为空,string类型专用 147 | + (NSString *)setStringWithDict:(NSDictionary *)dict keyStr:(NSString *)keyStr; 148 | 149 | // 防止字符串为 150 | + (NSString *)avoidStringCrash:(id)string; 151 | 152 | // 判断字符串是否为空 153 | + (BOOL)judgeStringExist:(id)string; 154 | 155 | // 判断数组里的字符串是否都存在 156 | + (BOOL)judgeStringExistFromArray:(NSArray *)array; 157 | 158 | // 判断dict中是否包含某字段 159 | + (BOOL)judgeDictHaveStr:(NSString *)keyStr dict:(NSDictionary *)dict; 160 | 161 | // 从URL获取图片 162 | + (UIImage *)getImageFromURL:(NSString *)imageURL; 163 | 164 | // 修改iamge尺寸 165 | + (UIImage *)scaleToSize:(UIImage *)img size:(CGSize)newsize; 166 | 167 | // 验证姓名 168 | + (BOOL)validateNameString:(NSString *)nameStr; 169 | 170 | // 验证手机号码 171 | + (BOOL)validatePhoneString:(NSString *)phoneStr; 172 | 173 | /** 174 | * Block Demo 175 | */ 176 | + (void)requestClearMessage:(NSNumber *)notificationId success:(void (^) ())success failure:(void (^) ())failure; 177 | 178 | @end 179 | 180 | 181 | 182 | 183 | 184 | -------------------------------------------------------------------------------- /Pods/BearSkill/Pod/Classes/Constants/BearConstants.m: -------------------------------------------------------------------------------- 1 | // 2 | // BearConstants.m 3 | // Bear 4 | // 5 | // Created by Bear on 30/12/24. 6 | // Copyright © 2015年 Bear. All rights reserved. 7 | // 8 | 9 | #import "BearConstants.h" 10 | 11 | @implementation BearConstants 12 | 13 | // 获取当前时间,日期 14 | + (NSString *)getCurrentTimeStr 15 | { 16 | NSDate *currentDate = [NSDate date]; 17 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; 18 | [dateFormatter setDateFormat:@"YYYY/MM/dd hh:mm:ss"]; 19 | NSString *dateString = [dateFormatter stringFromDate:currentDate]; 20 | NSLog(@"dateString:%@",dateString); 21 | 22 | return dateString; 23 | } 24 | 25 | // dict取值并判断是否为空 26 | + (id)setDataWithDict:(NSDictionary *)dict keyStr:(NSString *)keyStr 27 | { 28 | if (nil != [dict objectForKey:keyStr] && ![[dict objectForKey:keyStr] isEqual:[NSNull null]]) { 29 | return [dict objectForKey:keyStr]; 30 | } 31 | 32 | return nil; 33 | } 34 | 35 | // dict取值并判断是否为空,string类型专用 36 | + (NSString *)setStringWithDict:(NSDictionary *)dict keyStr:(NSString *)keyStr 37 | { 38 | if (nil != [dict objectForKey:keyStr] && ![[dict objectForKey:keyStr] isEqual:[NSNull null]]) { 39 | return [NSString stringWithFormat:@"%@", [dict objectForKey:keyStr]]; 40 | } 41 | 42 | return nil; 43 | } 44 | 45 | // 防止字符串为 46 | + (NSString *)avoidStringCrash:(id)string 47 | { 48 | if (string && string != nil) { 49 | NSString *tempStr = [NSString stringWithFormat:@"%@", string]; 50 | if ([tempStr isEqualToString:@""]) { 51 | return @""; 52 | } 53 | return tempStr; 54 | } 55 | 56 | return @""; 57 | } 58 | 59 | // 判断字符串是否为空 60 | + (BOOL)judgeStringExist:(id)string 61 | { 62 | if (string && string != nil) { 63 | if ([string isKindOfClass:[NSString class]]) { 64 | if ([string isEqualToString:@""]) { 65 | return NO; 66 | } 67 | } 68 | 69 | NSString *tempStr = [NSString stringWithFormat:@"%@", string]; 70 | if ([tempStr length] > 0) { 71 | return YES; 72 | } 73 | } 74 | 75 | return NO; 76 | } 77 | 78 | // 判断数组里的字符串是否都存在 79 | + (BOOL)judgeStringExistFromArray:(NSArray *)array 80 | { 81 | if (!array || [array count] == 0) { 82 | return NO; 83 | } 84 | 85 | for (id str in array) { 86 | if (![self judgeStringExist:str]) { 87 | return NO; 88 | } 89 | } 90 | 91 | return YES; 92 | } 93 | 94 | // 判断dict中是否包含某字段 95 | + (BOOL)judgeDictHaveStr:(NSString *)keyStr dict:(NSDictionary *)dict 96 | { 97 | if ([[dict allKeys]containsObject:keyStr]&&![[dict objectForKey:keyStr] isEqual:[NSNull null]]&&[dict objectForKey:keyStr]) 98 | { 99 | return YES; 100 | } 101 | 102 | return NO; 103 | } 104 | 105 | // 从URL获取图片 106 | + (UIImage *)getImageFromURL:(NSString *)imageURL 107 | { 108 | if ([imageURL rangeOfString:@"http://"].location != NSNotFound) { 109 | __block UIImage *image = [[UIImage alloc] init]; 110 | dispatch_sync(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ 111 | image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:imageURL]]]; 112 | }); 113 | return image; 114 | } 115 | 116 | return nil; 117 | } 118 | 119 | // 修改iamge尺寸 120 | + (UIImage *)scaleToSize:(UIImage *)img size:(CGSize)newsize 121 | { 122 | // 创建一个bitmap的context 123 | // 并把它设置成为当前正在使用的context 124 | UIGraphicsBeginImageContext(newsize); 125 | // 绘制改变大小的图片 126 | [img drawInRect:CGRectMake(0, 0, newsize.width, newsize.height)]; 127 | // 从当前context中创建一个改变大小后的图片 128 | UIImage* scaledImage = UIGraphicsGetImageFromCurrentImageContext(); 129 | // 使当前的context出堆栈 130 | UIGraphicsEndImageContext(); 131 | // 返回新的改变大小后的图片 132 | return scaledImage; 133 | } 134 | 135 | // 验证姓名 136 | + (BOOL)validateNameString:(NSString *)nameStr 137 | { 138 | if ([nameStr length] > 0 && [nameStr length] < 10) { 139 | //數字條件 140 | NSRegularExpression *tNumRegularExpression = [NSRegularExpression regularExpressionWithPattern:@"[0-9]" options:NSRegularExpressionCaseInsensitive error:nil]; 141 | 142 | //符合數字條件的有幾個字元 143 | NSUInteger tNumMatchCount = [tNumRegularExpression numberOfMatchesInString:nameStr 144 | options:NSMatchingReportProgress 145 | range:NSMakeRange(0, nameStr.length)]; 146 | 147 | if (tNumMatchCount == 0) { 148 | return YES; 149 | } 150 | } 151 | 152 | return NO; 153 | } 154 | 155 | // 验证手机号码 156 | + (BOOL)validatePhoneString:(NSString *)phoneStr 157 | { 158 | if ([phoneStr length] == 11) { 159 | //數字條件 160 | NSRegularExpression *tNumRegularExpression = [NSRegularExpression regularExpressionWithPattern:@"[0-9]" options:NSRegularExpressionCaseInsensitive error:nil]; 161 | //符合數字條件的有幾個字元 162 | NSUInteger tNumMatchCount = [tNumRegularExpression numberOfMatchesInString:phoneStr 163 | options:NSMatchingReportProgress 164 | range:NSMakeRange(0, phoneStr.length)]; 165 | 166 | if (tNumMatchCount == 11) { 167 | return YES; 168 | } 169 | } 170 | 171 | return NO; 172 | } 173 | 174 | /** 175 | * Block Demo 176 | */ 177 | + (void)requestClearMessage:(NSNumber *)notificationId success:(void (^) ())success failure:(void (^) ())failure 178 | { 179 | 180 | if (success) { 181 | success(); 182 | } 183 | 184 | if (failure) { 185 | failure(); 186 | } 187 | } 188 | 189 | @end 190 | 191 | 192 | 193 | 194 | -------------------------------------------------------------------------------- /Pods/BearSkill/Pod/Classes/Layout/UITableView+BearStoreCellHeight.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITableView+BearStoreCellHeight.h 3 | // Pods 4 | // 5 | // Created by apple on 16/5/16. 6 | // 7 | // 8 | 9 | 10 | // 11 | // 本方法可以方便记录,获取UITableViewCell的高度,尺寸 12 | // 13 | 14 | #import 15 | 16 | @interface UITableView (BearStoreCellHeight) 17 | 18 | @property (copy, nonatomic) NSMutableDictionary *cellFrameDict; 19 | 20 | // 根据indexPath获取对应的高度 21 | // 如果之前没有记录,默认返回10 22 | - (CGFloat)getHeightForRowAtIndexPath:(NSIndexPath *)indexPath; 23 | 24 | // 根据indexPath获取对应的frame 25 | // 如果之前没有记录,默认返回(0, 0, 10, 10) 26 | - (CGRect)getFrameForRowAtIndexPath:(NSIndexPath *)indexPath; 27 | 28 | // 将cell的frame存储到对应的indexPath 29 | - (void)recordingFrame:(CGRect)frame forRowAtIndexPath:(NSIndexPath *)indexPath; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Pods/BearSkill/Pod/Classes/Layout/UITableView+BearStoreCellHeight.m: -------------------------------------------------------------------------------- 1 | // 2 | // UITableView+BearStoreCellHeight.m 3 | // Pods 4 | // 5 | // Created by apple on 16/5/16. 6 | // 7 | // 8 | 9 | #import "UITableView+BearStoreCellHeight.h" 10 | #import "objc/runtime.h" 11 | 12 | static const void *cellFrameDictKey = &cellFrameDictKey; 13 | 14 | @implementation UITableView (BearStoreCellHeight) 15 | 16 | - (NSDictionary *)cellFrameDict 17 | { 18 | return objc_getAssociatedObject(self, cellFrameDictKey); 19 | } 20 | 21 | - (void)setCellFrameDict:(NSDictionary *)cellFrameDict 22 | { 23 | objc_setAssociatedObject(self, cellFrameDictKey, cellFrameDict, OBJC_ASSOCIATION_COPY_NONATOMIC); 24 | } 25 | 26 | // 根据indexPath获取对应的高度 27 | // 如果之前没有记录,默认返回10 28 | - (CGFloat)getHeightForRowAtIndexPath:(NSIndexPath *)indexPath 29 | { 30 | if (!self.cellFrameDict) { 31 | self.cellFrameDict = [[NSMutableDictionary alloc] init]; 32 | } 33 | 34 | NSString *indexPathStr = [self indexPathToStr:indexPath]; 35 | if ([self.cellFrameDict objectForKey:indexPathStr]) { 36 | CGRect tempRect = [[self.cellFrameDict objectForKey:indexPathStr] CGRectValue]; 37 | return tempRect.size.height; 38 | } 39 | 40 | return 10; 41 | } 42 | 43 | // 根据indexPath获取对应的frame 44 | // 如果之前没有记录,默认返回(0, 0, 10, 10) 45 | - (CGRect)getFrameForRowAtIndexPath:(NSIndexPath *)indexPath 46 | { 47 | if (!self.cellFrameDict) { 48 | self.cellFrameDict = [[NSMutableDictionary alloc] init]; 49 | } 50 | 51 | NSString *indexPathStr = [self indexPathToStr:indexPath]; 52 | if ([self.cellFrameDict objectForKey:indexPathStr]) { 53 | CGRect tempRect = [[self.cellFrameDict objectForKey:indexPathStr] CGRectValue]; 54 | return tempRect; 55 | } 56 | 57 | return CGRectMake(0, 0, 10, 10); 58 | } 59 | 60 | // 将cell的frame存储到对应的indexPath 61 | - (void)recordingFrame:(CGRect)frame forRowAtIndexPath:(NSIndexPath *)indexPath 62 | { 63 | if (!self.cellFrameDict) { 64 | self.cellFrameDict = [[NSMutableDictionary alloc] init]; 65 | } 66 | 67 | NSString *indexPath_Key = [self indexPathToStr:indexPath]; 68 | NSValue *tempRect_Value = [NSValue valueWithCGRect:frame]; 69 | 70 | NSMutableDictionary *tempDict = [self.cellFrameDict mutableCopy]; 71 | [tempDict setObject:tempRect_Value forKey:indexPath_Key]; 72 | self.cellFrameDict = tempDict; 73 | } 74 | 75 | 76 | 77 | 78 | // 索引转字符串 79 | - (NSString *)indexPathToStr:(NSIndexPath *)indexPath 80 | { 81 | NSString *resultStr = [NSString stringWithFormat:@"%ld-%ld", (long)indexPath.section, (long)indexPath.row]; 82 | return resultStr; 83 | } 84 | 85 | // 字符串转索引 86 | - (NSIndexPath *)strToIndexPath:(NSString *)str 87 | { 88 | NSArray *strArray = [str componentsSeparatedByString:@"-"]; 89 | NSInteger section = [strArray[0] integerValue]; 90 | NSInteger row = [strArray[1] integerValue]; 91 | NSIndexPath *resultIndexPath = [NSIndexPath indexPathForRow:row inSection:section]; 92 | 93 | return resultIndexPath; 94 | } 95 | 96 | @end 97 | -------------------------------------------------------------------------------- /Pods/BearSkill/Pod/Classes/Layout/UIView+BearSet.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+BearSet.h 3 | // 4 | // Created by bear on 15/11/25. 5 | // Copyright (c) 2015年 Bear. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | typedef enum { 11 | kAXIS_Y, 12 | kAXIS_X, 13 | kAXIS_X_Y, 14 | }kAXIS; 15 | 16 | typedef enum { 17 | kLAYOUT_AXIS_Y, 18 | kLAYOUT_AXIS_X, 19 | }kLAYOUT_AXIS; 20 | 21 | typedef enum { 22 | kDIR_LEFT, 23 | kDIR_RIGHT, 24 | kDIR_UP, 25 | kDIR_DOWN, 26 | }kDIRECTION; 27 | 28 | 29 | // offParameter结构体 30 | struct OffPara 31 | { 32 | CGFloat offStart; 33 | CGFloat offEnd; 34 | BOOL autoCalu; 35 | }; 36 | typedef struct OffPara OffPara; 37 | 38 | // offParameter内联 39 | CG_INLINE OffPara 40 | OffParaMake(CGFloat offStart, CGFloat offEnd, BOOL autoCalu) 41 | { 42 | OffPara offPara; 43 | offPara.offStart = offStart; 44 | offPara.offEnd = offEnd; 45 | offPara.autoCalu = autoCalu; 46 | return offPara; 47 | } 48 | 49 | 50 | // gapParameter结构体 51 | struct GapPara 52 | { 53 | CGFloat gapDistance; 54 | BOOL autoCalu; 55 | }; 56 | typedef struct GapPara GapPara; 57 | 58 | // gapParameter内联 59 | CG_INLINE GapPara 60 | GapParaMake(CGFloat gapDistance, BOOL autoCalu) 61 | { 62 | GapPara gapPara; 63 | gapPara.gapDistance = gapDistance; 64 | gapPara.autoCalu = autoCalu; 65 | return gapPara; 66 | } 67 | 68 | 69 | @interface UIView (BearSet) 70 | 71 | /** 72 | * 普通的方法 73 | */ 74 | 75 | // 毛玻璃效果处理 76 | - (void)blurEffectWithStyle:(UIBlurEffectStyle)style Alpha:(CGFloat)alpha; 77 | 78 | // 设置边框 79 | - (void)setMyBorder:(UIColor *)borderColor borderWidth:(CGFloat)borderWidth; 80 | 81 | // 自定义分割线View OffY 82 | - (void)setMySeparatorLineOffY:(int)offStart offEnd:(int)offEnd lineWidth:(CGFloat)lineWidth lineColor:(UIColor *)lineColor offY:(CGFloat)offY; 83 | 84 | // 自定义底部分割线View 85 | - (void)setMySeparatorLine:(CGFloat)offStart offEnd:(CGFloat)offEnd lineWidth:(CGFloat)lineWidth lineColor:(UIColor *)lineColor; 86 | 87 | // 通过view,画任意方向的线 88 | - (void)drawLine:(CGPoint)startPoint endPoint:(CGPoint)endPoint lineWidth:(CGFloat)lineWidth lineColor:(UIColor *)lineColor; 89 | 90 | 91 | // 通过layer,画任意方向的线 92 | - (void)drawLineWithLayer:(CGPoint)startPoint endPoint:(CGPoint)endPoint lineWidth:(CGFloat)lineWidth lineColor:(UIColor *)lineColor; 93 | 94 | 95 | 96 | 97 | 98 | /** 99 | * 布局扩展方法 100 | */ 101 | 102 | 103 | // Getter 104 | 105 | - (CGFloat)x; 106 | - (CGFloat)y; 107 | - (CGFloat)maxX; 108 | - (CGFloat)maxY; 109 | - (CGFloat)width; 110 | - (CGFloat)height; 111 | - (CGPoint)origin; 112 | - (CGSize)size; 113 | 114 | - (CGFloat)centerX; 115 | - (CGFloat)centerY; 116 | 117 | 118 | //Setter 119 | 120 | - (void)setX:(CGFloat)x; 121 | - (void)setMaxX:(CGFloat)maxX; 122 | - (void)setMaxX_DontMoveMinX:(CGFloat)maxX; 123 | 124 | - (void)setY:(CGFloat)y; 125 | - (void)setMaxY:(CGFloat)maxY; 126 | - (void)setMaxY_DontMoveMinY:(CGFloat)maxY; 127 | 128 | - (void)setWidth:(CGFloat)width; 129 | - (void)setHeight:(CGFloat)height; 130 | - (void)setOrigin:(CGPoint)point; 131 | - (void)setOrigin:(CGPoint)point sizeToFit:(BOOL)sizeToFit; 132 | - (void)setSize:(CGSize)size; 133 | 134 | - (void)setCenterX:(CGFloat)x; 135 | - (void)setCenterY:(CGFloat)y; 136 | 137 | - (void)setWidth_DonotMoveCenter:(CGFloat)width; 138 | - (void)setHeight_DonotMoveCenter:(CGFloat)height; 139 | - (void)setSize_DonotMoveCenter:(CGSize)size; 140 | - (void)sizeToFit_DonotMoveSide:(kDIRECTION)dir centerRemain:(BOOL)centerRemain; 141 | 142 | 143 | /** 144 | * 和父类view剧中 145 | * 146 | * 当前view和父类view的 X轴/Y轴/中心点 对其 147 | */ 148 | - (void)BearSetCenterToParentViewWithAxis:(kAXIS)axis; 149 | 150 | 151 | /** 152 | * 和指定的view剧中 153 | * 154 | * 当前view和指定view的 X轴/Y轴/中心点 对其 155 | */ 156 | - (void)BearSetCenterToView:(UIView *)destinationView withAxis:(kAXIS)axis; 157 | 158 | 159 | /** 160 | * view与view的相对位置 161 | */ 162 | - (void)BearSetRelativeLayoutWithDirection:(kDIRECTION)direction destinationView:(UIView *)destinationView parentRelation:(BOOL)parentRelation distance:(CGFloat)distance center:(BOOL)center; 163 | 164 | 165 | /** 166 | * view的相对布局,带sizeToFit 167 | */ 168 | - (void)BearSetRelativeLayoutWithDirection:(kDIRECTION)direction destinationView:(UIView *)destinationView parentRelation:(BOOL)parentRelation distance:(CGFloat)distance center:(BOOL)center sizeToFit:(BOOL)sizeToFit; 169 | 170 | 171 | /** 172 | * 根据子view自动布局 自动计算:起始点,结束点,间距(三值相等) 173 | * 说明: 在父类view尺寸不等于需求尺寸时,会显示日志并且取消布局 174 | */ 175 | + (void)BearAutoLayViewArray:(NSMutableArray *)viewArray layoutAxis:(kLAYOUT_AXIS)layoutAxis center:(BOOL)center; 176 | 177 | 178 | /** 179 | * 根据子view自动布局 需要设置:起始点,结束点; 自动计算:间距 180 | * 说明: 在父类view尺寸不等于需求尺寸时,会显示日志并且取消布局 181 | */ 182 | + (void)BearAutoLayViewArray:(NSMutableArray *)viewArray layoutAxis:(kLAYOUT_AXIS)layoutAxis center:(BOOL)center offStart:(CGFloat)offStart offEnd:(CGFloat)offEnd; 183 | 184 | 185 | /** 186 | * 根据子view自动布局 需要设置:间距; 自动计算:起始点,结束点 187 | * 说明: 在父类view尺寸不等于需求尺寸时,会显示日志并且取消布局 188 | */ 189 | + (void)BearAutoLayViewArray:(NSMutableArray *)viewArray layoutAxis:(kLAYOUT_AXIS)layoutAxis center:(BOOL)center gapDistance:(CGFloat)gapDistance; 190 | 191 | 192 | /** 193 | * 根据子view自动布局 需要设置:起始点,结束点,间距 194 | * 说明: 在父类view尺寸不等于需求尺寸时,会自动变化 195 | */ 196 | + (void)BearAutoLayViewArray:(NSMutableArray *)viewArray layoutAxis:(kLAYOUT_AXIS)layoutAxis center:(BOOL)center offStart:(CGFloat)offStart offEnd:(CGFloat)offEnd gapDistance:(CGFloat)gapDistance; 197 | 198 | 199 | /** 200 | * 根据子view自动布局 需要设置:gapArray间距比例数组,间距总和 201 | * 说明: 在父类view尺寸不等于需求尺寸时,会自动变化 202 | */ 203 | + (void)BearAutoLayViewArray:(NSMutableArray *)viewArray layoutAxis:(kLAYOUT_AXIS)layoutAxis center:(BOOL)center gapAray:(NSArray *)gapArray gapDisAll:(CGFloat)gapDisAll; 204 | 205 | @end 206 | -------------------------------------------------------------------------------- /Pods/BearSkill/Pod/Classes/UI&Extend/BearAlertView/BearAlertBtnsView.h: -------------------------------------------------------------------------------- 1 | // 2 | // BearAlertBtnsView.h 3 | // GOSHOPPING 4 | // 5 | // Created by Bear on 16/6/26. 6 | // Copyright © 2016年 cjl. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BearAlertBtnsView : UIView 12 | 13 | @property (strong, nonatomic) UIView *btns_horizontalSepLineV; 14 | @property (strong, nonatomic) UIView *btns_verticalSepLineV; 15 | @property (strong, nonatomic) UIButton *cancelBtn; 16 | @property (strong, nonatomic) UIButton *confirmBtn; 17 | 18 | - (void)setNormal_CancelBtnTitle:(NSString *)cancelBtnTitle ConfirmBtnTitle:(NSString *)confirmBtnTitle; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Pods/BearSkill/Pod/Classes/UI&Extend/BearAlertView/BearAlertBtnsView.m: -------------------------------------------------------------------------------- 1 | // 2 | // BearAlertBtnsView.m 3 | // GOSHOPPING 4 | // 5 | // Created by Bear on 16/6/26. 6 | // Copyright © 2016年 cjl. All rights reserved. 7 | // 8 | 9 | #import "BearAlertBtnsView.h" 10 | #import "UIView+BearSet.h" 11 | 12 | @interface BearAlertBtnsView () 13 | { 14 | NSString *_confirmBtnTitle; 15 | NSString *_cancelBtnTitle; 16 | } 17 | 18 | @end 19 | 20 | @implementation BearAlertBtnsView 21 | 22 | - (instancetype)init 23 | { 24 | self = [super init]; 25 | 26 | if (self) { 27 | 28 | // 取消按钮 29 | _cancelBtn = [[UIButton alloc] init]; 30 | [_cancelBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; 31 | [self addSubview:_cancelBtn]; 32 | 33 | // 确定按钮 34 | _confirmBtn = [[UIButton alloc] init]; 35 | [_confirmBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; 36 | [self addSubview:_confirmBtn]; 37 | 38 | // 分割线 39 | _btns_horizontalSepLineV = [[UIView alloc] init]; 40 | _btns_horizontalSepLineV.backgroundColor = [UIColor blackColor]; 41 | [self addSubview:_btns_horizontalSepLineV]; 42 | 43 | _btns_verticalSepLineV = [[UIView alloc] init]; 44 | _btns_verticalSepLineV.backgroundColor = [UIColor blackColor]; 45 | [self addSubview:_btns_verticalSepLineV]; 46 | } 47 | 48 | return self; 49 | } 50 | 51 | - (void)setNormal_CancelBtnTitle:(NSString *)cancelBtnTitle ConfirmBtnTitle:(NSString *)confirmBtnTitle 52 | { 53 | _cancelBtnTitle = cancelBtnTitle; 54 | _confirmBtnTitle = confirmBtnTitle; 55 | } 56 | 57 | - (void)layoutSubviews 58 | { 59 | [super layoutSubviews]; 60 | 61 | BOOL res_haveConfirmBtn = [_confirmBtnTitle length] > 0; 62 | BOOL res_haveCancelBtn = [_cancelBtnTitle length] > 0; 63 | 64 | CGFloat btn_width = self.width; 65 | CGFloat btn_height = self.height; 66 | 67 | if (res_haveCancelBtn && res_haveConfirmBtn) { 68 | 69 | btn_width = self.width / 2.0; 70 | 71 | _cancelBtn.frame = CGRectMake(0, 0, btn_width, btn_height); 72 | [_cancelBtn setTitle:_cancelBtnTitle forState:UIControlStateNormal]; 73 | 74 | _confirmBtn.frame = CGRectMake(btn_width, 0, btn_width, btn_height); 75 | [_confirmBtn setTitle:_confirmBtnTitle forState:UIControlStateNormal]; 76 | 77 | _btns_verticalSepLineV.frame = CGRectMake(0, 0, 0.5, self.height); 78 | [_btns_verticalSepLineV BearSetCenterToParentViewWithAxis:kAXIS_X_Y]; 79 | } 80 | else if (res_haveConfirmBtn || res_haveCancelBtn){ 81 | 82 | btn_width = self.width; 83 | 84 | if (res_haveConfirmBtn) { 85 | 86 | _confirmBtn.frame = CGRectMake(0, 0, btn_width, btn_height); 87 | [_confirmBtn setTitle:_confirmBtnTitle forState:UIControlStateNormal]; 88 | }else if (res_haveCancelBtn){ 89 | 90 | _cancelBtn.frame = CGRectMake(0, 0, btn_width, btn_height); 91 | [_cancelBtn setTitle:_cancelBtnTitle forState:UIControlStateNormal]; 92 | } 93 | } 94 | 95 | _btns_horizontalSepLineV.frame = CGRectMake(0, 0, self.width, 0.5); 96 | 97 | } 98 | 99 | 100 | /* 101 | // Only override drawRect: if you perform custom drawing. 102 | // An empty implementation adversely affects performance during animation. 103 | - (void)drawRect:(CGRect)rect { 104 | // Drawing code 105 | } 106 | */ 107 | 108 | @end 109 | -------------------------------------------------------------------------------- /Pods/BearSkill/Pod/Classes/UI&Extend/BearAlertView/BearAlertContentView.h: -------------------------------------------------------------------------------- 1 | // 2 | // BearAlertContentView.h 3 | // GOSHOPPING 4 | // 5 | // Created by Bear on 16/6/27. 6 | // Copyright © 2016年 cjl. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BearAlertContentView : UIView 12 | 13 | @property (strong, nonatomic) UILabel *titleLabel; 14 | @property (strong, nonatomic) UILabel *contentLabel; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/BearSkill/Pod/Classes/UI&Extend/BearAlertView/BearAlertContentView.m: -------------------------------------------------------------------------------- 1 | // 2 | // BearAlertContentView.m 3 | // GOSHOPPING 4 | // 5 | // Created by Bear on 16/6/27. 6 | // Copyright © 2016年 cjl. All rights reserved. 7 | // 8 | 9 | #import "BearAlertContentView.h" 10 | #import "BearConstants.h" 11 | #import "UIView+BearSet.h" 12 | 13 | @implementation BearAlertContentView 14 | 15 | - (instancetype)initWithFrame:(CGRect)frame 16 | { 17 | self = [super initWithFrame:frame]; 18 | 19 | if (self) { 20 | 21 | _titleLabel = [UILabel new]; 22 | _titleLabel.font = [UIFont systemFontOfSize:16]; 23 | [self addSubview:_titleLabel]; 24 | 25 | _contentLabel = [UILabel new]; 26 | _contentLabel.numberOfLines = 0; 27 | _contentLabel.font =[UIFont systemFontOfSize:14]; 28 | [self addSubview:_contentLabel]; 29 | } 30 | 31 | return self; 32 | } 33 | 34 | - (void)layoutSubviews 35 | { 36 | [super layoutSubviews]; 37 | 38 | CGFloat max_width = WIDTH - 2 * 30; 39 | 40 | [_titleLabel sizeToFit]; 41 | [_contentLabel sizeToFit]; 42 | 43 | if (_titleLabel.width > max_width) { 44 | [_titleLabel setWidth:max_width]; 45 | [_titleLabel sizeToFit]; 46 | } 47 | 48 | if (_contentLabel.width > max_width) { 49 | [_contentLabel setWidth:max_width]; 50 | [_contentLabel sizeToFit]; 51 | } 52 | 53 | [self setWidth:_titleLabel.width > _contentLabel.width ? _titleLabel.width + 30 : _contentLabel.width + 30]; 54 | if (self.width < WIDTH / 2) { 55 | [self setWidth:WIDTH / 2]; 56 | } 57 | 58 | [_titleLabel BearSetRelativeLayoutWithDirection:kDIR_UP destinationView:nil parentRelation:YES distance:15 center:YES]; 59 | [_contentLabel BearSetRelativeLayoutWithDirection:kDIR_DOWN destinationView:_titleLabel parentRelation:NO distance:20 center:YES]; 60 | [self setHeight:_contentLabel.maxY + 20]; 61 | } 62 | 63 | 64 | /* 65 | // Only override drawRect: if you perform custom drawing. 66 | // An empty implementation adversely affects performance during animation. 67 | - (void)drawRect:(CGRect)rect { 68 | // Drawing code 69 | } 70 | */ 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /Pods/BearSkill/Pod/Classes/UI&Extend/BearAlertView/BearAlertView.h: -------------------------------------------------------------------------------- 1 | // 2 | // BearAlertView.h 3 | // GOSHOPPING 4 | // 5 | // Created by Bear on 16/6/26. 6 | // Copyright © 2016年 cjl. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "BearAlertBtnsView.h" 11 | #import "BearAlertContentView.h" 12 | 13 | // 动效方式 14 | typedef enum { 15 | kAlertViewAnimation_VerticalSpring, //直线弹簧动效 16 | kAlertViewAnimation_CenterScale, //中心缩放动效 17 | }AlertViewAnimation; 18 | 19 | // 动画执行状态 20 | typedef enum { 21 | kAlertViewAnimationState_Null, //无状态, 22 | kAlertViewAnimationState_Process, //动画进行中 23 | }AlertViewAnimationState; 24 | 25 | 26 | typedef void (^kAlertViewBlock)(); 27 | typedef void (^AnimationFinishBlock)(); 28 | typedef void (^AnimationClose_FinishBlock)(); 29 | 30 | 31 | @interface BearAlertView : UIView 32 | 33 | @property (assign, nonatomic) BOOL clickBtnCancel; //点击按钮,消失Alert 34 | @property (assign, nonatomic) BOOL tapBgCancel; //触摸背景,消失Alert 35 | @property (copy, nonatomic) AnimationClose_FinishBlock animationClose_FinishBlock; //消退动画完成block 36 | @property (strong, nonatomic) BearAlertContentView *normalAlertContentView; 37 | @property (strong, nonatomic) BearAlertBtnsView *normalAlertBtnsView; 38 | 39 | /** 40 | * 设置contentView 41 | */ 42 | - (void)setContentView:(UIView *)contentView; 43 | 44 | /** 45 | * 设置btnsView 46 | */ 47 | - (void)setBtnsView:(UIView *)btnsView; 48 | 49 | /** 50 | * 点击按钮block 51 | * 52 | * @param confirmBlock 确认按钮block 53 | * @param cancelBlock 取消按钮block 54 | * @notice 只有BearAlertBtnsView类型的btnsView才可使用该方法 55 | */ 56 | - (void)alertView_ConfirmClickBlock:(kAlertViewBlock)confirmBlock CancelClickBlock:(kAlertViewBlock)cancelBlock; 57 | 58 | /** 59 | * 点击按钮block 60 | * 61 | * @param selectBtn 点击的按钮 62 | * @param block 按钮block 63 | * @notice 自定义,非BearAlertBtnsView类型需要单独给按钮调用该方法 64 | */ 65 | - (void)alertView_SelectBtn:(UIButton *)selectBtn block:(kAlertViewBlock)block; 66 | 67 | /** 68 | * 添加按钮点击事件 69 | * @notice 自定义,非BearAlertBtnsView类型需要单独给按钮调用该方法 70 | */ 71 | - (void)btnEvent:(UIButton *)sender; 72 | 73 | /** 74 | * Alertview显现动画 75 | */ 76 | - (void)animationShow_udAlertView; 77 | 78 | /** 79 | * AlertView消退动画 80 | */ 81 | - (void)animationClose_udAlertView; 82 | 83 | @end 84 | 85 | 86 | /** 87 | * How to use? 88 | * 89 | * brief Demo/简单demo 90 | * 91 | 92 | - (void)testNormal 93 | { 94 | __block BearAlertView *bearAlert = [[BearAlertView alloc] init]; 95 | 96 | bearAlert.normalAlertContentView.titleLabel.text = @"温馨提示"; 97 | bearAlert.normalAlertContentView.contentLabel.text = @"My name is Bear. Github ID is BearRan. \nThank you!"; 98 | 99 | [bearAlert alertView_ConfirmClickBlock:^{ 100 | NSLog(@"--confirm"); 101 | } CancelClickBlock:^{ 102 | NSLog(@"--cancel"); 103 | }]; 104 | bearAlert.animationClose_FinishBlock = ^(){ 105 | NSLog(@"--closeAniamtion finish"); 106 | bearAlert = nil; 107 | }; 108 | 109 | AppDelegate *myDelegate = [[UIApplication sharedApplication] delegate]; 110 | [myDelegate.window addSubview:bearAlert]; 111 | } 112 | 113 | */ 114 | 115 | 116 | 117 | /** 118 | * How to use? 119 | * 120 | * UserDefine Demo/自定义demo 121 | * 122 | 123 | - (void)testUserDefine 124 | { 125 | 126 | __block BearAlertView *bearAlert = [[BearAlertView alloc] init]; 127 | 128 | // 自定义ContentView 129 | UIView *tempContentView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, WIDTH - 50, 200)]; 130 | tempContentView.backgroundColor = [UIColor orangeColor]; 131 | [bearAlert setContentView:tempContentView]; 132 | 133 | // 自定义BtnsView 134 | UIView *tempBtnsView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, tempContentView.width, 40)]; 135 | CGFloat btn_width = floor(tempBtnsView.width / 3.0); 136 | CGFloat btn_height = tempBtnsView.height; 137 | for (int i = 0; i < 3; i++) { 138 | UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, btn_width, btn_height)]; 139 | btn.backgroundColor = [UIColor blueColor]; 140 | [btn setTitle:[NSString stringWithFormat:@"%d", i] forState:UIControlStateNormal]; 141 | [tempBtnsView addSubview:btn]; 142 | [btn addTarget:bearAlert action:@selector(btnEvent:) forControlEvents:UIControlEventTouchUpInside]; 143 | 144 | // 按钮点击回调 145 | [bearAlert alertView_SelectBtn:btn block:^{ 146 | NSLog(@"--clickBtn:%d", i); 147 | }]; 148 | } 149 | [UIView BearAutoLayViewArray:(NSMutableArray *)tempBtnsView.subviews layoutAxis:kLAYOUT_AXIS_X center:YES]; 150 | [bearAlert setBtnsView:tempBtnsView]; 151 | 152 | bearAlert.animationClose_FinishBlock = ^(){ 153 | NSLog(@"--closeAniamtion finish"); 154 | bearAlert = nil; 155 | }; 156 | 157 | AppDelegate *myDelegate = [[UIApplication sharedApplication] delegate]; 158 | [myDelegate.window addSubview:bearAlert]; 159 | } 160 | 161 | **/ 162 | 163 | 164 | -------------------------------------------------------------------------------- /Pods/BearSkill/Pod/Classes/UI&Extend/BearCutOutView.h: -------------------------------------------------------------------------------- 1 | // 2 | // BearCutOutView.h 3 | // TestCutOut 4 | // 5 | // Created by apple on 16/6/7. 6 | // Copyright © 2016年 qiantu. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BearCutOutView : UIView 12 | 13 | - (void)setUnCutColor:(UIColor *)unCutColor cutOutFrame:(CGRect)cutOutFrame; 14 | - (void)setUnCutColor:(UIColor *)unCutColor cutOutPath:(UIBezierPath *)cutOutPath; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/BearSkill/Pod/Classes/UI&Extend/BearCutOutView.m: -------------------------------------------------------------------------------- 1 | // 2 | // BearCutOutView.m 3 | // TestCutOut 4 | // 5 | // Created by apple on 16/6/7. 6 | // Copyright © 2016年 qiantu. All rights reserved. 7 | // 8 | 9 | #import "BearCutOutView.h" 10 | 11 | @interface BearCutOutView () 12 | 13 | @property (nonatomic, retain) UIColor *unCutColor; 14 | @property (nonatomic, retain) NSValue *cutOutFrame; 15 | @property (nonatomic, retain) UIBezierPath *cutOutBezierPath; 16 | 17 | @end 18 | 19 | @implementation BearCutOutView 20 | 21 | - (instancetype)initWithFrame:(CGRect)frame 22 | { 23 | self = [super initWithFrame:frame]; 24 | 25 | if (self) { 26 | self.backgroundColor = [UIColor clearColor]; 27 | } 28 | 29 | return self; 30 | } 31 | 32 | - (instancetype)init 33 | { 34 | self = [super init]; 35 | 36 | if (self) { 37 | self.backgroundColor = [UIColor clearColor]; 38 | } 39 | 40 | return self; 41 | } 42 | 43 | - (void)drawRect:(CGRect)rect 44 | { 45 | [super drawRect:rect]; 46 | 47 | if (self.unCutColor) { 48 | 49 | [self.unCutColor setFill]; 50 | UIRectFill(rect); 51 | 52 | CGContextRef context = UIGraphicsGetCurrentContext(); 53 | CGContextSetBlendMode(context, kCGBlendModeDestinationOut); 54 | 55 | UIBezierPath *path; 56 | 57 | if (self.cutOutFrame) { 58 | path = [UIBezierPath bezierPathWithRect:[self.cutOutFrame CGRectValue]]; 59 | } 60 | else if (self.cutOutBezierPath){ 61 | path = self.cutOutBezierPath; 62 | } 63 | 64 | [path fill]; 65 | 66 | CGContextSetBlendMode(context, kCGBlendModeNormal); 67 | } 68 | } 69 | 70 | - (void)setUnCutColor:(UIColor *)unCutColor cutOutFrame:(CGRect)cutOutFrame 71 | { 72 | self.unCutColor = unCutColor; 73 | self.cutOutFrame = [NSValue valueWithCGRect:cutOutFrame]; 74 | 75 | [self setNeedsDisplay]; 76 | } 77 | 78 | - (void)setUnCutColor:(UIColor *)unCutColor cutOutPath:(UIBezierPath *)cutOutPath 79 | { 80 | self.unCutColor = unCutColor; 81 | self.cutOutBezierPath = cutOutPath; 82 | 83 | [self setNeedsDisplay]; 84 | } 85 | 86 | @end 87 | -------------------------------------------------------------------------------- /Pods/BearSkill/Pod/Classes/UI&Extend/UILabel+BearSet.h: -------------------------------------------------------------------------------- 1 | // 2 | // UILabel+BearSet.h 3 | // Bear 4 | // 5 | // Created by Bear on 30/12/24. 6 | // Copyright © 2015年 Bear. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UILabel (BearSet) 12 | 13 | // 获取label的宽度 14 | + (CGFloat )getTitleTextWidth:(NSString *)title font:(UIFont *)font; 15 | 16 | // 根据宽度自适应 17 | - (void)setLabelSizeToFitWidth:(int)width; 18 | 19 | // 中心不变,自适应 20 | - (void)sizeToFit_DonotMoveCenter; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Pods/BearSkill/Pod/Classes/UI&Extend/UILabel+BearSet.m: -------------------------------------------------------------------------------- 1 | // 2 | // UILabel+BearSet.m 3 | // Bear 4 | // 5 | // Created by Bear on 30/12/24. 6 | // Copyright © 2015年 Bear. All rights reserved. 7 | // 8 | 9 | #import "UILabel+BearSet.h" 10 | #import "UIView+BearSet.h" 11 | 12 | @implementation UILabel (BearSet) 13 | 14 | // 获取label文字的宽度 15 | + (CGFloat )getTitleTextWidth:(NSString *)title font:(UIFont *)font 16 | { 17 | CGFloat titleWidth; 18 | 19 | UILabel *tempLabel = [[UILabel alloc] init]; 20 | tempLabel.text = title; 21 | tempLabel.font = font; 22 | [tempLabel sizeToFit]; 23 | titleWidth = CGRectGetWidth(tempLabel.frame); 24 | 25 | return titleWidth; 26 | } 27 | 28 | // 根据宽度自适应 29 | - (void)setLabelSizeToFitWidth:(int)width 30 | { 31 | [self setWidth:0]; 32 | [self setHeight:0]; 33 | self.numberOfLines = 0; 34 | [self sizeToFit]; 35 | CGFloat textHeight = CGRectGetHeight(self.frame); 36 | int label_Width = [UILabel getTitleTextWidth:self.text font:self.font]; 37 | int rows = ((label_Width % width) == 0 ? label_Width/width: label_Width/width+1); 38 | [self setWidth:width]; 39 | [self setHeight:rows * textHeight]; 40 | } 41 | 42 | // 中心不变,自适应 43 | - (void)sizeToFit_DonotMoveCenter 44 | { 45 | CGPoint tempCenter = self.center; 46 | [self sizeToFit]; 47 | self.center = tempCenter; 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /Pods/BearSkill/Pod/Classes/UI&Extend/UITextField+BearLimitLength.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITextField+BearLimitLength.h 3 | // Pods 4 | // 5 | // Created by apple on 16/6/8. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface UITextField (BearLimitLength) 12 | 13 | @property (copy, nonatomic) NSNumber *limitLength; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Pods/BearSkill/Pod/Classes/UI&Extend/UITextField+BearLimitLength.m: -------------------------------------------------------------------------------- 1 | // 2 | // UITextField+BearLimitLength.m 3 | // Pods 4 | // 5 | // Created by apple on 16/6/8. 6 | // 7 | // 8 | 9 | #import "UITextField+BearLimitLength.h" 10 | #import "objc/runtime.h" 11 | 12 | static const void *limitLengthKey = &limitLengthKey; 13 | 14 | @implementation UITextField (BearLimitLength) 15 | 16 | - (NSNumber *)limitLength 17 | { 18 | return objc_getAssociatedObject(self, limitLengthKey); 19 | } 20 | 21 | - (void)setLimitLength:(NSNumber *)limitLength 22 | { 23 | objc_setAssociatedObject(self, limitLengthKey, limitLength, OBJC_ASSOCIATION_COPY_NONATOMIC); 24 | 25 | [self addLimitLengthObserver:[limitLength intValue]]; 26 | } 27 | 28 | // 增加限制位数的通知 29 | - (void)addLimitLengthObserver:(int)length 30 | { 31 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(limitLengthEvent) name:UITextFieldTextDidChangeNotification object:self]; 32 | } 33 | 34 | // 限制输入的位数 35 | - (void)limitLengthEvent 36 | { 37 | if ([self.text length] > [self.limitLength intValue]) { 38 | self.text = [self.text substringToIndex:[self.limitLength intValue]]; 39 | } 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Pods/BearSkill/Pod/Classes/UI&Extend/UITextField+BearSet.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITextField+BearSet.h 3 | // Bear 4 | // 5 | // Created by Bear on 30/12/24. 6 | // Copyright © 2015年 Bear. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UITextField (BearSet) 12 | 13 | @property (copy, nonatomic) NSNumber *limitLength; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Pods/BearSkill/Pod/Classes/UI&Extend/UITextField+BearSet.m: -------------------------------------------------------------------------------- 1 | // 2 | // UITextField+BearSet.m 3 | // Bear 4 | // 5 | // Created by Bear on 30/12/24. 6 | // Copyright © 2015年 Bear. All rights reserved. 7 | // 8 | 9 | #import "UITextField+BearSet.h" 10 | #import "objc/runtime.h" 11 | 12 | static const void *limitLengthKey = &limitLengthKey; 13 | 14 | @implementation UITextField (BearSet) 15 | 16 | - (NSNumber *)limitLength 17 | { 18 | return objc_getAssociatedObject(self, limitLengthKey); 19 | } 20 | 21 | - (void)setLimitLength:(NSNumber *)limitLength 22 | { 23 | objc_setAssociatedObject(self, limitLengthKey, limitLength, OBJC_ASSOCIATION_COPY_NONATOMIC); 24 | 25 | [self addLimitLengthObserver:[limitLength intValue]]; 26 | } 27 | 28 | // 增加限制位数的通知 29 | - (void)addLimitLengthObserver:(int)length 30 | { 31 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(limitLengthEvent) name:UITextFieldTextDidChangeNotification object:self]; 32 | } 33 | 34 | // 限制输入的位数 35 | - (void)limitLengthEvent 36 | { 37 | if ([self.text length] > [self.limitLength intValue]) { 38 | self.text = [self.text substringToIndex:[self.limitLength intValue]]; 39 | } 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Pods/BearSkill/README.md: -------------------------------------------------------------------------------- 1 | # BearSkill Origin 2 | 3 | # README 4 | 5 | # BearSkill 6 | 7 | [![CI Status](http://img.shields.io/travis/Bear/BearSkill.svg?style=flat)](https://travis-ci.org/Bear/BearSkill) 8 | [![Version](https://img.shields.io/cocoapods/v/BearSkill.svg?style=flat)](http://cocoapods.org/pods/BearSkill) 9 | [![License](https://img.shields.io/cocoapods/l/BearSkill.svg?style=flat)](http://cocoapods.org/pods/BearSkill) 10 | [![Platform](https://img.shields.io/cocoapods/p/BearSkill.svg?style=flat)](http://cocoapods.org/pods/BearSkill) 11 | 12 | ## Installation 13 | 14 | BearSkill is available through [CocoaPods](http://cocoapods.org). To install 15 | it, simply add the following line to your Podfile: 16 | 17 | ```ruby 18 | pod "BearSkill" 19 | ``` 20 | 21 | ## Author 22 | 23 | Bear, 648070256@qq.com 24 | 25 | ## License 26 | 27 | BearSkill is available under the MIT license. See the LICENSE file for more info. 28 | 29 | Introduction 30 | ------------ 31 | 32 | ### 简介: 33 | 平时的工作总结,从UIView到布局,从富文本处理到图形切割,各种都有。 34 | 争取分好类。每个部分都有一个简短的介绍,有意见,建议欢迎沟通QQ:648070256。 35 | 36 | ## Constants / 常用常量和方法 37 | * BearConstants 38 | * iOS开发中常用的各种方法,常量。屏幕宽高,UserDefault宏等 39 | 40 | 41 | ## Layout / 非约束性布局 42 | * UIView+BearSet 43 | * 非约束性布局和一些常用的布局思路 44 | * 详情见链接:http://blog.csdn.net/xiongbaoxr/article/details/50668260 45 | 46 | * UITableView+BearStoreCellHeight 47 | * UITableView自动记录Cell高度,获取cell高度,告别手动管理 48 | 49 | 50 | 51 | ## UI&Extend / UI和扩展 52 | * BearAlertView 53 | * 自定义弹框,支持自定义contentView,自定义BtnsView,支持简单的动画样式 54 | 55 | * BearCutOutView 56 | * 对UIView挖空特定的形状 57 | 58 | * UITextField+BearLimitLength 59 | * 限制UITextField输入字符数量 60 | * 详情见链接:http://blog.csdn.net/xiongbaoxr/article/details/51525061 61 | 62 | 63 | 64 | ## AttributeString / 富文本处理 65 | * NSMutableAttributedString+BearSet 66 | * 便携式富文本处理,支持正则表达式。也可直接设置行间距。 67 | 68 | 69 | 70 | --- 71 | # 历史版本: 72 | * 0.1.0 73 | 1. 新增BearCutOutView挖空UIView的方法 74 | 2. 将原先UITextField+BearSet方法整理更名为UITextField+BearLimitLength,并保留原来名称兼容此前版本 75 | 3. 整理项目结构并进行分类 76 | * 0.1.1 77 | 1. 增加BearAlertView自定义弹框方法 -------------------------------------------------------------------------------- /Pods/Headers/Private/BearSkill/BearAlertBtnsView.h: -------------------------------------------------------------------------------- 1 | ../../../BearSkill/Pod/Classes/UI&Extend/BearAlertView/BearAlertBtnsView.h -------------------------------------------------------------------------------- /Pods/Headers/Private/BearSkill/BearAlertContentView.h: -------------------------------------------------------------------------------- 1 | ../../../BearSkill/Pod/Classes/UI&Extend/BearAlertView/BearAlertContentView.h -------------------------------------------------------------------------------- /Pods/Headers/Private/BearSkill/BearAlertView.h: -------------------------------------------------------------------------------- 1 | ../../../BearSkill/Pod/Classes/UI&Extend/BearAlertView/BearAlertView.h -------------------------------------------------------------------------------- /Pods/Headers/Private/BearSkill/BearConstants.h: -------------------------------------------------------------------------------- 1 | ../../../BearSkill/Pod/Classes/Constants/BearConstants.h -------------------------------------------------------------------------------- /Pods/Headers/Private/BearSkill/BearCutOutView.h: -------------------------------------------------------------------------------- 1 | ../../../BearSkill/Pod/Classes/UI&Extend/BearCutOutView.h -------------------------------------------------------------------------------- /Pods/Headers/Private/BearSkill/NSMutableAttributedString+BearSet.h: -------------------------------------------------------------------------------- 1 | ../../../BearSkill/Pod/Classes/AttributeString/NSMutableAttributedString+BearSet.h -------------------------------------------------------------------------------- /Pods/Headers/Private/BearSkill/UILabel+BearSet.h: -------------------------------------------------------------------------------- 1 | ../../../BearSkill/Pod/Classes/UI&Extend/UILabel+BearSet.h -------------------------------------------------------------------------------- /Pods/Headers/Private/BearSkill/UITableView+BearStoreCellHeight.h: -------------------------------------------------------------------------------- 1 | ../../../BearSkill/Pod/Classes/Layout/UITableView+BearStoreCellHeight.h -------------------------------------------------------------------------------- /Pods/Headers/Private/BearSkill/UITextField+BearLimitLength.h: -------------------------------------------------------------------------------- 1 | ../../../BearSkill/Pod/Classes/UI&Extend/UITextField+BearLimitLength.h -------------------------------------------------------------------------------- /Pods/Headers/Private/BearSkill/UITextField+BearSet.h: -------------------------------------------------------------------------------- 1 | ../../../BearSkill/Pod/Classes/UI&Extend/UITextField+BearSet.h -------------------------------------------------------------------------------- /Pods/Headers/Private/BearSkill/UIView+BearSet.h: -------------------------------------------------------------------------------- 1 | ../../../BearSkill/Pod/Classes/Layout/UIView+BearSet.h -------------------------------------------------------------------------------- /Pods/Headers/Public/BearSkill/BearAlertBtnsView.h: -------------------------------------------------------------------------------- 1 | ../../../BearSkill/Pod/Classes/UI&Extend/BearAlertView/BearAlertBtnsView.h -------------------------------------------------------------------------------- /Pods/Headers/Public/BearSkill/BearAlertContentView.h: -------------------------------------------------------------------------------- 1 | ../../../BearSkill/Pod/Classes/UI&Extend/BearAlertView/BearAlertContentView.h -------------------------------------------------------------------------------- /Pods/Headers/Public/BearSkill/BearAlertView.h: -------------------------------------------------------------------------------- 1 | ../../../BearSkill/Pod/Classes/UI&Extend/BearAlertView/BearAlertView.h -------------------------------------------------------------------------------- /Pods/Headers/Public/BearSkill/BearConstants.h: -------------------------------------------------------------------------------- 1 | ../../../BearSkill/Pod/Classes/Constants/BearConstants.h -------------------------------------------------------------------------------- /Pods/Headers/Public/BearSkill/BearCutOutView.h: -------------------------------------------------------------------------------- 1 | ../../../BearSkill/Pod/Classes/UI&Extend/BearCutOutView.h -------------------------------------------------------------------------------- /Pods/Headers/Public/BearSkill/NSMutableAttributedString+BearSet.h: -------------------------------------------------------------------------------- 1 | ../../../BearSkill/Pod/Classes/AttributeString/NSMutableAttributedString+BearSet.h -------------------------------------------------------------------------------- /Pods/Headers/Public/BearSkill/UILabel+BearSet.h: -------------------------------------------------------------------------------- 1 | ../../../BearSkill/Pod/Classes/UI&Extend/UILabel+BearSet.h -------------------------------------------------------------------------------- /Pods/Headers/Public/BearSkill/UITableView+BearStoreCellHeight.h: -------------------------------------------------------------------------------- 1 | ../../../BearSkill/Pod/Classes/Layout/UITableView+BearStoreCellHeight.h -------------------------------------------------------------------------------- /Pods/Headers/Public/BearSkill/UITextField+BearLimitLength.h: -------------------------------------------------------------------------------- 1 | ../../../BearSkill/Pod/Classes/UI&Extend/UITextField+BearLimitLength.h -------------------------------------------------------------------------------- /Pods/Headers/Public/BearSkill/UITextField+BearSet.h: -------------------------------------------------------------------------------- 1 | ../../../BearSkill/Pod/Classes/UI&Extend/UITextField+BearSet.h -------------------------------------------------------------------------------- /Pods/Headers/Public/BearSkill/UIView+BearSet.h: -------------------------------------------------------------------------------- 1 | ../../../BearSkill/Pod/Classes/Layout/UIView+BearSet.h -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - BearSkill (0.1.1) 3 | 4 | DEPENDENCIES: 5 | - BearSkill (= 0.1.1) 6 | 7 | SPEC CHECKSUMS: 8 | BearSkill: 35c7a9bd5d738820ac11bd2aa1c6c8ccb08672b8 9 | 10 | PODFILE CHECKSUM: df2831e6d96ae7003493e11fa2da844b7dcb13b5 11 | 12 | COCOAPODS: 1.2.1 13 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/bear.xcuserdatad/xcschemes/BearSkill-BearSkill.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/bear.xcuserdatad/xcschemes/BearSkill.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/bear.xcuserdatad/xcschemes/Pods-FlowMenuAnimation.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/bear.xcuserdatad/xcschemes/Pods-FlowMenuAnimationTests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/bear.xcuserdatad/xcschemes/Pods-FlowMenuAnimationUITests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/bear.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | BearSkill-BearSkill.xcscheme 8 | 9 | isShown 10 | 11 | 12 | BearSkill.xcscheme 13 | 14 | isShown 15 | 16 | 17 | Pods-FlowMenuAnimation.xcscheme 18 | 19 | isShown 20 | 21 | 22 | Pods-FlowMenuAnimationTests.xcscheme 23 | 24 | isShown 25 | 26 | 27 | Pods-FlowMenuAnimationUITests.xcscheme 28 | 29 | isShown 30 | 31 | 32 | 33 | SuppressBuildableAutocreation 34 | 35 | 59FB52C2A98E8BDAD4727DC057DF8E37 36 | 37 | primary 38 | 39 | 40 | C1682A754E7552860207A09114683CC5 41 | 42 | primary 43 | 44 | 45 | C4FF83225E0F2BB9E235D49F3CF434B9 46 | 47 | primary 48 | 49 | 50 | C7CAE86F127B0490BCF9E7A51BC62374 51 | 52 | primary 53 | 54 | 55 | F3A73757CDC17ED9BB88E92578025B37 56 | 57 | primary 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /Pods/Target Support Files/BearSkill/BearSkill-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_BearSkill : NSObject 3 | @end 4 | @implementation PodsDummy_BearSkill 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/BearSkill/BearSkill-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/BearSkill/BearSkill.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/BearSkill 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/BearSkill" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BearSkill" 4 | PODS_BUILD_DIR = $BUILD_DIR 5 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/BearSkill 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/BearSkill/ResourceBundle-BearSkill-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleIdentifier 8 | ${PRODUCT_BUNDLE_IDENTIFIER} 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | ${PRODUCT_NAME} 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 0.1.1 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-FlowMenuAnimation/Pods-FlowMenuAnimation-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## BearSkill 5 | 6 | Copyright (c) 2016 Bear <648070256@qq.com> 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-FlowMenuAnimation/Pods-FlowMenuAnimation-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2016 Bear <648070256@qq.com> 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | License 38 | MIT 39 | Title 40 | BearSkill 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Generated by CocoaPods - https://cocoapods.org 47 | Title 48 | 49 | Type 50 | PSGroupSpecifier 51 | 52 | 53 | StringsTable 54 | Acknowledgements 55 | Title 56 | Acknowledgements 57 | 58 | 59 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-FlowMenuAnimation/Pods-FlowMenuAnimation-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_FlowMenuAnimation : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_FlowMenuAnimation 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-FlowMenuAnimation/Pods-FlowMenuAnimation-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 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 91 | wait 92 | fi 93 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-FlowMenuAnimation/Pods-FlowMenuAnimation-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 | 3) 22 | TARGET_DEVICE_ARGS="--target-device tv" 23 | ;; 24 | 4) 25 | TARGET_DEVICE_ARGS="--target-device watch" 26 | ;; 27 | *) 28 | TARGET_DEVICE_ARGS="--target-device mac" 29 | ;; 30 | esac 31 | 32 | install_resource() 33 | { 34 | if [[ "$1" = /* ]] ; then 35 | RESOURCE_PATH="$1" 36 | else 37 | RESOURCE_PATH="${PODS_ROOT}/$1" 38 | fi 39 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 40 | cat << EOM 41 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 42 | EOM 43 | exit 1 44 | fi 45 | case $RESOURCE_PATH in 46 | *.storyboard) 47 | 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}" 48 | 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} 49 | ;; 50 | *.xib) 51 | 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}" 52 | 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} 53 | ;; 54 | *.framework) 55 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 57 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 58 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 59 | ;; 60 | *.xcdatamodel) 61 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 62 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 63 | ;; 64 | *.xcdatamodeld) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 67 | ;; 68 | *.xcmappingmodel) 69 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 70 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 71 | ;; 72 | *.xcassets) 73 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 74 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 75 | ;; 76 | *) 77 | echo "$RESOURCE_PATH" 78 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 79 | ;; 80 | esac 81 | } 82 | if [[ "$CONFIGURATION" == "Debug" ]]; then 83 | install_resource "$PODS_CONFIGURATION_BUILD_DIR/BearSkill/BearSkill.bundle" 84 | fi 85 | if [[ "$CONFIGURATION" == "Release" ]]; then 86 | install_resource "$PODS_CONFIGURATION_BUILD_DIR/BearSkill/BearSkill.bundle" 87 | fi 88 | 89 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 90 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 91 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 92 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 93 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 94 | fi 95 | rm -f "$RESOURCES_TO_COPY" 96 | 97 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 98 | then 99 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 100 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 101 | while read line; do 102 | if [[ $line != "${PODS_ROOT}*" ]]; then 103 | XCASSET_FILES+=("$line") 104 | fi 105 | done <<<"$OTHER_XCASSETS" 106 | 107 | 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}" 108 | fi 109 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-FlowMenuAnimation/Pods-FlowMenuAnimation.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BearSkill" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/BearSkill" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/BearSkill" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"BearSkill" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-FlowMenuAnimation/Pods-FlowMenuAnimation.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BearSkill" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/BearSkill" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/BearSkill" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"BearSkill" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-FlowMenuAnimationTests/Pods-FlowMenuAnimationTests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-FlowMenuAnimationTests/Pods-FlowMenuAnimationTests-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 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-FlowMenuAnimationTests/Pods-FlowMenuAnimationTests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_FlowMenuAnimationTests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_FlowMenuAnimationTests 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-FlowMenuAnimationTests/Pods-FlowMenuAnimationTests-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 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 91 | wait 92 | fi 93 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-FlowMenuAnimationTests/Pods-FlowMenuAnimationTests-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 | 3) 22 | TARGET_DEVICE_ARGS="--target-device tv" 23 | ;; 24 | 4) 25 | TARGET_DEVICE_ARGS="--target-device watch" 26 | ;; 27 | *) 28 | TARGET_DEVICE_ARGS="--target-device mac" 29 | ;; 30 | esac 31 | 32 | install_resource() 33 | { 34 | if [[ "$1" = /* ]] ; then 35 | RESOURCE_PATH="$1" 36 | else 37 | RESOURCE_PATH="${PODS_ROOT}/$1" 38 | fi 39 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 40 | cat << EOM 41 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 42 | EOM 43 | exit 1 44 | fi 45 | case $RESOURCE_PATH in 46 | *.storyboard) 47 | 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}" 48 | 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} 49 | ;; 50 | *.xib) 51 | 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}" 52 | 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} 53 | ;; 54 | *.framework) 55 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 57 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 58 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 59 | ;; 60 | *.xcdatamodel) 61 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 62 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 63 | ;; 64 | *.xcdatamodeld) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 67 | ;; 68 | *.xcmappingmodel) 69 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 70 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 71 | ;; 72 | *.xcassets) 73 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 74 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 75 | ;; 76 | *) 77 | echo "$RESOURCE_PATH" 78 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 79 | ;; 80 | esac 81 | } 82 | 83 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 86 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 87 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 88 | fi 89 | rm -f "$RESOURCES_TO_COPY" 90 | 91 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 92 | then 93 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 94 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 95 | while read line; do 96 | if [[ $line != "${PODS_ROOT}*" ]]; then 97 | XCASSET_FILES+=("$line") 98 | fi 99 | done <<<"$OTHER_XCASSETS" 100 | 101 | 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}" 102 | fi 103 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-FlowMenuAnimationTests/Pods-FlowMenuAnimationTests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BearSkill" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/BearSkill" 4 | OTHER_LDFLAGS = $(inherited) -ObjC 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-FlowMenuAnimationTests/Pods-FlowMenuAnimationTests.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BearSkill" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/BearSkill" 4 | OTHER_LDFLAGS = $(inherited) -ObjC 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-FlowMenuAnimationUITests/Pods-FlowMenuAnimationUITests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-FlowMenuAnimationUITests/Pods-FlowMenuAnimationUITests-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 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-FlowMenuAnimationUITests/Pods-FlowMenuAnimationUITests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_FlowMenuAnimationUITests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_FlowMenuAnimationUITests 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-FlowMenuAnimationUITests/Pods-FlowMenuAnimationUITests-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 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 91 | wait 92 | fi 93 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-FlowMenuAnimationUITests/Pods-FlowMenuAnimationUITests-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 | 3) 22 | TARGET_DEVICE_ARGS="--target-device tv" 23 | ;; 24 | 4) 25 | TARGET_DEVICE_ARGS="--target-device watch" 26 | ;; 27 | *) 28 | TARGET_DEVICE_ARGS="--target-device mac" 29 | ;; 30 | esac 31 | 32 | install_resource() 33 | { 34 | if [[ "$1" = /* ]] ; then 35 | RESOURCE_PATH="$1" 36 | else 37 | RESOURCE_PATH="${PODS_ROOT}/$1" 38 | fi 39 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 40 | cat << EOM 41 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 42 | EOM 43 | exit 1 44 | fi 45 | case $RESOURCE_PATH in 46 | *.storyboard) 47 | 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}" 48 | 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} 49 | ;; 50 | *.xib) 51 | 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}" 52 | 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} 53 | ;; 54 | *.framework) 55 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 57 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 58 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 59 | ;; 60 | *.xcdatamodel) 61 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 62 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 63 | ;; 64 | *.xcdatamodeld) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 67 | ;; 68 | *.xcmappingmodel) 69 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 70 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 71 | ;; 72 | *.xcassets) 73 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 74 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 75 | ;; 76 | *) 77 | echo "$RESOURCE_PATH" 78 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 79 | ;; 80 | esac 81 | } 82 | 83 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 86 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 87 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 88 | fi 89 | rm -f "$RESOURCES_TO_COPY" 90 | 91 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 92 | then 93 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 94 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 95 | while read line; do 96 | if [[ $line != "${PODS_ROOT}*" ]]; then 97 | XCASSET_FILES+=("$line") 98 | fi 99 | done <<<"$OTHER_XCASSETS" 100 | 101 | 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}" 102 | fi 103 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-FlowMenuAnimationUITests/Pods-FlowMenuAnimationUITests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BearSkill" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/BearSkill" 4 | OTHER_LDFLAGS = $(inherited) -ObjC 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-FlowMenuAnimationUITests/Pods-FlowMenuAnimationUITests.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BearSkill" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/BearSkill" 4 | OTHER_LDFLAGS = $(inherited) -ObjC 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FlowMenuAnimation 2 | 流动流菜单动效 3 | 4 | 网上找的原型,通过代码做成的动效,iOS版 5 | --- 6 | 博客讲解地址:http://blog.csdn.net/xiongbaoxr/article/details/51818265 7 | --- 8 | 9 | 代码实现效果 10 | 11 | ![FlowMenuAniamtion.png](READMEResource/FlowMenuAniamtion.gif) 12 | 13 | 原型效果 14 | 15 | ![FlowMenuAniamtion.png](READMEResource/1464710155460041.gif) 16 | 17 | 18 | -------------------------------------------------------------------------------- /READMEResource/1464710155460041.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BearRan/FlowMenuAnimation/85a3b7a5bee49402b942a90c2fb95ea591f5f1ad/READMEResource/1464710155460041.gif -------------------------------------------------------------------------------- /READMEResource/FlowMenuAniamtion.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BearRan/FlowMenuAnimation/85a3b7a5bee49402b942a90c2fb95ea591f5f1ad/READMEResource/FlowMenuAniamtion.gif --------------------------------------------------------------------------------