我正在做一個UITableView與iOS應用程序的可展開/可摺疊單元格,我想顯示,當用戶點擊單元格圖像將下來,當再次點擊它時,圖像將是這樣的,這是可能的! 這裏是我的代碼如何在ios中的單元格上單擊時在可展開單元格中旋轉圖像?
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if (selectedIndex == indexPath.row)
{
selectedIndex = -1;
[myContestTableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
return;
}
if (selectedIndex != -1)
{
NSIndexPath *prevPath = [NSIndexPath indexPathForRow:selectedIndex inSection:0];
selectedIndex = indexPath.row;
[myContestTableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:prevPath] withRowAnimation:UITableViewRowAnimationFade];
}
selectedIndex = indexPath.row;
[myContestTableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
}
在此我的形象的名字叫「rotataeImage」請幫助我。 這裏是我膨脹的室默認的圖像就像是在細胞這個
當用戶點擊圖像會,並再次對細胞的默認圖像用戶點擊將在這裏顯示
請解釋的困難,你面對 –
查看更新的問題。謝謝:) –