Skip to content
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