2013-07-10 77 views

回答

0

點擊後,您可以嘗試更改UITableViewCell的背景視圖。您可以使用此方法獲取單擊的單元格。

UITableViewCell *cell=[tableView cellForRowAtIndexPath:indexPath]; 
1

試試這個,

//獲得選擇的tableview細胞和細胞進行一些動畫。我正在使用縮放向上和向下動畫

#pragma mark Table View Delgate method 
- (void)tableView:(UITableView *)tbView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
    { 
    CustomTableViewCellForTradeList *cell=(CustomTableViewCellForTradeList *)[tbl_TradeList cellForRowAtIndexPath:indexPath ]; 
    cell.transform = CGAffineTransformMakeScale(0.85,0.85); 
    [self performSelector:@selector(NavigateToTradeBuySellAfterScaling:) withObject:indexPath afterDelay:0.1]; 
} 

// rescale uitableview cell。

-(void)NavigateToTradeBuySellAfterScaling:(NSIndexPath *)indexPath 
{ 
CustomTableViewCellForTradeList *cell=(CustomTableViewCellForTradeList *)[tbl_TradeList cellForRowAtIndexPath:indexPath ]; 
cell.transform = CGAffineTransformMakeScale(1.0,1.0); 
[self performSelector:@selector(NavigateToTradeBuySellAfterScaling1:) withObject:indexPath afterDelay:0.1]; 
} 

//導航到其他視圖控制器

-(void)NavigateToTradeBuySellAfterScaling1:(NSIndexPath *)indexPath 
{ 
TradeBuySellViewController* tradeBuySellController = [[TradeBuySellViewController alloc] initWithNibName:@"TradeBuySellViewController" bundle:nil :entity]; 
[self.navigationController pushViewController:tradeBuySellController animated:YES]; 

}