Quick iOS distinction between: and ()
the first example var img: UIImageView
creates a WILL variable of type UIImageView as soon as something is assigned to it. This line itself does not initialize or create a new instance and does not bind to anything.
the second example actually creates a new instance of UIImageView assigned to a variable called img. It deduces from the create UIImageView instance that it will be a variable of type UIImageView so no need to inject it, its redundant
source to share
The first is the declaration of a variable and there you specify the type of the variable, not the value.
The second line sets up a new instance of the class.
Since swift is strong typed everything has to be of type, so if you want to store something in var you need to set the var type first, so the first line to the second one is a classic instance of variables.
source to share