UIViewPadding
UIView的子类控件的Padding
image
功能
- UILabel的padding
- UITextField的padding
- UIButton/UIScrollView的padding的设置
- 适用于Storyboard
用法
1.Storyboard
2.代码创建
let sslabel = SSLabelPadding()
sslabel.paddingLeft = 10
sslabel.paddingLeft = 10
sslabel.paddingLeft = 10
sslabel.paddingLeft = 10
let ssTextField = SSTextFieldPadding()
ssTextField.insetX = 10
ssTextField.insetY = 10
ssButton.contentEdgeInsets = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)
//UIScrollView类的控件
ssTextView.contentInset = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)