trying to get some data from a plist into the MWPhotoBrowser sample app.
Any ideas how to do it?
UIViewController *converterController = nil;
NSMutableArray *photos = [[NSMutableArray alloc] init];
converterController = [[MWPhotoBrowser alloc] initWithPhotos:photos];
converterController.hidesBottomBarWhenPushed = YES;
//here individual images can be added. However need to add images from a plist.
[photos addObject:[MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"image1" ofType:@"jpg"]]];
[photos addObject:[MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"image2" ofType:@"jpg"]]];
[photos addObject:[MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"image3" ofType:@"jpg"]]];
[photos addObject:[MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"image4" ofType:@"jpg"]]];
if (converterController) {
[self.navigationController pushViewController:converterController animated:YES];
[converterController release];
}
[photos release];
Can add objects individually as shown above, but not able to do it with a plist.
Can anyone share an idea?
thanks
w
ell i got this but it doesnt work.
crashes the app.
I must use the MWPhoto property.
Help anyone?
Maybe Michael Waterfall wants to look into this?
EDIT:
OK here is the working code (well it works ok so far)