我定义了一个名为 SexType 的枚举,并希望使用如下:
public class People {
//@Property("copy, nonatomic") protected String location;
// @Property("copy, nonatomic") protected SexType sex;
public String name;
public SexType sex;
public People(String name){
this.name = name;
}
public String say(String text){
return this.name + " say:" + text;
}
public void setName(String name){
this.name = name;
}
}
它在 java 端运行正常,但在转换为 objC 时失败,错误是“SexType 无法解析为类型”。谁知道原因?
谢谢