fixed calculation of screen width and height for iOS 8
Merge commit '8cbb1c6a8b6f1ef3494c63d754af0865a421fbba'