Skip to content
Browse files

view.contentScale -> [[UIScreen mainScreen] scale]

  • Loading branch information...
1 parent 0f5ed16 commit 18625da060d4ab12222401c73e5ef03b48776f82 @Remint Remint committed
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/EPGLTransitionView.m
View
8 src/EPGLTransitionView.m
@@ -38,8 +38,8 @@ + (Class)layerClass
- (UIImage *)imageWithView:(UIView *)view
{
- if ([view respondsToSelector:@selector(contentScaleFactor)])
- UIGraphicsBeginImageContextWithOptions(view.bounds.size, view.opaque, view.contentScaleFactor); //Retina support
+ if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
+ UIGraphicsBeginImageContextWithOptions(view.bounds.size, view.opaque, [[UIScreen mainScreen] scale]); //Retina support
else
UIGraphicsBeginImageContext(view.bounds.size);
[view.layer renderInContext:UIGraphicsGetCurrentContext()];
@@ -57,8 +57,8 @@ - (id)initWithView:(UIView*)view
size = UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation]) ? view.bounds.size : CGSizeMake(view.bounds.size.height, view.bounds.size.width);
//Retina support
- if ([view respondsToSelector:@selector(contentScaleFactor)]) {
- CGFloat contentScale = view.contentScaleFactor;
+ if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) {
+ CGFloat contentScale = [[UIScreen mainScreen] scale];
size.width *= contentScale;
size.height *= contentScale;
self.contentScaleFactor = contentScale;

0 comments on commit 18625da

Please sign in to comment.
Something went wrong with that request. Please try again.