-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Could we make the instance variable non-optional? Example:
lazy var someSize:CGSize = {
let x:CGFloat = 0
let y:CGFloat = 0
let size = CGSize(x,y,0,0)
return size
}()
//Now we can use someSize with out force unwrap 👌
//What happens is that the var isn't created until something asks for it.
print(someSize.x)Metadata
Metadata
Assignees
Labels
No labels