//原图大小 90x60
UIImage *image = [UIImage imageNamed:@"AlbumTriangleB.png"];
UIImageView *iv = [[UIImageView alloc] initWithFrame:CGRectMake(20, 30, 90, 60)];
iv.image = image;
iv.image = [iv.image stretchableImageWithLeftCapWidth:50 topCapHeight:6];
[self.view addSubview:iv];
[iv release];
iv.frame = CGRectMake(20, 30, 280, 60);stretchableImageWithLeftCapWidth
最新推荐文章于 2013-11-08 18:19:20 发布
本文介绍如何使用 iOS 中的 UIImageView 对图片进行拉伸,包括设置图片、定义拉伸区域及调整视图大小等步骤。
17

被折叠的 条评论
为什么被折叠?



