Permalink
Browse files

Fix for noretina.

  • Loading branch information...
1 parent a75fa13 commit ffeaad104e1b82ef3250f67cc6470d801c91ac6c @semionenko semionenko committed Mar 27, 2013
Showing with 11 additions and 3 deletions.
  1. +11 −3 IXPickerOverlayView/IXPickerOverlayView.m
@@ -109,7 +109,6 @@ - (void)layoutSubviews {
[path applyTransform:CGAffineTransformMakeScale(1, -1)];
self.textureLayer.path = path.CGPath;
-
UIImageView* leftPane = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, leftPaneWidth, totalHeight)];
leftPane.image = [self imageForLeftPane];
leftPane.contentStretch = CGRectMake(0, 0, 0, 1);
@@ -122,8 +121,17 @@ - (void)layoutSubviews {
CGFloat x = leftPaneWidth;
- UIColor *topCornerColor = [UIColor colorWithRed:56.f/255 green:57.f/255 blue:60.f/255 alpha:1.0f];
- UIColor *bottomCornerColor = [UIColor colorWithRed:60.f/255 green:60.f/255 blue:71.f/255 alpha:1.0f];
+ UIColor *topCornerColor;
+ UIColor *bottomCornerColor;
+
+ if ([[UIScreen mainScreen] respondsToSelector:@selector(displayLinkWithTarget:selector:)] &&
+ ([UIScreen mainScreen].scale == 2.0)) {
+ topCornerColor = [UIColor colorWithRed:56.f/255 green:57.f/255 blue:60.f/255 alpha:1.0f];
+ bottomCornerColor = [UIColor colorWithRed:60.f/255 green:60.f/255 blue:71.f/255 alpha:1.0f];
+ } else {
+ topCornerColor = [UIColor colorWithRed:50.f/255 green:50.f/255 blue:56.f/255 alpha:1.0f];
+ bottomCornerColor = [UIColor colorWithRed:61.f/255 green:61.f/255 blue:71.f/255 alpha:1.0f];
+ }
UIView *topLeftCorner = [[UIView alloc] initWithFrame:CGRectMake(x, 10, 3, .5)];
topLeftCorner.backgroundColor = topCornerColor;

0 comments on commit ffeaad1

Please sign in to comment.