iOS 的控件,只看到
UIButton 可以设置Padding/Insets,即按钮上文字或图片与按钮边界的间隙,对与 CSS 来说叫做Padding,在 iOS 中叫做 Insets,UIButton 设置 Insets 相应的属性如下:
Configuring Edge Insets
它们接受的属性类型是:UIEdgeInsets,由函数 UIEdgeInsetsMake ( CGFloat top, CGFloatleft, CGFloat bottom, CGFloat right);
在
印像中,Swing
办法当然还是有的,自定义相应自己的控件了,比如InsetsLabel
来源:http://blog.sina.com.cn/s/blog_7c8dc2d50101l1h2.html