I\'ve got various views in my iPhone application that require padding e.g a custom UIButton with text aligned left, and a UILabel with a background color.
This may be a
CGRectInset is your friend. You can set negative 'insets' to create padding:
[self sizeToFit]; CGRect rect = self.frame; rect = CGRectInset( rect, -6.f, -5.f); // h inset, v inset self.frame = rect;