我是iOS開發新手,我想知道當我點擊表格行時,我的數據顯示在表格視圖中應該選擇標籤。我的標籤有名稱城市。桌面視圖標籤上顯示的TableView數據
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *simpleTableIdentifier = @"SimpleTableItem";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:simpleTableIdentifier];
}
cell.textLabel.text = [arrayname objectAtIndex:indexPath.row];
return cell;
}
你知道tableView'didSelectRowAtIndexPath'方法嗎? –
可能是我的格式錯誤的方式,但我的問題是真的..有沒有人可以幫忙? –
我知道這件事,但我不知道里面寫了什麼? –