Tableview - NSMutableDictionary - currow 获取整数值? iPhone
如何将 ID 的值转换为整数。见下文:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSMutableDictionary *curRow = [myData objectAtIndex:indexPath.row];
NSLog(@"Cell Click %@ %@ - %@",[curRow objectForKey:@"Name"], [curRow objectForKey:@"ID"], [curRow objectForKey:@"DOB"]);
UserID= [curRow [objectForKey:@"ID" intValue] ; <<<< This doesnt work?
How do I get the value of the ID into an Integer. See below:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSMutableDictionary *curRow = [myData objectAtIndex:indexPath.row];
NSLog(@"Cell Click %@ %@ - %@",[curRow objectForKey:@"Name"], [curRow objectForKey:@"ID"], [curRow objectForKey:@"DOB"]);
UserID= [curRow [objectForKey:@"ID" intValue] ; <<<< This doesnt work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果 ID 在字典中,您可以使用字符串
In case the ID is in the dictionary a string you could use
你的语法有错误。
使用下面
You have syntax wrong.
use below