我有一个使用objective-c 的固定肖像应用程序,我有一个按钮单击以打开MWPhotoBrowser 以浏览图像。现在它在纵向模式下运行良好,但我想为纵向和横向模式制作 MWPhotoBrowser 以旋转手机。我该怎么做,这是我的代码:
- (void) prepareForPhotoAlbum:(NSArray*)photoObjs {
self.photoURLArrays = [[NSMutableArray alloc]init];
for(int i=0 ; i<photoObjs.count ; i++){
NSDictionary* dictOfImageObj = photoObjs[i];
[self.photoURLArrays addObject:[MWPhoto photoWithURL: [NSURL URLWithString:[NSString stringWithFormat:@"%@/%@",ServerTopicImageURL,dictOfImageObj[@"filename"]]]]];
}
MWPhotoBrowser *browser = [[MWPhotoBrowser alloc] initWithDelegate:self];
// Set options
browser.displayActionButton = YES;
browser.displayNavArrows = NO;
browser.zoomPhotosToFill = YES;
[browser setCurrentPhotoIndex:0];
browser.wantsFullScreenLayout = YES;
[self.navigationController pushViewController:browser animated:YES];
[browser showPreviousPhotoAnimated:YES];
[browser showNextPhotoAnimated:YES];
}