File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+
3
+
4
+
5
+ ## Code Example
6
+
7
+ ```
8
+ + (void)moveAnimationWithTableView:(UITableView *)tableView {
9
+
10
+ NSArray *cells = tableView.visibleCells;
11
+ for (int i = 0; i < cells.count; i++) {
12
+ CGFloat totalTime = 0.4;
13
+ UITableViewCell *cell = [tableView.visibleCells objectAtIndex:i];
14
+ cell.transform = CGAffineTransformMakeTranslation(-XS_SCREEN_WIDTH, 0);
15
+ [UIView animateWithDuration:0.4 delay:i*(totalTime/cells.count) usingSpringWithDamping:0.7 initialSpringVelocity:1/0.7 options:UIViewAnimationOptionCurveEaseIn animations:^{
16
+ cell.transform = CGAffineTransformIdentity;
17
+ } completion:^(BOOL finished) {
18
+
19
+ }];
20
+ }
21
+ }
22
+ ```
23
+
24
+ ## Show
1
25
![ 2017-09-05 18_41_31.gif] ( http://upload-images.jianshu.io/upload_images/1819750-5969d06fc5f0b1ad.gif?imageMogr2/auto-orient/strip )
2
26
3
27
You can’t perform that action at this time.
0 commit comments