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
25 changes: 17 additions & 8 deletions Classes/PXAlertView.m
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,23 @@ - (void)keyboardWillHide:(NSNotification*)notification

- (CGRect)frameForOrientation
{
UIWindow *window = [[UIApplication sharedApplication].windows count] > 0 ? [[UIApplication sharedApplication].windows objectAtIndex:0] : nil;
if (!window)
window = [UIApplication sharedApplication].keyWindow;
if([[window subviews] count] > 0)
{
return [[[window subviews] objectAtIndex:0] bounds];
}
return [[self windowWithLevel:UIWindowLevelNormal] bounds];

#ifdef __IPHONE_8_0
return [UIScreen mainScreen].bounds;
#else

UIWindow *window = [[UIApplication sharedApplication].windows count] > 0 ? [[UIApplication sharedApplication].windows objectAtIndex:0] : nil;
if (!window)
window = [UIApplication sharedApplication].keyWindow;
if([[window subviews] count] > 0)
{
return [[[window subviews] objectAtIndex:0] bounds];
}
return [[self windowWithLevel:UIWindowLevelNormal] bounds];

#endif


}

- (CGRect)adjustLabelFrameHeight:(UILabel *)label
Expand Down