Commits

Ivan Vučica  committed 0be32df

Fixed max zoom level.

  • Participants
  • Parent commits a414f2f

Comments (0)

Files changed (2)

File XKCD1110/IVXkcdTiledLayer.m

 	CGContextSaveGState(context);
 	CGContextConcatCTM(context, [self transformForTile:tile]);
 
-    UIImage * img = [self imageForTile:tile atZoomLevel:-log(scaling)/log(2)];
+    int zoomLevel = -log(scaling)/log(2);
+    UIImage * img = [self imageForTile:tile atZoomLevel:zoomLevel];
     CGContextTranslateCTM(context, 0, box.size.height);
     CGContextScaleCTM(context, 1, -1);
     CGContextDrawImage(context, CGContextGetClipBoundingBox(context), [img CGImage]);

File XKCD1110/IVXkcdView.m

 
         tempTiledLayer.levelsOfDetail = 10;
 
-        tempTiledLayer.levelsOfDetailBias = 10;
+        tempTiledLayer.levelsOfDetailBias = 9;
 
 
     }
         return nil;
     CATiledLayer *tempTiledLayer = (CATiledLayer*)self.layer;
     
-    tempTiledLayer.levelsOfDetail = 11;
+    tempTiledLayer.levelsOfDetail = 10;
     
-    tempTiledLayer.levelsOfDetailBias = 10;
+    tempTiledLayer.levelsOfDetailBias = 9;
     
 
     return self;