我解析XML并从UITablevView中选择,但我有一个问题,我将如何更改每个选择上的链接?传递UITableView的解析XML
例如;
www.example.com/test12.php?d=0
www.example.com/test12.php?d=1&il=istanbul
www.example.com/test12.php?d=2&il=istanbul&ilce=kadikoy
我怎样才能改变d =和IL =和ILCE =值在每个选择上的UITableView?
我已经写了这个,但不能进一步。从现在
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *selectedCell = [tableView cellForRowAtIndexPath:indexPath];
NSString *cellText = selectedCell.textLabel.text;
NSString *linkID = @"http://example/[email protected]%&[email protected]%";
NSLog(@"%@ Selected", cellText);
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
containerObject = [objectCollection objectAtIndex:indexPath.row];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:CellIdentifier];
}
// Set up the cell...
cell.textLabel.text = containerObject.city;
return cell;
}
感谢。
解释什么是表视图,它与参数和在参数存储... – Wain
什么是(1,1,2),伊斯坦布尔和卡德柯伊。这家商店在哪里?在NSArary中的字典或其他地方? – CRDave
谢谢@Wain我首先展示了城市,当他们中的一个选择了它时,显示了省份,然后放置了......我没有存储任何我只是显示数据的东西。请回到我身边。 –