在Xcode 6中是否有自动生成init函数的方法?
以下是一个更好理解的示例:
我有这些属性:
var name: String
var location: String
var date : NSDate
var host: String
var description: String
我希望自动生成这个初始化函数:
init (name: String, location: String, date: NSDate, host: String, description: String, eventReceived: NSDate) {
self.name = name;
self.location = location
self.date = date
self.host = host
self.description = description
}