0

I have a xib file with a UIImage view and 3 UIButtons. Im having issues with with xcode's auto-constraints. when I run my app in the iphone(retina 4-inch) simulator my buttons are set too high on the screen. I have pinned two of the buttons together to have vertical spacing and that has helped a little but not enough.

How do I set the buttons correctly in the xib file or how can I override the xib's constraints and set them programmatically?

Kara
  • 6,115
  • 16
  • 50
  • 57
bf613
  • 3
  • 1
  • Constraints are really hard to use in Xcode 4. Supposedly it has been fixed in Xcode 5... but until then I suggest not using them at all. http://stackoverflow.com/questions/9566789/remove-autolayout-constraints-in-interface-builder – Abhi Beckert Jul 01 '13 at 00:30
  • It's not that depressing. Constraints are a brand new feature added to iOS 6, and they didn't quite get it right the first time - hopefully iOS 7 will fix things (I haven't tried yet). That's just what you get by trying to use bleeding edge features in Xcode - the old stuff (autosize masks) has been around for decades and it works perfectly. – Abhi Beckert Jul 01 '13 at 00:47
  • Here is a tutorial about auto layout. Hope it helps you. http://www.raywenderlich.com/20881/beginning-auto-layout-part-1-of-2 – yibuyiqu Jul 01 '13 at 00:50

0 Answers0