Swift denotes an immutable variable with let .
I do not understand why you are changing your properties. For example:
let lbl = UILabel() lbl.textAlignment = .Right()
Why can you change textAlignment ? Due to the property mutation, didn’t we also mutate the lbl variable, which should have been constant?
immutability swift
Jason renaldo
source share