rnystrom / RNBlurModalView

Add depth to your alerts.
MIT License
830 stars 143 forks source link

Fix not center aligned issue in landscape mode for both iOS7 and iOS8 #50

Open iNima opened 10 years ago

iNima commented 10 years ago

Hi @rnystrom

This commit resolves #45 . The problem can be seen in these screenshots for landscape mode (iOS7.1) in iPad. Pull requests #9 resolved similar issue but the solution only works in iOS8. In iOS7.1 for example the result is what you can see in these screenshots:

rnblurmodalviewpullreq1

rnblurmodalviewpullreq2

The problem is based on difference between bounds and frames values in portrait and landscape mode. We should use bounds to perform any calculation as it gives us the correct values independent of our device orientation. Calculation for _contentView.center should be based on viewController.view.bounds and parentView.bounds.

Regards, Nima Azimi

iNima commented 9 years ago

Hi @rnystrom

Did you check this pull request?

Regards, Nima

sadjad commented 9 years ago

Dude, merge this, please :)

foffux commented 9 years ago

Has someone any news about @rnystrom? Is he still working on his projects? Can anyone else merge all this pull requests and make new pod? Thank you.