Skip to content

Commit

Permalink
Merge pull request #28 from fawkeswei/patch-1
Browse files Browse the repository at this point in the history
PTEDashboard to respect safe area insets
  • Loading branch information
rivera-ernesto authored Oct 29, 2019
2 parents 685aa2b + 2b7278a commit 6ad7fb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/PTEDashboard.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ + (PTEDashboard *)sharedDashboard
dispatch_once(&onceToken, ^
{
CGRect frame = UIScreen.mainScreen.bounds;
_sharedDashboard = [[self alloc] initWithFrame:frame];
_sharedDashboard = [[self alloc] initWithFrame:UIEdgeInsetsInsetRect(window.frame, window.safeAreaInsets)];
});
return _sharedDashboard;
}
Expand All @@ -51,7 +51,7 @@ - (instancetype)initWithFrame:(CGRect)frame
if (self)
{
self.windowLevel = UIWindowLevelStatusBar + 1;
_screenSize = [UIScreen mainScreen].bounds.size;
_screenSize = frame.size;

if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0"))
{
Expand Down

0 comments on commit 6ad7fb9

Please sign in to comment.