用于char []

时间:2015-12-13 10:57:33

标签: swift

在我的.h文件中,typedef看起来像 - > [我正在使用桥接头来导入Swift中的.h文件]

typedef struct {
  char xyzID[16];
} XYZ;

现在在ObjectiveC中将xyzID[]转换为NSString,它看起来像 - >

NSString *xid=[NSString stringWithUTF8String:XYZ.xyzID];

我试过但有时错误就像是“无法为类型为'的参数列表调用初始化器(Int8,Int8,Int8,Int8,Int8,Int8,Int8,Int8,Int8,Int8,Int8,Int8, Int8,Int8,Int8,Int8)'“

那么我怎样才能在Swift中做同样的事情(将xyzID[]转换为NSString)?

0 个答案:

没有答案