How do I get the value of the ID into an Integer. See below:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSMutableDictionary *curRow = [myData o开发者_Go百科bjectAtIndex:indexPath.row];
NSLog(@"Cell Click %@ %@ - %@",[curRow objectForKey:@"Name"], [curRow objectForKey:@"ID"], [curRow objectForKey:@"DOB"]);
UserID= [curRow [objectForKey:@"ID" intValue] ; <<<< This doesnt work?
In case the ID is in the dictionary a string you could use
UserID = [[curRow objectForKey:@"ID"] intValue];
You have syntax wrong.
UserID= [curRow [objectForKey:@"ID" intValue] ; <<<< This doesnt work?
use below
UserID= [[curRow objectForKey:@"ID"] intValue] ; <<<< This will work?
精彩评论