Swift3初始化还是要先子类
class User: Avatar {
var level: Int
init(name: String, level: Int) {
self.level = level
super.init(name: name)
}
}
class User: Avatar {
var level: Int
init(name: String, level: Int) {
self.level = level
super.init(name: name)
}
}
2016-12-27
let commaIndex = coor.range(of: ",")!.lowerBound
let firstElement = coor.substring(to: commaIndex)
let secondElement = coor.substring(from: coor.index(after: commaIndex))
latitude = Double(firstElement)!
longitude = Double(secondElement)!
let firstElement = coor.substring(to: commaIndex)
let secondElement = coor.substring(from: coor.index(after: commaIndex))
latitude = Double(firstElement)!
longitude = Double(secondElement)!
2016-12-23