views:

175

answers:

0

Hi,

I posted this question on Three20 google group but did not get any response. So I thought I try this forum. I am using TTPhotoViewController to display photos. I am following sample code given in Three20 sample project: TTCatalog/PhotoTest1Controller.m. In my case some of the images are less than (320,480). The problem which I am facing is that when my image is 200*300 then TTPhotoViewController re-sizes it to full screen on load which distorts the image. I was wondering if there is a way to tell TTPhotoViewController to display image in its actual size and not to resize it.

The only thing which I have changed is viewDidLoad function in PhotoTest1Controller.m.

- (void)viewDidLoad { 
     self.photoSource = [[[MockPhotoSource alloc]
                 initWithType:MockPhotoSourceNormal
                 title:@"Plant Photos"
                 photos:[NSArray arrayWithObjects:[[[MockPhoto alloc]
                 initWithURL:@"http://test//test.jpg"
                 smallURL:@"http://test//test.jpg"
                 size:CGSizeMake(200, 300)
                 caption:@"This is a caption."]
                 autorelease],
                 nil]
                 photos2:nil] autorelease];

   }

I will appreciate your help.

Thanks