Storyboard: Assign IBOutlet for Multiple Objects to Dimension Class
Since Apple introduced Size Classes
, I thought the chore might disappear. Going further, I realized that it was not so easy, as convenient as it seemed.
My actual goals are slightly different in that I created a test project to illustrate:
I have one storyboard
, one IBOutlet
for UIButton
and decided that this button looks different for differentSize Classes
For this, I created two buttons:
- IPhone Button (installed for wChC)
- IPad button (installed for wRhR)
Problem :
every time i try to connect any of these buttons to IBOutlet button
- it always works for one button and removes the connection to the other.
I want these two buttons to be actually one button, but with a different layout for iPhone, iPad. Previously, having two storyboards was not a problem.
How do I do this within a single storyboard?
source to share