ianb821 / IBActionSheet

Customizable iOS 7 style UIActionSheet
MIT License
307 stars 65 forks source link

iOS 8 - Presenting IBActionSheet from landscape mode causes window to be half the screen #21

Closed PhillipApps closed 9 years ago

PhillipApps commented 10 years ago

I was successfully using this amazing framework until iOS 8 came out. Presenting the actionSheet while in landscape mode causes the actionSheet to be offscreen and the background to be cut in half.

So, half window contains the background, half the view.

ianb821 commented 10 years ago

Could you provide the basic setup and presentation code that you're using so that I can reproduce it on my end and see what the issue is?

PhillipApps commented 10 years ago

Sure, here you go

IBActionSheet* actionSheet = [[IBActionSheet alloc] initWithTitle:[NSString stringWithFormat:@"%@.pdf",self.tipNameString]
                                                     delegate:self
                                            cancelButtonTitle:NSLocalizedString(@"Cancel",nil)
                                       destructiveButtonTitle:nil
                                            otherButtonTitles:NSLocalizedString(@"Preview_PDF", nil), NSLocalizedString(@"Share_PDF_Via_Email", nil), NSLocalizedString(@"Print_PDF", nil), nil];
[actionSheet setTag:10];
[actionSheet setTitleTextColor:[UIColor blackColor]];
[actionSheet setTitleFont:[UIFont fontWithName: boldFont size:18.0]];
[actionSheet setFont:[UIFont fontWithName:primaryFont size:18.0]];
[actionSheet setFont:[UIFont fontWithName: boldFont size:18.0] forButtonAtIndex:3];
[actionSheet setButtonTextColor:[UIColor redColor] forButtonAtIndex:3];

[actionSheet showInView:self.tabBarController.view]; `
rahulinaction commented 9 years ago

Even i face the same problem.Mine has a navigation bar so [actionSheet showInView:self.navigationController.view]; This happens when you build a app using ios8 sdk .It perhaps is because of changes in size class on rotation in ios8.Even the demo has this problem

silvaricPresent commented 9 years ago

To exceed that bug I call rotateToCurrentOrientation after showInView But I have another problem... When the actionSheet is dismissing, the animation (disappearing flow) is acting like Portrait, in other words, the actionSheet is going down to the left instead of continuing in the center

ianb821 commented 9 years ago

This should be resolved now with the latest PR.