嗨我正在創建一個與iOS默認鬧鐘相關的應用程序。我在tableView中選擇了一個多個單元格。如果我點擊後退按鈕,選定的單元格將作爲另一個視圖中的標籤顯示在tableViewCell中。我正在使用故事板。這個怎麼做?在tableView中選擇多個單元格,並將所選單元格顯示在另一個tableView單元格中作爲標籤?
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *thisCell = [tableView cellForRowAtIndexPath:indexPath];
if (thisCell.accessoryType == UITableViewCellAccessoryNone) {
thisCell.accessoryType = UITableViewCellAccessoryCheckmark;
[myIndexArray addObject:[NSString stringWithFormat:@"%d",indexPath.row]];
}
else
{
thisCell.accessoryType = UITableViewCellAccessoryNone;
for(int i=0; i<myIndexArray.count; i++)
{
if([[myIndexArray objectAtIndex:i]intValue]== indexPath.row)
{
[myIndexArray removeObjectAtIndex:i];
break;
}
}
}
}
The sample image I want like this
我想是一個重複查看,然後按返回鍵選中的單元格都顯示在重複tableViewCell。
感謝數組我會檢查它ñ回到ü – 2013-02-20 09:00:17
@ IOS234好的... :) – 2013-02-20 13:06:06
@你可以給我任何這樣的示例。謝謝 – moosa0709 2013-03-27 10:37:41