forked from chenfanfang/FFDropDownMenu
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFFDropDownMenuView.m
More file actions
655 lines (502 loc) · 22.6 KB
/
Copy pathFFDropDownMenuView.m
File metadata and controls
655 lines (502 loc) · 22.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
//
// FFDropDownMenuVC.m
// FFDropDownMenuDemo
//
// Created by mac on 16/7/31.
// Copyright © 2016年 chenfanfang. All rights reserved.
//
#import "FFDropDownMenuView.h"
//view
#import "FFDropDownMenuTriangleView.h"
//other
#import "FFDropDownMenu.h"
@interface FFDropDownMenuView ()<UITableViewDataSource, UITableViewDelegate>
/**tableView*/
@property (nonatomic, weak) UITableView *tableView;
@property (nonatomic, strong) FFDropDownMenuTriangleView *triangleView;
/** 真实的三角形的Y(这个属性是用于状态栏的改变) */
@property (nonatomic, assign) CGFloat realTriangleY;
/** 视图是否在显示*/
@property (nonatomic, assign) BOOL isShow;
/** cell是否是正确格式的cell */
@property (nonatomic, assign) BOOL isCellCorrect;
/** tableView的frame */
@property (nonatomic, assign) CGRect menuViewFrame;
/** 菜单view的容器 */
@property (nonatomic, strong) UIView *menuContentView;
@end
@implementation FFDropDownMenuView
//=================================================================
// 生命周期<life circle>
//=================================================================
#pragma mark - 生命周期<life circle>
- (instancetype)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
self.menuContentView = [[UIView alloc] init];
self.menuContentView.backgroundColor = [UIColor clearColor];
self.menuContentView.clipsToBounds = YES;
[self addSubview:self.menuContentView];
//默认属性的赋值<assign>
self.cellClassName = @"FFDropDownMenuCell";
self.menuWidth = 150;
self.menuCornerRadius = 5;
self.eachMenuItemHeight = 40;
self.menuRightMargin = 10;
self.menuItemBackgroundColor = [UIColor whiteColor];
self.triangleColor = [UIColor whiteColor];
self.triangleY = 64;
self.realTriangleY = self.triangleY;
self.triangleRightMargin = 20;
self.triangleSize = FFDefaultSize;
self.bgColorbeginAlpha = 0.02;
self.bgColorEndAlpha = 0.2;
self.animateDuration = 0.2;
self.menuAnimateType = FFDropDownMenuViewAnimateType_ScaleBasedTopRight;
self.isCellCorrect = NO;
self.isShow = NO;
//监听状态栏高度改变的通知<observe statusbar height change notification>
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(statusBarHeightChanged:) name:UIApplicationWillChangeStatusBarFrameNotification object:nil];
//监听状态栏的旋转<observe statusbar orientation change notification>
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(statusBarOrientationChange:) name:UIApplicationDidChangeStatusBarOrientationNotification object:nil];
}
return self;
}
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
//=================================================================
// 快速实例化一个菜单对象<farst instance>
//=================================================================
#pragma mark - 快速实例化一个菜单对象<farst instance>
+ (instancetype)ff_DefaultStyleDropDownMenuWithMenuModelsArray:(NSArray *)menuModelsArray menuWidth:(CGFloat)menuWidth eachItemHeight:(CGFloat)eachItemHeight menuRightMargin:(CGFloat)menuRightMargin triangleRightMargin:(CGFloat)triangleRightMargin {
FFDropDownMenuView *menuView = [FFDropDownMenuView new];
menuView.menuModelsArray = menuModelsArray;
menuView.menuWidth = menuWidth;
menuView.eachMenuItemHeight = eachItemHeight;
menuView.menuRightMargin = menuRightMargin;
menuView.triangleRightMargin = triangleRightMargin;
[menuView setup];
return menuView;
}
//=================================================================
// 初始化<setup>
//=================================================================
#pragma mark - 初始化<setup>
- (void)setup {
[_tableView removeFromSuperview];
_tableView = nil;
//屏幕的size <screen size>
CGSize screenSize = [UIScreen mainScreen].bounds.size;
//设置view的圆角、frame <set view's cornerRadius and frame>
self.frame = [UIScreen mainScreen].bounds;
self.clipsToBounds = YES;
self.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:self.bgColorEndAlpha];
//设置三角形的frame <set triangle frame>
CGFloat horizonWidth = screenSize.width; //水平的宽度
self.triangleView.frame = CGRectMake(horizonWidth - self.triangleRightMargin - self.triangleSize.width, self.realTriangleY, self.triangleSize.width, self.triangleSize.height);
self.triangleView.triangleColor = self.triangleColor;
//tableView的frame <set tableView frame>
self.menuViewFrame = CGRectMake(horizonWidth - self.menuWidth - self.menuRightMargin, CGRectGetMaxY(self.triangleView.frame), self.menuWidth, self.eachMenuItemHeight * self.menuModelsArray.count);
self.menuContentView.frame = self.menuViewFrame;
self.tableView.frame = self.menuContentView.bounds;
[self.tableView reloadData];
}
//=================================================================
// 横竖屏适配<Screen adaptation>
//=================================================================
#pragma mark - 横竖屏适配<Screen adaptation>
/** 横竖屏的改变 */
- (void)statusBarOrientationChange:(NSNotification *)note {
[self setup];
}
/** 状态栏frame的变化 */
- (void)statusBarHeightChanged:(NSNotification *)note {
CGRect statusBarFrame = [note.userInfo[UIApplicationStatusBarFrameUserInfoKey] CGRectValue];
//正常的状态栏高度是20
CGFloat normalStatusBarHeight = 20;
CGSize screenSize = [UIScreen mainScreen].bounds.size;
//FFLog(@"%@",NSStringFromCGRect(statusBarFrame));
CGFloat screenWidth = 0;
CGFloat screenHeight = 0;
if (screenSize.height > screenSize.width) {
screenWidth = screenSize.width;
screenHeight = screenSize.height;
}
else {
screenWidth = screenSize.height;
screenHeight = screenSize.width;
}
//横屏
if (statusBarFrame.origin.y >= screenWidth || //横屏: statusBarFrame = {{0, 375}, {0, 0}}
statusBarFrame.size.width >= screenHeight || //横屏: statusBarFrame = {{0, 0}, {667, 20}}
statusBarFrame.origin.x >= screenHeight) { //横屏:{{568, 0}, {0, 0}}
self.realTriangleY = self.triangleY - (44 - 32) - normalStatusBarHeight; //竖屏导航栏44, 横屏:32
} else { //竖屏
if (statusBarFrame.size.height == 0) {
self.realTriangleY = self.triangleY;
} else {
self.realTriangleY = self.triangleY + (statusBarFrame.size.height - normalStatusBarHeight);
}
}
[self setup];
}
//=================================================================
// 懒加载<lazy load>
//=================================================================
#pragma mark - 懒加载<lazy load>
static NSString *const CellID = @"CellID";
- (UITableView *)tableView {
if (_tableView == nil) {
UITableView *tableView = [[UITableView alloc] init];
tableView.backgroundColor = [UIColor clearColor];
[self.menuContentView addSubview:tableView];
_tableView = tableView;
tableView.delegate = self;
tableView.dataSource = self;
tableView.scrollEnabled = NO;
tableView.clipsToBounds = YES;
tableView.layer.masksToBounds = YES;
self.menuContentView.layer.cornerRadius = self.menuCornerRadius;
tableView.layer.cornerRadius = self.menuCornerRadius;
//锚点的设置 <set anchorPoint>
switch (self.menuAnimateType) {
case FFDropDownMenuViewAnimateType_ScaleBasedTopRight: //右上角
tableView.layer.anchorPoint = CGPointMake(1, 0);
break;
case FFDropDownMenuViewAnimateType_ScaleBasedTopLeft: //左上角
tableView.layer.anchorPoint = CGPointMake(0, 0);
break;
case FFDropDownMenuViewAnimateType_ScaleBasedMiddle: //中间
break;
case FFDropDownMenuViewAnimateType_FadeInFadeOut: //淡入淡出效果
break;
case FFDropDownMenuViewAnimateType_RollerShutter: //卷帘效果
tableView.layer.anchorPoint = CGPointMake(0.5, 1);
break;
case FFDropDownMenuViewAnimateType_FallFromTop:
break;
default:
break;
}
//注册cell <register cell>
if ([self.cellClassName hasSuffix:@".xib"]) { //xib名称
NSString *className = [self.cellClassName componentsSeparatedByString:@".xib"].firstObject;
if (!NSClassFromString(className)) {
FFLog(@"%@这个类不存在,请查看项目中是否有该类",className);
return _tableView;
}
if (![NSClassFromString(className) isSubclassOfClass:[FFDropDownMenuBasedCell class]]) {
FFLog(@"%@这个类不是FFDropDownMenuBasedCell的子类,请继承这个类",className);
return _tableView;
}
self.isCellCorrect = YES;
UINib *cellNib = [UINib nibWithNibName:className bundle:nil];
[tableView registerNib:cellNib forCellReuseIdentifier:CellID];
} else { //cell类名
if (!NSClassFromString(self.cellClassName)) {
FFLog(@"%@这个类不存在,请查看项目中是否有该类",self.cellClassName);
return _tableView;
}
if (![NSClassFromString(self.cellClassName) isSubclassOfClass:[FFDropDownMenuBasedCell class]]) {
FFLog(@"%@这个类不是FFDropDownMenuBasedCell的子类,请继承这个类",self.cellClassName);
return _tableView;
}
self.isCellCorrect = YES;
[tableView registerClass:NSClassFromString(self.cellClassName) forCellReuseIdentifier:CellID];
}
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
}
return _tableView;
}
- (FFDropDownMenuTriangleView *)triangleView {
if (_triangleView == nil) {
FFDropDownMenuTriangleView *triangleView = [[FFDropDownMenuTriangleView alloc] init];
[self addSubview:triangleView];
triangleView.backgroundColor = [UIColor clearColor];
_triangleView = triangleView;
}
return _triangleView;
}
//=================================================================
// UITableViewDataSource
//=================================================================
#pragma mark - UITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.menuModelsArray.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
if (self.isCellCorrect == NO) {
UITableViewCell *cell = [UITableViewCell new];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
FFDropDownMenuBasedCell *cell = [tableView dequeueReusableCellWithIdentifier:CellID];
cell.backgroundColor = self.menuItemBackgroundColor;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
FFDropDownMenuBasedModel *menuModel = self.menuModelsArray[indexPath.row];
cell.menuModel = menuModel;
return cell;
}
//=================================================================
// UITableViewDelegate
//=================================================================
#pragma mark - UITableViewDelegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if (self.isShow == YES) {
FFDropDownMenuBasedModel *menuModel = self.menuModelsArray[indexPath.row];
if (menuModel.menuBlock) {
menuModel.menuBlock();
}
//关闭菜单
[self dismissMenuWithAnimation:NO];
}
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
return self.eachMenuItemHeight;
}
//=================================================================
// 事件处理<action>
//=================================================================
#pragma mark - 事件处理<action>
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
/** 点击view退出菜单 */
if (self.isShow == YES) {
[self dismissMenuWithAnimation:YES];
}
}
/**
* 关闭菜单
*
* @param animation 是否需要动画效果
* 如果是点击cell 执行block里面的代码就无需动画
* 如果死点击view的其他区域,没有执行block代码,则需要一个动画效果
*/
- (void)dismissMenuWithAnimation:(BOOL)animation {
if (self.isShow == NO) return;
self.isShow = NO;
//================================
// 需要动画效果
//================================
if (animation == YES) {
__weak typeof(self) weakSelf = self;
//=============
//淡入淡出动画效果
//=============
if (self.menuAnimateType == FFDropDownMenuViewAnimateType_FadeInFadeOut) {
[UIView animateWithDuration:self.animateDuration delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
weakSelf.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:self.bgColorbeginAlpha];
weakSelf.tableView.alpha = 0;
weakSelf.triangleView.alpha = 0;
} completion:^(BOOL finished) {
[weakSelf removeFromSuperview];
}];
}
//============
// 卷帘效果
//============
else if (self.menuAnimateType == FFDropDownMenuViewAnimateType_RollerShutter) {
[UIView animateWithDuration:self.animateDuration animations:^{
CGRect frame = weakSelf.menuContentView.bounds;
frame.size.height = 0;
weakSelf.tableView.frame = frame;
weakSelf.backgroundColor = FFColor(0, 0, 0, weakSelf.bgColorbeginAlpha);
} completion:^(BOOL finished) {
[weakSelf removeFromSuperview];
}];
}
//============
// 从上往下落下
//============
else if (self.menuAnimateType == FFDropDownMenuViewAnimateType_FallFromTop) {
[UIView animateWithDuration:self.animateDuration animations:^{
CGRect tableViewLayerFrame = self.menuContentView.bounds;
tableViewLayerFrame.origin.y = -tableViewLayerFrame.size.height;
weakSelf.tableView.layer.frame = tableViewLayerFrame;
weakSelf.backgroundColor = FFColor(0, 0, 0, weakSelf.bgColorbeginAlpha);
} completion:^(BOOL finished) {
[self removeFromSuperview];
}];
}
//=============
//伸缩动画效果
//=============
else {
//动画效果:在0.2秒内 大小缩小到 0.1倍 ,背景颜色由深变浅(其实颜色都是黑色,只是通过alpha来控制颜色的深浅)
[UIView animateWithDuration:self.animateDuration animations:^{
[weakSelf.tableView.layer setValue:@(0.1) forKeyPath:@"transform.scale"];
weakSelf.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:weakSelf.bgColorbeginAlpha];
weakSelf.tableView.alpha = 0;
weakSelf.triangleView.alpha = 0;
} completion:^(BOOL finished) {
//动画结束:将控制器的view从父控件中移除(父控件就是 KeyWindow)
[weakSelf removeFromSuperview];
}];
}
}
//================================
// 不需要动画效果
//================================
else {
//=============
//淡入淡出动画效果
//=============
if (self.menuAnimateType == FFDropDownMenuViewAnimateType_FadeInFadeOut) {
self.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:self.bgColorbeginAlpha];
[self removeFromSuperview];
}
//=============
// 卷帘效果
//=============
else if (self.menuAnimateType == FFDropDownMenuViewAnimateType_RollerShutter) {
[self removeFromSuperview];
}
//=============
// 从上往下落下
//=============
else if (self.menuAnimateType == FFDropDownMenuViewAnimateType_FallFromTop) {
CGRect tableViewLayerFrame = self.menuContentView.bounds;
tableViewLayerFrame.origin.y = -tableViewLayerFrame.size.height;
self.tableView.layer.frame = tableViewLayerFrame;
[self removeFromSuperview];
}
//=============
// 伸缩动画效果
//=============
else {
[self.tableView.layer setValue:@(0.1) forKeyPath:@"transform.scale"];
self.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:self.bgColorbeginAlpha];
[self removeFromSuperview];
}
}
}
/** 显示菜单 */
- (void)showMenu {
self.isShow = YES;
UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow;
[keyWindow addSubview:self];
//将背景颜色设置浅的背景颜色
self.backgroundColor = FFColor(0, 0, 0, self.bgColorbeginAlpha);
__weak typeof(self) weakSelf = self;
//=============
// 淡入淡出效果
//=============
if (self.menuAnimateType == FFDropDownMenuViewAnimateType_FadeInFadeOut) {
self.tableView.alpha = 0;
self.triangleView.alpha = 0;
[UIView animateWithDuration:self.animateDuration delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
weakSelf.backgroundColor = FFColor(0, 0, 0, self.bgColorEndAlpha);
weakSelf.tableView.alpha = 1;
weakSelf.triangleView.alpha = 1;
} completion:nil];
}
//=============
// 卷帘效果
//=============
else if (self.menuAnimateType == FFDropDownMenuViewAnimateType_RollerShutter) {
self.backgroundColor = FFColor(0, 0, 0, self.bgColorbeginAlpha);
CGRect frame = self.menuContentView.bounds;
frame.size.height = 0;
self.tableView.frame = frame;
[UIView animateWithDuration:self.animateDuration animations:^{
weakSelf.tableView.frame = weakSelf.menuContentView.bounds;
weakSelf.backgroundColor = FFColor(0, 0, 0, weakSelf.bgColorEndAlpha);
}];
}
//============
// 上往下落下
//============
else if (self.menuAnimateType == FFDropDownMenuViewAnimateType_FallFromTop) {
CGRect tableViewLayerFrame = self.menuContentView.bounds;
tableViewLayerFrame.origin.y = -tableViewLayerFrame.size.height;
self.tableView.layer.frame = tableViewLayerFrame;
[UIView animateWithDuration:self.animateDuration animations:^{
weakSelf.tableView.layer.frame = weakSelf.menuContentView.bounds;
weakSelf.backgroundColor = FFColor(0, 0, 0, weakSelf.bgColorEndAlpha);
} completion:nil];
}
//============
// 伸缩效果
//============
else {
self.tableView.alpha = 0;
self.triangleView.alpha = 0;
//先将menu的tableView缩小
[self.tableView.layer setValue:@(0.1) forKeyPath:@"transform.scale"];
//执行动画:背景颜色 由浅到深,menu的tableView由小到大,回复到正常大小
[UIView animateWithDuration:self.animateDuration animations:^{
weakSelf.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:self.bgColorEndAlpha];
[weakSelf.tableView.layer setValue:@(1) forKeyPath:@"transform.scale"];
weakSelf.tableView.alpha = 1;
weakSelf.triangleView.alpha = 1;
}];
}
}
//=================================================================
// 所有属性的set方法<set method>
//=================================================================
#pragma mark - 所有属性的set方法<set method>
- (void)setMenuModelsArray:(NSArray *)menuModelsArray {//1
_menuModelsArray = menuModelsArray;
}
- (void)setCellClassName:(NSString *)cellClassName {//2
_cellClassName = cellClassName;
}
- (void)setMenuWidth:(CGFloat)menuWidth {//3
if (menuWidth != FFDefaultFloat) {
_menuWidth = menuWidth;
}
}
- (void)setMenuCornerRadius:(CGFloat)menuCornerRadius {//4
if (menuCornerRadius != FFDefaultFloat) {
_menuCornerRadius = menuCornerRadius;
}
}
- (void)setEachMenuItemHeight:(CGFloat)eachMenuItemHeight {//5
if (eachMenuItemHeight != FFDefaultFloat) {
_eachMenuItemHeight = eachMenuItemHeight;
}
}
- (void)setMenuRightMargin:(CGFloat)menuRightMargin {//6
if (menuRightMargin != FFDefaultFloat) {
_menuRightMargin = menuRightMargin;
}
}
- (void)setMenuItemBackgroundColor:(UIColor *)menuItemBackgroundColor { //7
_menuItemBackgroundColor = menuItemBackgroundColor;
}
- (void)setTriangleColor:(UIColor *)triangleColor {//8
_triangleColor = triangleColor;
}
- (void)setTriangleY:(CGFloat)triangleY {//9
if (triangleY != FFDefaultFloat) {
_triangleY = triangleY;
self.realTriangleY = _triangleY;
}
}
- (void)setTriangleRightMargin:(CGFloat)triangleRightMargin {//10
if (triangleRightMargin != FFDefaultFloat) {
_triangleRightMargin = triangleRightMargin;
}
}
- (void)setTriangleSize:(CGSize)triangleSize {//11
_triangleSize = triangleSize;
}
- (void)setBgColorbeginAlpha:(CGFloat)bgColorbeginAlpha {//12
if (bgColorbeginAlpha != FFDefaultFloat) {
_bgColorbeginAlpha = bgColorbeginAlpha;
}
}
- (void)setBgColorEndAlpha:(CGFloat)bgColorEndAlpha {//13
if (bgColorEndAlpha != FFDefaultFloat) {
_bgColorEndAlpha = bgColorEndAlpha;
}
}
- (void)setAnimateDuration:(CGFloat)animateDuration {//14
if (animateDuration != FFDefaultFloat) {
_animateDuration = animateDuration;
}
}
- (void)setMenuAnimateType:(FFDropDownMenuViewAnimateType)menuAnimateType { //15
_menuAnimateType = menuAnimateType;
}
@end