Here are the basic steps that will simplify the situation, in your case it will need to be repeated for each viewController.
Create one outlet for all of your buttons:
@IBOutlet var myButtons: [UIButton]!
() . " Outlet", connections inspector ( ββ). , myButtons.
for:
for button in self.myButtons {
button.backgroundColor = UIColor.clearColor()
button.layer.borderWidth = 1
button.layer.borderColor = UIColor.greenColor().CGColor
}
, . , , , , : Objective-C, Swift.
. , buttonStyle viewController for: [buttonStyle styleButton:button]. styleButton ( ).
by @zisoft: UIViewController Swift, !.