-1
내가 storyboards.I가모든 섹션에서 단일 행을 선택하는 방법은 무엇입니까?
내가 모든 부분에서 하나의 행을 선택하고 선택한 행의 값을 취득 할Alpha
a
b >
Numb
1 >
2
3
같은 두 개의 섹션으로 jQuery과 구현 사용하여 iOS 앱을 짓고 있어요.
나는 이것을 할 수 없다. 나를 도울 수있다. 한 번에 선택 한 행이 있음을
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
// Uncheck the previous checked row
long sec = [indexPath section];
if(sec==0){
if(self->checkedIndexPath)
{
UITableViewCell* uncheckCell = [tableView
cellForRowAtIndexPath:self->checkedIndexPath];
uncheckCell.accessoryType = UITableViewCellAccessoryNone;
}
if([self->checkedIndexPath isEqual:indexPath])
{
self->checkedIndexPath = nil;
}
else
{
UITableViewCell* cell = [tableView cellForRowAtIndexPath:indexPath];
cell.accessoryType = UITableViewCellAccessoryCheckmark;
self->checkedIndexPath = indexPath;
}
}
else if(sec==1){
if(self->checkedIndexPath)
{
UITableViewCell* uncheckCell = [tableView
cellForRowAtIndexPath:self->checkedIndexPath];
uncheckCell.accessoryType = UITableViewCellAccessoryNone;
}
if([self->checkedIndexPath isEqual:indexPath])
{
self->checkedIndexPath = nil;
}
}
}
UITableView 인스턴스에 대해 다중 선택 = ON으로 설정하십시오. – Anon