OAuth2App
OAuth2App copied to clipboard
IBOutlet improvement
Hi,
I am thinking of adding your OAuth2 to my app so I was doing a little code reading. Just wanted to give you a little feedback on IBOutlets.
The normal style to use IBOutlet in swift code, as also adviced by Apple is to have them as weak vars and with an implicit unwrapped optional.
So instead of writing: @IBOutlet var pasteButton: NSButton?
You should do: @IBOutlet weak var pasteButton: NSButton!
You know that they will be connected after loading the view, so you can be safe to implicitly unwrap them. This makes the code a little easier.
BTW: did you grow up in Zurich or did you just spend some time there?
Yes, that would be better indeed! And while I'm Swiss I'm not originally from Zurich, I worked there for a while.