摘要:
Button setImage设置的图片默认是会拉伸缩放的,如果我想要Aspect Fit的效果,要如何做呢?一开始我想到了用contentMode属性,很可惜不起作用。后来我发现button有一个imageView属性,设置它的contentMode就OK了。代码如下:UIButton *butt... 阅读全文
posted @ 2014-07-28 19:33
糊涂人
阅读(1073)
评论(0)
推荐(0)
摘要:
UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(50, 50, 150, 50)]; [button setTitle:@"HHH" forState:UIControlStateNormal]; [button s... 阅读全文
posted @ 2014-07-28 12:23
糊涂人
阅读(709)
评论(0)
推荐(0)
摘要:
UIImage *yuyinImage = [UIImage imageNamed:@"yuyin.png"]; [soundButton setImage:yuyinImage forState:UIControlStateNormal]; [soundButton setImage... 阅读全文
posted @ 2014-07-28 12:20
糊涂人
阅读(1351)
评论(0)
推荐(0)
摘要:
//@mg:masksToBounds必须为NO否者阴影没有效果// cell.layer.masksToBounds = NO; cell.layer.contentsScale = [UIScreen mainScreen].scale; cell.layer.shad... 阅读全文
posted @ 2014-07-28 09:59
糊涂人
阅读(8702)
评论(0)
推荐(0)
摘要:
总结于 IOS Tuturial 中 ARC两章,详细在dropbox pdf 文档。Toll-Free Bridging当你在Objective-C和Core Foundation对象之间进行转换时,就需要使用Bridge cast。今天的多数应用很少需要使用Core Foundation,大多数... 阅读全文
posted @ 2014-07-28 09:15
糊涂人
阅读(302)
评论(0)
推荐(0)

浙公网安备 33010602011771号