NSMutableSet *_selectedIndexPaths;
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if ([_selectedIndexPaths containsObject:indexPath]) {
[_selectedIndexPaths removeObject:indexPath];
} else {
[_selectedIndexPaths addObject:indexPath];
}
[UIView animateWithDuration:0.5
delay:0.0
options:UIViewAnimationOptionLayoutSubviews
animations:^{
[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationNone];
}
completion:NULL];
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
CGFloat height = 68.0f;
if ([_selectedIndexPaths containsObject:indexPath]) {
height *= 2.0f;
}
return height;
}'개발 > iOS' 카테고리의 다른 글
[iOS] XCode gloss effect 없애기 (0) | 2012.03.24 |
---|---|
[IOS] KEYBOARD 화면 이동 (0) | 2010.12.13 |
[IOS] image size (0) | 2010.11.28 |
[XCODE] Breakpoint가 안먹을 때 (0) | 2010.11.28 |
[XCODE] 메모리 관리 규칙 (0) | 2010.11.16 |