码迷,mamicode.com
首页 > 其他好文 > 详细

自定义UIBtton类后,在@implementation重写方法的作用

时间:2015-07-08 00:22:21      阅读:146      评论:0      收藏:0      [点我收藏+]

标签:

 1 /**
 2  *  用来自定义imageView的尺寸和位置 (contentRect等于按钮的bounds)
 3  */
 4 - (CGRect)imageRectForContentRect:(CGRect)contentRect {
 5     return CGRectMake((contentRect.size.width - 40) * 0.5, 23, 40, 46);
 6 }
 7 
 8 /**
 9  *  重写此方法后(不写代码),点击后就没有highlight的效果
10  */
11 -(void)setHighlighted:(BOOL)highlighted{
12     
13 }

 

自定义UIBtton类后,在@implementation重写方法的作用

标签:

原文地址:http://www.cnblogs.com/neilHoIOS/p/4628820.html

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