English 中文(简体)
MWPhotoBrowser 在Tab Bar Navigation App使用时,Nt t Rotate To上风
原标题:MWPhotoBrowser Doesn t Rotate To Landscape When Used in Tab Bar Navigation App

我正在开发我的一席。 它是与一家照相美术馆有联系的Buttons海关通航。

管理局利用MWPhotoBrowser图书馆从事美术馆的功能。

食堂完全可行,除非它只是为了改变景观而轮换。

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
NSLog(@"ShouldAutoRotate CALLED! - The FIELD");
return YES;iii

- (IBAction)showRenderings:(id)sender {
NSMutableArray *photos = [[NSMutableArray alloc] init];
MWPhoto *photo;

photo = [MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"field_rendering_1" ofType:@"jpg"]];
photo.caption = @"The Field Rendering 1";
[photos addObject:photo];

photo = [MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"field_rendering_2" ofType:@"jpg"]];
photo.caption = @"The Field Rendering 2";
[photos addObject:photo];

photo = [MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"field_rendering_3" ofType:@"jpg"]];
photo.caption = @"The Field Rendering 3";
[photos addObject:photo];

_photos = photos;

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

browser.displayActionButton = YES;
browser.wantsFullScreenLayout = YES;
[browser setInitialPageIndex:0];

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

iii

我在我的观点主计长和MWPhotoBrowser核对了所有<代码>-(BOOL)shouldAutorotate ToInterfaceOrientation:UIface InterOrientation。 他们都返回了YES。

为什么MWPhotoBrowser的拖车轮到地貌方向?

问题回答

When you use navigation controller for multiple orientations in that case you need to create subclass of UINavigationController then make appropriate code for orientations support in that subclass then use it in your application. here some example code so you can take a look..

作为对你问题的评论,我也存在同样的问题。

My problem was that I was using a Tabbar. The secret with Tabbar and rotation is that all viewcontrollers in the tabbar must support landscape mode. Do this by returning YES in this method:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

Reference: Why won t my UITableView rotate?

在纠正之后,与我一样工作!





相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签