mutualmobile / MMProgressHUD

An easy-to-use HUD interface with personality.
MIT License
705 stars 131 forks source link

iOS8 Rotation Fix #31

Closed vincentjames501 closed 9 years ago

vincentjames501 commented 10 years ago

PR for #30. This also includes the fix by @TeacherTool as well as updating the overlay view and redrawing it upon rotation.

syky27 commented 9 years ago

Would you please accept this? So I can just run pod update ?

larsacus commented 9 years ago

@syky27 I will have some time in the next few days hopefully to get to this to test and make sure it's stable on all supported platforms before merging in and revving the pod spec.

vincentjames501 commented 9 years ago

I should probably note, this still doesn't work properly on iOS7 on the iPad. I just disabled the overlay view for iOS7 for now so this probably isn't the PR you want.

larsacus commented 9 years ago

@vincentjames501 Thank you for the data point. Is it when compiled for iOS 7 (using Xcode 5.1.x), or is it compiled for iOS 8 (Xcode 6) running on iOS 7?

syky27 commented 9 years ago

@larsacus thanks for the reply, I can surely say that it works on all iPhones build target 7.1 compiled with Xcode 6. Thanks for support guys!

vincentjames501 commented 9 years ago

From our testing it works great for iOS8 on both iPhone & iPad. On iOS7, it works great for iPhone but upon rotation the overlay view sizing is messed up on iOS7 for the iPad. I spent about an hour trying to figure it out before just saying screw it (its strange because the overlay views bounds get set properly but they don't appear to update). I compiled it on Xcode 6.

There's also a code smell in this PR where I had to expose the overlay view to the view controller. There's probably a better way of doing this, but I just wanted to get our testers off my back :).

larsacus commented 9 years ago

Rotation support has always been this project's achilles heel. The APIs change subtly every year which makes for a lot of strange edge cases when it comes to platforms and backwards compatibility. The way rotation is handled in iOS 8 appears to have changed significantly, especially at the window-level, which is where the issues are creeping in here. I'll be sure to prioritize this one over the Thanksgiving holiday to see if I can't address the issues as well as the smell in the current fix.

larsacus commented 9 years ago

Can everyone who is having rotation issues please take a look at ee50263 and see if this resolves the issue? I tried to break it with the fix I made and could not on all 6.x->8.x platforms.

larsacus commented 9 years ago

I just pushed v0.3.0 with these changes to fix this -- reopen this issue if this issue still persists.