简体   繁体   English

在iOS中缩放Web图像

[英]Scale a Web Image in iOS

I've managed to set my app to download an image from the web into it but the image is getting cropped. 我设法将我的应用程序设置为从网络下载图像,但是图像被裁剪了。 Does anyone know of a way to scale it down on-the-fly? 有人知道一种快速缩小规模的方法吗?

Paste your code so we can help you, paste the viewController.h and viewController.m at a minimum. 粘贴您的代码,以便我们可以为您提供帮助,至少粘贴viewController.h和viewController.m。

Or take a working model from a tutorial site and modify it for your needs. 或者从教程站点获取工作模型,然后根据需要进行修改。 Try this example I cooked up and see if it will help you http://iossentials.com/2012/04/29/building-an-ios-app-to-load-an-image-from-internet-and-resize-it-using-uiimage/ 尝试这个我煮熟的示例,看看它是否对您有帮助http://iossentials.com/2012/04/29/building-an-ios-app-to-load-an-image-from-internet-and-resize -使用uiimage /

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM