问题描述
|
我的目标是让
UITableViewCell
从屏幕的一侧滑出(例如在Twitter中),然后从另一侧滑回。我能够使该单元格从屏幕右侧滑出,但似乎无法弄清楚如何使它从左侧向右滑回屏幕。这是将其向右滑动的代码:
UITableViewCell *cell = [self cellForRowAtIndexPath:indexPath];
[cell.layer setAnchorPoint:CGPointMake(0,0.5)];
[cell.layer setPosition:CGPointMake(cell.frame.size.width,cell.layer.position.y)];
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@\"position.x\"];
[animation setRemovedOnCompletion:NO];
[animation setDelegate:self];
[animation setDuration:0.14];
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]];
[cell.layer addAnimation:animation forKey:@\"reveal\"];
谢谢你的帮助!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)