Stored properties in Swift
Forums:
class Point {
var x: Int = 0
var y: Int = 0
}
let point = Point()
//x and y is 0 (before assigning)
point.x = 3
point.y = 7
- Log in to post comments
class Point {
var x: Int = 0
var y: Int = 0
}
let point = Point()
//x and y is 0 (before assigning)
point.x = 3
point.y = 7