I haven't found a discussion.
Neither have I.
I guess, the most preferred way by Apple would be using Interface Builder:
class SomeVC: UIViewController {
@IBOutlet private weak var someLabel: UILabel!
@IBOutlet private weak var someSwitch: UISwitch!
override func viewDidLoad() {
super.viewDidLoad()
}
}
If you do not prefer Apple's way, unless you have some reason to be forced to use 1️⃣ or 3️⃣, I would use 2️⃣.
For only one reason that it can represent someLabel and someSwitch may not be replaced.
But, as already noted, I have never found this sort of discussion in the dev forums, so not sure my opinion would be sort of leading or not.
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: