如何将int型数据放到字典里

    NSString * str =@"0";
    int channelid =[str intValue];
    NSNumber *num =[NSNumber numberWithInt:channelid];
    [dic setObject:num forKey:@"channelid"];

你可能感兴趣的:(ios)