我收到此错误:
[NSIndexPath row]:消息发送到已释放实例 0x13135d50
我的代码:
-(void) scrollViewDidFinishScrolling: (UIScrollView*) scrollView {
CGPoint point = [self convertPoint:CGPointMake(self.frame.size.width/2.0, kDefaultCellHeight/2.0) toView:self.tableView];
NSIndexPath* centerIndexPath = [self.tableView indexPathForRowAtPoint:point];
[self.tableView selectRowAtIndexPath: centerIndexPath
animated: YES
scrollPosition: UITableViewScrollPositionTop];
if (centerIndexPath.row != self.currentIndex.row) {
//Hide the arrow when scrolling
[self setCurrentIndex:centerIndexPath];
}
[self.arrow show:YES];