Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iPhone-TTPhotoViewController可裁剪图像_Iphone_Three20 - Fatal编程技术网

iPhone-TTPhotoViewController可裁剪图像

iPhone-TTPhotoViewController可裁剪图像,iphone,three20,Iphone,Three20,我在项目中使用TTPhotoViewController子类来显示从web下载的一系列图像。一些与iPhone屏幕宽高比不同的图像被裁剪掉 我用400x400像素的正方形图像进行了测试,所有这些图像似乎都是向边缘裁剪的。我也无法缩小并查看整个图像 有人能为这个问题提出一个解决方案吗。谢谢。您是否将图像的CGSize设置为400x400 [[[MockPhoto alloc] initWithURL:@"http://farm4.static.flickr.com/3099/31649

我在项目中使用TTPhotoViewController子类来显示从web下载的一系列图像。一些与iPhone屏幕宽高比不同的图像被裁剪掉

我用400x400像素的正方形图像进行了测试,所有这些图像似乎都是向边缘裁剪的。我也无法缩小并查看整个图像


有人能为这个问题提出一个解决方案吗。谢谢。

您是否将图像的CGSize设置为400x400

[[[MockPhoto alloc]
      initWithURL:@"http://farm4.static.flickr.com/3099/3164979221_6c0e583f7d.jpg?v=0"
      smallURL:@"http://farm4.static.flickr.com/3099/3164979221_6c0e583f7d_t.jpg"
      size:CGSizeMake(320, 480)] autorelease]

如果CGSize设置正确,您应该能够放大和缩小整个图像。我使用Picasa和Flickr完成了这项工作,在缩放方面没有问题。

答案在这里-

我尝试使用320x480。但是如果我想得到显示的照片的高度和宽度,我总是得到320x480(即使显示的照片要小得多)。我还需要使用显示的照片的实际大小。所以不能用这种方法。