Open hitendradeveloper opened 9 years ago
yes, Same as this(https://github.com/mariohahn/MHVideoPhotoGallery/issues/106) link. But no one given solution, that's why I have posted new issue.
Same problems happen to me. You might consider force the viewcontroller back to portrait mode when pressing share button...
-(void)sharePressed{
// Force MHGalleryController to go back to protrait because its shareview has problems in landscape mode
// http://stackoverflow.com/questions/26357162/how-to-force-view-controller-orientation-in-ios-8
NSNumber *value = [NSNumber numberWithInt:UIInterfaceOrientationPortrait];
[[UIDevice currentDevice] setValue:value forKey:@"orientation"];
Thanks for the Answer. Appreciate your help :+1:
You are welcome :-)
I am facing an issue while holding device in LandscapOrientation.
To Replicate this issue : Run the example project, select any media then hold the device in Landscape mode, press share button, all the media will be overlapper on upper part of the screen.
I have tried to forcefully call the below code at the end of the viewLoad() of MHShareViewController.m but did not successed.
UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation]; switch (orientation) { case 1: case 2: NSLog(@"portrait"); // your code for portrait... break;
// self.tableViewShare.frame = CGRectMake(0, self.view.frame.size.height, self.view.frame.size.width, 240); // self.toolbar.frame = CGRectMake(0, self.view.frame.size.height, self.view.frame.size.width,240); // self.collectionView.frame = self.view.bounds; // self.navigationItem.rightBarButtonItem = [self nextBarButtonItem]; // [self.collectionView.collectionViewLayout invalidateLayout];
// double delayInSeconds = 1.0; // dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); // dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ // [self willAnimateRotationToInterfaceOrientation:2 duration:0.25]; // [self didRotateFromInterfaceOrientation:2]; // });
Please help me to solve out this issue. Thanks for reading this.