开发者

iPhone - TTPhotoViewController crops images

开发者 https://www.devze.com 2022-12-16 10:05 出处:网络
I am using a TTPhotoViewController subclass in my project to display a series of images downloaded from the web. Some of the images which are not the same aspect ratio as the iPhone\'s screen are crop

I am using a TTPhotoViewController subclass in my project to display a series of images downloaded from the web. Some of the images which are not the same aspect ratio as the iPhone's screen are cropped out.

I tested this with square images of 400x400 px and all such images seem to be cropped out towards the edges. I cannot zoom out and view the entire image either.

Can someon开发者_JS百科e please suggest a solution for this. Thanks.


Did you set up the CGSize of the image to be 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]

If the CGSize is properly set, you should be able to zoom in and out of the entire image. I have done this using Picasa and Flickr with no problems on zooming.


The answer's here - http://groups.google.com/group/three20/browse_thread/thread/e4f0b6dce137aaac/b6ce75422641d34d?lnk=raot

0

精彩评论

暂无评论...
验证码 换一张
取 消