mwaterfall/MWPhotoBrowser — Issue #31: Only show the first photo when add as subview
Author: popomanel
Created: 2012-02-23 15:24:12+00:00
State: open

I've created the MWPhotoBrowser object in my viewcontroller as a subview from my self.view:

For 1 to 3
{
[photos addObject:[MWPhoto photoWithURL:[NSURL URLWithString:@"http://farm4.static.flickr.com/3590/3329114220_5fbc5bc92b_b.jpg"]]];
}

self.photos = photos;

MWPhotoBrowser *browser = [[MWPhotoBrowser alloc] initWithDelegate:self];

browser.displayActionButton = NO;
browser.wantsFullScreenLayout = NO;

browser.wantsFullScreenLayout = FALSE;

[self.view addSubview:browser.view];
[self.view bringSubviewToFront:browser.view];

and, so, only show me the first image, but the scroller works fine for the three images. However if I define the MWPhotoBrowser object so:

[self.navigationController pushViewController:browser animated:YES];

The browser show me correctly the three images.

And idea how to fix it with the first method?

Sorry for my english and congratulations for this project. Thanks a lot