标签:style blog io color os sp div log ad
UIImageView *svRect; UIImage *backgroundImage = [UIImage imageNamed:@"bg.png"]; backgroundImage = [backgroundImage resizableImageWithCapInsets:UIEdgeInsetsMake(15, 15, 15,15)]; //这句就是最关键的了 svRect = [[UIImageView alloc] initWithImage:backgroundImage]; [svRect setFrame:CGRectMake(50, 50, 200, 200)]; [self.view addSubview: svRect];
防止图片放大变形
标签:style blog io color os sp div log ad
原文地址:http://www.cnblogs.com/joshuageng/p/4123312.html