XML を解析していて、UITablevView から選択していますが、各選択のリンクをどのように変更するかという問題がありますか?
例えば;
www.example.com/test12.php?d=0
www.example.com/test12.php?d=1&il=イスタンブール
www.example.com/test12.php?d=2&il=istanbul&ilce=kadikoy
UITableView の選択ごとに d= と il= と ilce= の値を変更するにはどうすればよいですか?
私はこれを書きましたが、それ以上進むことができませんでした。
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *selectedCell = [tableView cellForRowAtIndexPath:indexPath];
NSString *cellText = selectedCell.textLabel.text;
NSString *linkID = @"http://example/test12.php?d=@%&il=@%";
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;
}
今からありがとう。