您的位置:首页 > 其它

让图片自动适应框的大小

2013-04-03 14:31 190 查看
NSString *imagePath = [[NSBundlemainBundle] pathForResource:@”test” ofType:@”png”];

UIImage *image =[[UIImage alloc]initWithContentsOfFile:imagePath];

UIImage *newImage = [imagetransformWidth:80.0f height:240.0f];

[image release];

UIImageView *imageView = [[UIImageViewalloc] initWithImage:newImage];

[self.view addSubView:imageView];

[imageView release];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: