forked from lovesunstar/STBasic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSTSortView.h
More file actions
46 lines (36 loc) · 1.77 KB
/
STSortView.h
File metadata and controls
46 lines (36 loc) · 1.77 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
//
// STSortView.h
// STBasic
//
// Created by SunJiangting on 13-11-2.
// Copyright (c) 2013年 SunJiangting. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface STSortView : UIView
/// default 5
@property (nonatomic, assign) NSInteger factor;
- (void) reloadSortDataSource:(NSArray *) dataSource;
/// 基线表示参考线,用于表示 循环走到了哪个节点
- (void) moveBaseline1ToIndex:(NSInteger) index
duration:(NSTimeInterval) duration
completion:(void(^)(BOOL finished)) completion;
- (void) moveBaseline2ToIndex:(NSInteger) index
duration:(NSTimeInterval) duration
completion:(void(^)(BOOL finished)) completion;
/// 将某个位置的元素移动到另一个位置 比如 array[toIndex] = array[index]
- (void) moveElementAtIndex:(NSInteger) index
toIndex:(NSInteger) toIndex
duration:(NSTimeInterval) duration
completion:(void (^)(BOOL finished)) completion;
/// 将某一个位置的元素移动到缓冲区,比如 int temp = array[index]
- (void) moveElementToCacheAtIndex:(NSInteger) index
duration:(NSTimeInterval) duration
completion:(void(^)(BOOL finished)) completion;
- (void) removeElementFromCacheWithDuration:(NSTimeInterval) duration
completion:(void(^)(BOOL finished)) completion;
/// 交换其中两个元素的位置 比如 int temp = array[index1];array[index1] = array[index2];array[index2] = temp;
- (void) exchangeElementAtIndex:(NSInteger) index1
withElementAtIndex:(NSInteger) index2
duration:(NSTimeInterval) duration
completion:(void(^)(BOOL finished)) completion;
@end