获取TbaleViewCell的frame及cell点击动画

来源:互联网 发布:asp微商城源码 编辑:程序博客网 时间:2024/06/18 09:04
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {    // 获取对应cell的rect值(其值针对于UITableView而言)    CGRect rect = [self.tableView rectForRowAtIndexPath:indexPath];        // 做动画效果    NSLog(@"%@", NSStringFromCGRect(rect));    [self.tableView setContentOffset:CGPointMake(rect.origin.x, rect.origin.y)                            animated:YES];}
0 0
原创粉丝点击