我收到了以下错误,非常新的iphone开发和目标C.我非常愿意发送我的项目让某人看看,我在圈子里跑,不知道接下来该做什么!
2010-11-10 19:38:07.822 iShisha[2698:207] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSMutableArray objectAtIndex:]: index 1 beyond bounds [0 .. 0]'
*** Call stack at first throw:
(
0 CoreFoundation 0x025f9b99 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x0274940e objc_exception_throw + 47
2 CoreFoundation 0x025ef695 -[__NSArrayM objectAtIndex:] + 261
3 iShisha 0x00003dc5 -[MapViewController tableView:cellForRowAtIndexPath:] + 1262
4 UIKit 0x0032dd6f -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 619
5 UIKit 0x00323e02 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 75
6 UIKit 0x00338774 -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1561
7 UIKit 0x003307ec …Run Code Online (Sandbox Code Playgroud) 我的目标是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"];
Run Code Online (Sandbox Code Playgroud)
谢谢你的帮助!