iPhone UIButton – image position

作者: shaneZhang 分类: ios技术 发布时间: 2015-05-04 09:36

I want to move the position of the image and the titleLabel in the UIButton

see these code

[gradeButton sizeToFit];
gradeButton.titleEdgeInsets = UIEdgeInsetsMake(0, -gradeButton.imageView.frame.size.width, 0, gradeButton.imageView.frame.size.width);
gradeButton.imageEdgeInsets = UIEdgeInsetsMake(0, gradeButton.titleLabel.frame.size.width, 0, -gradeButton.titleLabel.frame.size.width);

本页面支持AMP友好显示:iPhone UIButton – image position

如果觉得我的文章对您有用,请随意打赏。如果有其他问题请联系博主QQ(909491009)或者下方留言!

发表评论

电子邮件地址不会被公开。 必填项已用*标注