Fix not center aligned issue in landscape mode for both iOS7 and iOS8 #50
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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