int gData0; float gData1; NSString *gData2; NSData *reader = [NSData dataWithContentsOfFile:path]; gData2 = [[NSString alloc] initWithData:[reader subdataWithRange:NSMakeRange(0, [temp length])] encoding:NSUTF8StringEncoding]; [reader getBytes:&gData0 range:NSMakeRange([temp length], sizeof(gData0))]; [reader getBytes:&gData2 range:NSMakeRange([temp length] + sizeof(gData0), sizeof(gData1))]; NSLog(@”gData0:%@ gData1:%i gData2:%f”, gData0, gData1, gData2);
by: 发表于:2017-10-25 10:45:04 顶(0) | 踩(0) 回复
??
回复评论