码迷,mamicode.com
首页 > 移动开发 > 详细

iOS,作死集锦

时间:2015-01-10 12:28:44      阅读:157      评论:0      收藏:0      [点我收藏+]

标签:

自定义button,重写

- (CGRect)titleRectForContentRect:(CGRect)contentRect

- (CGRect)imageRectForContentRect:(CGRect)contentRect

打印button.imageView和button.titleLabel的frame正常,但就是不显示图片,设置button.imageView背景色也没用。原因是我重写了

- (void)setImage:(UIImage *)image forState:(UIControlState)state

并且没有调用父类方法,哈哈哈,cnm!

iOS,作死集锦

标签:

原文地址:http://www.cnblogs.com/congliang/p/4214672.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!