I have a UIView displaying an NSAttributedString. It's set up to resize to fit its contents.
I'd like to create some padding between the text and the view, however it's not quite working. If I do this...
view.textContainerInset = UIEdgeInsetsMake(0, 15, 0, 15);
... then the left and right edges are padded, and the top and bottom have no space. This is correct. I then add in a top inset:
view.textContainerInset = UIEdgeInsetsMake(15, 15, 0, 15);
Now the top has 15 points padding, but suddenly the bottom is padded a little too (by about 10 points).
If I then add 15 points bottom padding the bottom becomes too large and the spacing isn't the same all the way round. Instead, I have to fudge it:
view.textContainerInset = UIEdgeInsetsMake(15, 15, 5, 15);
Is this an iOS 7 bug or am I misunderstanding something? I'm loathed to fudge the bottom value without understanding what's going on.