jessesquires / BButton

Twitter Bootstrap buttons for iOS
http://cocoadocs.org/docsets/BButton/
Other
712 stars 82 forks source link

Change size / frame #5

Closed pdiegmann closed 11 years ago

pdiegmann commented 11 years ago

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: ohne-titel 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!

pdiegmann commented 11 years ago

Okay, when setting the Insets inside the Storyboard it works!

jessesquires commented 11 years ago

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)

pdiegmann commented 11 years ago

Hey @jessesquires,

thank you so much for this explanation! Already guessed something like that but now it's clear! Thanks again!