I recently started learning iOS development and just loved using the interface builder of Xcode. It's so easy to add segues and outlets and "event handler" thingys (sorry I don't know what they are called).
However, I got confused when I add an outlet of a label or something and sees this gets added in the code
@IBOutlet var weak myLabel: UILabel!
I don't see any assignments to the variable! And when I use the variable, it is not nil
!
Back then when I was doing Windows Forms with C#, whenever I added something in the interface designer, some code is generated in a separate file to actually "add" the thing.
I know that storyboard files are just xml files. Whenever I do something to it, the xml changes. But I don't believe xml can do reflection to assign a value to my variable, can it?
So I deduced that there must be some code generated behind the scenes that reflected my code and assigns a value to the outlet variables. Where can I find this file? What exactly is added? Or is my guess wrong?