标签: ios iphone user-interface autolayout
我有简单的标签,文字D,我使用sizeToFit,我的身高是21.5
但我看到填充大约2px
如何删除它?
我尝试layoutMargins = UIEdgeInsetsZero - 但没有效果
答案 0 :(得分:0)
您可能想尝试将UILabel子类化并覆盖drawTextInRect::
UILabel
drawTextInRect:
- (void)drawTextInRect:(CGRect)rect { [super drawTextInRect:UIEdgeInsetsInsetRect(rect, UIEdgeInsetsMake(0., 0., 0., 0.))]; }
答案 1 :(得分:0)
estTotal