Why do we need connections in XIB file?


#1

Hi,
Can anyone please tell me why we need to manually create the connections in the interface builder? Why doesn’t Xcode just create the connections automatically? When we write the following in QuizViewController.h, we are already saying that we want questionField to point to an instance of UILabel:

IBOutlet UILabel *questionField;

Why do we still have to go to the XIB file and create the connection manually?


#2

You may have many UILabel’s on the view, so how will the compiler know which one you are referring to?


#3

Good point.

Also I think manual is better - you can keep track of what’s happening in your application.