Skip to content

[iOS 7.0 bug] offset at the bottom (fixed) #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions ASDepthModal/ASDepthModalViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -143,20 +143,24 @@ - (void)presentView:(UIView *)view withBackgroundColor:(UIColor *)color options:
self.rootViewController.view.layer.cornerRadius = ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad?kDefaultiPadCornerRadius:kDefaultiPhoneCornerRadius);
// Take care of the status bar only if the frame is full screen, which depends on the View controller type.
// For example, frame is full screen with UINavigationController, but not with basic UIViewController.
if(UIInterfaceOrientationIsPortrait(self.rootViewController.interfaceOrientation))
if ([self.rootViewController isKindOfClass:[UINavigationController class]])
{
if(frame.size.height == window.bounds.size.height)
if(UIInterfaceOrientationIsPortrait(self.rootViewController.interfaceOrientation))
{
frame.size.height -= [UIApplication sharedApplication].statusBarFrame.size.height;
if(frame.size.height == window.bounds.size.height)
{
frame.size.height -= [UIApplication sharedApplication].statusBarFrame.size.height;
}
}
}
else
{
if(frame.size.width == window.bounds.size.width)
else
{
frame.size.width -= [UIApplication sharedApplication].statusBarFrame.size.width;
if(frame.size.width == window.bounds.size.width)
{
frame.size.width -= [UIApplication sharedApplication].statusBarFrame.size.width;
}
}
}

}
self.view.transform = self.rootViewController.view.transform;
self.rootViewController.view.transform = CGAffineTransformIdentity;
Expand Down