如何在Objective-C中创建下一个类型 - [key : Object]
?
我在Swift中有这样的地图,我想将它(images
)发送到Objective-C函数(在.mm)文件中,但是如何在Objective-C中声明这样的类型参数?什么是平等的?
private var images : [Int : UIImage] = [:]
override func viewDidLoad() {
super.viewDidLoad()
images = [
124: UIImage(named: “img1”),
12: UIImage(named: “img2”)
]
}
答案 0 :(得分:2)
在标题中,您必须声明:
public class ApplicantSkillsVM{
public int Id {get;set;}
public int? skillId{get;set;} //updated property
public Skill skill{get;set;}
}
然后在.m文件中执行如下所述:
@property (nonatomic, retain) NSDictionary *originalValues;