Content inset not working Storyboard Xcode8 Content inset not working Storyboard Xcode8 xcode xcode

Content inset not working Storyboard Xcode8


In Xcode 8 the button content/title/image insets have moved to the Size Inspector tab:

Which seems quite logical by the way! 😀


I had this same problem and solved it with image insets and the Horizontal/Vertical Alignment controls. My problem was that I had the wrong alignment controls selected. Once I changed it my insets worked properly for what I was trying to accomplish.

I created a button with an image and the I wanted to shrink the image down to not fill up the entire button So I set the image to the UIButton image property in storyboard and then set the image insets to my liking

enter image description here

But it did not center my image with the inset of 5 on each side. The image would look like this and that was not what I wanted

enter image description here

If you change the horizontal/vertical alignment controls I was able to the button image to my desired look I wanted

enter image description here


Its weird,but it actually works until you add collectionview or tableview in your Viewcontroller. Try setting the inset without having the scrollview or tableview in your view controller