Showing posts with label UIButton. Show all posts
Showing posts with label UIButton. Show all posts

Monday, March 7, 2011

How to add padding to a UIButton's title

I had a situation where I needed to add padding to a UIButton in an iOS app. I searched around and found some whonky solutions and workarounds, then I discovered there is simply titleEdgeInsets, available since iPhone SDK 2.0. used like so...