Passing UITableView's with parsing XML
- by Luai Kalkatawi
I am parsing XML and I select from the UITablevView but I have an issue that how I am going to change the link on each selection?
For example;
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
How can I change the d= and il= and ilce= value on each select on the UITableView?
I have write this but couldn't go further.
-(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;
}
Thanks from now.