In objective c you can declare IBOutlets in below mentioned manner:
IBOutlet UIButton *btn1, *btn2, *btn3;
And you can able to bind these butto
You have two options to get them in a single line.
The first is to use a Referencing Outlet Collection by defining this:
@IBOutlet var fields: Array<UITextField> = []
Then link your text fields to that. You can then access them as fields[0]
and fields[1]
respectively.
The other option is to define them in your file like this:
@IBOutlet weak var emailField: UITextField!
@IBOutlet weak var passwordField: UITextField!
Make your connections from Interface Builder, then edit the declarations to be in a single line like this:
@IBOutlet weak var emailField: UITextField!, passwordField: UITextField!
About you only options I'm afraid.