uibutton
amy376X
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
重写drawrect,带下划线的button
-(void)drawRect:(CGRect)rect{ CGFloatR =0.0f,G =0.0f,B =0.0f;CGContextRefctx=UIGraphicsGetCurrentContext();CGSizefontSize=[self.currentTitlesizeWithFont:self原创 2013-07-17 20:53:54 · 909 阅读 · 0 评论 -
TableView,加载更多
把tableveiw 的footerview 在footer上添加加载更多 的button UIButton *btn=[UIButtonbuttonWithType:UIButtonTypeCustom]; [btnsetFrame:CGRectMake(0, 0, 320, 40)]; [btn setTitle:@"更多精彩" forS原创 2013-07-20 17:53:14 · 972 阅读 · 1 评论 -
让cell 在点击的时候,子视图不高亮显示
今天遇到这样的需求,让cell 在点击的时候 附加在cell上面的button不要高亮显示,在网上查了一下,解决这种问题的方法有这么几种1.- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated{ [super setHighlighted:highlighted animated:animated];原创 2013-11-20 15:01:18 · 2567 阅读 · 0 评论 -
点击效果,给 UIButton UIView UIScrollView 加一个灰色的点击效果
如果要给button 或者是label 增加点击效果,那么可以这么做 btnCurrentHot.frame=CGRectMake(60+sizeWeight+offSet,2,20, 26);//指定button的frame btnCurrentHot.titleLabel.font=[UIFontboldSystemFontOfSiz原创 2013-10-17 10:31:24 · 3559 阅读 · 0 评论 -
从view 获取image
-(UIImage *)getImageFromView:(UIView *)view{ UIGraphicsBeginImageContext(view.bounds.size); [view.layerrenderInContext:UIGraphicsGetCurrentContext()]; UIImage *image =UIGraphi原创 2014-11-11 17:24:50 · 678 阅读 · 0 评论 -
UIButton 的图片自动拉伸
button.contentHorizontalAlignment =UIControlContentHorizontalAlignmentFill; button.contentVerticalAlignment =UIControlContentVerticalAlignmentFill;button 的图片拉伸有很多种方法,个人感觉最简单的 要数上面的那个系统提供的方原创 2015-08-12 14:00:13 · 1023 阅读 · 0 评论
分享