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

Please consider a way to dynamically set KVNRotationViewController properties via Configuration #89

Open mrubin opened 8 years ago

mrubin commented 8 years ago

If it will soon be possible to use KVNProgress via Carthage (meaning it will be compiled into a static library and then imported into your app), it becomes impossible to change the values of KVNRotationViewController - you cannot subclass it either because KVNProgress directly instantiates it via:

self.progressWindow.rootViewController = [[KVNRotationViewController alloc] init];

(I suppose you could swizzle it?)

Would it be possible to somehow make use of the Configuration to make KVNRotationViewController configurable beyond compile time? For example, for my app I need to use:

- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskLandscape;
}

Perhaps KVNRotationViewController could be given a pointer to KVNProgressConfiguration?

kevin-hirsch commented 8 years ago

Hello @mrubin,

If I understand correctly, you have an app that only supports landscape mode but the KVNProgress loader does rotate in portait mode?

That's indeed a problem. I think a good solution would be to have a new UIInterfaceOrientationMask supportedOrientations property for KVNProgressConfiguration that would be used when instantiating the KVNRotationViewController. Then the KVNRotationViewController could use it in the supportedInterfaceOrientations method.

I will work on that along with the Carthage support ;)

mrubin commented 8 years ago

It doesn't rotate all the way, but it looks like it starts rotating and then rotates back to where it was... so it "flickers".