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

iOS 实现安卓.9效果拉伸图片

时间:2020-05-19 22:29:49      阅读:60      评论:0      收藏:0      [点我收藏+]

标签:name   containe   tps   view   user   height   png   width   image   

实现效果
技术图片

代码如下:

UIImageView *iv = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Publish_contentView"]];
 iv.frame = CGRectMake(10, 100, iv.image.size.width, iv.image.size.height);
UIImage *iamge = [UIImage imageNamed:@"Publish_contentView"]; iamge = [iamge stretchableImageWithLeftCapWidth:0 topCapHeight:10];
UIImageView *iv2 = [[UIImageView alloc] initWithFrame:CGRectMake(200, 100, iamge.size.width, iamge.size.height+100)];
iv2.image = iamge;
[_container addSubview:iv];
[_container addSubview:iv2];

iOS 实现安卓.9效果拉伸图片

标签:name   containe   tps   view   user   height   png   width   image   

原文地址:https://www.cnblogs.com/lovemargin/p/12919763.html

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