Closed pdiegmann closed 11 years ago
Okay, when setting the Insets inside the Storyboard it works!
Hey @pdiegmann — glad you got it figured out!
Just a few helpful words, if you're using storyboards (and auto-layout), where you put layout code matters. If you were trying to adjust the frame in viewDidLoad:
or some init
method, that's not going to work. This should work, however, in viewDidLayoutSubviews
. Also, if you set your auto-layout constraints properly in interface builder, it should work. (pin height/width for the button)
Hey @jessesquires,
thank you so much for this explanation! Already guessed something like that but now it's clear! Thanks again!
Hi!
I'm currently trying to integrate BButton via Storyboards and encountered the 'issue' that the button is far too small (in height) and does not react to changes to the height:
CGRect frame = _btnLogin.frame; frame.size.height = 44.0f; _btnLogin.frame = frame;
Also EdgeInsets do not change a thing:
[_btnLogin setTitleEdgeInsets:UIEdgeInsetsMake(25.0f, 25.0f, 25.0f, 25.0f)];
What am I missing? Thanks in advance!