AssistoLab / KVNProgress

KVNProgress is a fully customizable progress HUD that can be full screen or not.
MIT License
1.24k stars 202 forks source link

Landscape not handled anymore #81

Closed kevin-hirsch closed 8 years ago

kevin-hirsch commented 8 years ago

The problem is that in landscape the KVNProgress does not display itself correctly:

bug

The problem comes from the commit Showing loader above keyboard (a741fea) I tested with the old code and it works perfectly:

- (void)addToView:(UIView *)superview
{
    UIWindow *currentWindow = [UIApplication sharedApplication].keyWindow;

    if (!currentWindow) {
        NSEnumerator *frontToBackWindows = [[[UIApplication sharedApplication] windows] reverseObjectEnumerator];

        for (UIWindow *window in frontToBackWindows) {
            if (window.windowLevel == UIWindowLevelNormal) {
                currentWindow = window;
                break;
            }
        }
    }

    if (self.superview != currentWindow) {
        [self addToView:currentWindow];
    }
}

To investigate...

animaonline commented 8 years ago

Hi, any updates on this one?

aftabaig commented 8 years ago

Any updates? I am creating a landscape only iPad app and need it urgently.

kevin-hirsch commented 8 years ago

Not for the moment, I will try fix it this week. Until, you can use commit b13f1cf78fcc98445875a95db872d7399b9205c9 just before a741fea that broke the landscape mode.

pod 'KVNProgress', :git => 'https://github.com/AssistoLab/KVNProgress.git', :commit => 'b13f1cf78f'
aftabaig commented 8 years ago

Thanks Kevin.

kevin-hirsch commented 8 years ago

It's now fixed. It will be available in 2.4. Until then, feel free to use this version of KVNProgress:

pod 'KVNProgress', :git => 'https://github.com/AssistoLab/KVNProgress.git', :commit => '302514b'
kevin-hirsch commented 8 years ago

Fix available in version 2.3.1. You can use it via pod 'KVNProgress'