Ivan Vučica avatar Ivan Vučica committed a2a6c69

The Code™!

Comments (0)

Files changed (17)

+xkcd #1110 for iOS
+==================
+
+Inspired by recent discussions on how long it could take Google to develop
+standalone Google Maps, I decided to prove my opinion that it should take very,
+very short time.
+
+So based on the idea from Florian Wesch - @dividuum - and using his tiles for
+Randall Munroe's xkcd comic #1110):
+  http://xkcd-map.rent-a-geek.de
+I've decided to develop a small app that would display just the "map" data.
+
+It took me around 3h.
+
+How long would it take Google to add basic search and routing to such a maps
+app? I estimate it should take them at most, in the worst case scenario, about
+3 months to be at the same stage as the pre-iOS 6 Maps app.
+
+Again, that's the worst case scenario, with Google's resources for hiring
+engineers.
+
+This app uses `CATiledLayer` and the fact that its `-drawInContext:` is
+multithreaded. This means we can even download the tiles during
+`-drawInContext:`. To be nicer to Florian's and user's bandwidth, there's also
+some caching of the downloaded images.
+
+View which contains the `CATiledLayer` subclass doesn't do anything except
+contain this special layer. `UIScrollView` does all the hard work of handling
+scrolling and zooming, which `CATiledLayer` happily picks up and orders drawing
+of its own contents.
+
+This is a universal app for iPhone and iPad. It was tested only in the
+simulator, and also seems to work fine on simulated iPhone 5.
+
+-- Ivan Vučica <ivan@vucica.net>
+

XKCD1110.xcodeproj/project.pbxproj

 		7FF16E9E16175B7300F0251D /* IVMainViewController_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7FF16E9C16175B7300F0251D /* IVMainViewController_iPhone.xib */; };
 		7FF16EA116175B7300F0251D /* IVMainViewController_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7FF16E9F16175B7300F0251D /* IVMainViewController_iPad.xib */; };
 		7FF16EA416175B7300F0251D /* IVFlipsideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7FF16EA216175B7300F0251D /* IVFlipsideViewController.xib */; };
+		7FF16EAC16175C6B00F0251D /* IVXkcdView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FF16EAB16175C6B00F0251D /* IVXkcdView.m */; };
+		7FF16EAF16175CA900F0251D /* IVXkcdTiledLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FF16EAE16175CA900F0251D /* IVXkcdTiledLayer.m */; };
+		7FF16EB116175EDF00F0251D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7FF16EB016175EDF00F0251D /* QuartzCore.framework */; };
+		7FF16EB816176CDF00F0251D /* NSData+HNCaching.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FF16EB316176CDF00F0251D /* NSData+HNCaching.m */; };
+		7FF16EB916176CDF00F0251D /* NSURL+HNCaching.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FF16EB516176CDF00F0251D /* NSURL+HNCaching.m */; };
+		7FF16EBA16176CDF00F0251D /* UIImage+HNCaching.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FF16EB716176CDF00F0251D /* UIImage+HNCaching.m */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
 		7FF16E9D16175B7300F0251D /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/IVMainViewController_iPhone.xib; sourceTree = "<group>"; };
 		7FF16EA016175B7300F0251D /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/IVMainViewController_iPad.xib; sourceTree = "<group>"; };
 		7FF16EA316175B7300F0251D /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/IVFlipsideViewController.xib; sourceTree = "<group>"; };
+		7FF16EAA16175C6B00F0251D /* IVXkcdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IVXkcdView.h; sourceTree = "<group>"; };
+		7FF16EAB16175C6B00F0251D /* IVXkcdView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IVXkcdView.m; sourceTree = "<group>"; };
+		7FF16EAD16175CA900F0251D /* IVXkcdTiledLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IVXkcdTiledLayer.h; sourceTree = "<group>"; };
+		7FF16EAE16175CA900F0251D /* IVXkcdTiledLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IVXkcdTiledLayer.m; sourceTree = "<group>"; };
+		7FF16EB016175EDF00F0251D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
+		7FF16EB216176CDF00F0251D /* NSData+HNCaching.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+HNCaching.h"; sourceTree = "<group>"; };
+		7FF16EB316176CDF00F0251D /* NSData+HNCaching.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+HNCaching.m"; sourceTree = "<group>"; };
+		7FF16EB416176CDF00F0251D /* NSURL+HNCaching.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSURL+HNCaching.h"; sourceTree = "<group>"; };
+		7FF16EB516176CDF00F0251D /* NSURL+HNCaching.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSURL+HNCaching.m"; sourceTree = "<group>"; };
+		7FF16EB616176CDF00F0251D /* UIImage+HNCaching.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+HNCaching.h"; sourceTree = "<group>"; };
+		7FF16EB716176CDF00F0251D /* UIImage+HNCaching.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+HNCaching.m"; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				7FF16EB116175EDF00F0251D /* QuartzCore.framework in Frameworks */,
 				7FF16E7F16175B7100F0251D /* UIKit.framework in Frameworks */,
 				7FF16E8116175B7100F0251D /* Foundation.framework in Frameworks */,
 				7FF16E8316175B7100F0251D /* CoreGraphics.framework in Frameworks */,
 		7FF16E6F16175B7000F0251D = {
 			isa = PBXGroup;
 			children = (
+				7FF16EB016175EDF00F0251D /* QuartzCore.framework */,
 				7FF16E8416175B7100F0251D /* XKCD1110 */,
 				7FF16E7D16175B7100F0251D /* Frameworks */,
 				7FF16E7B16175B7100F0251D /* Products */,
 				7FF16E9F16175B7300F0251D /* IVMainViewController_iPad.xib */,
 				7FF16EA216175B7300F0251D /* IVFlipsideViewController.xib */,
 				7FF16E8516175B7100F0251D /* Supporting Files */,
+				7FF16EAA16175C6B00F0251D /* IVXkcdView.h */,
+				7FF16EAB16175C6B00F0251D /* IVXkcdView.m */,
+				7FF16EAD16175CA900F0251D /* IVXkcdTiledLayer.h */,
+				7FF16EAE16175CA900F0251D /* IVXkcdTiledLayer.m */,
+				7FF16EB216176CDF00F0251D /* NSData+HNCaching.h */,
+				7FF16EB316176CDF00F0251D /* NSData+HNCaching.m */,
+				7FF16EB416176CDF00F0251D /* NSURL+HNCaching.h */,
+				7FF16EB516176CDF00F0251D /* NSURL+HNCaching.m */,
+				7FF16EB616176CDF00F0251D /* UIImage+HNCaching.h */,
+				7FF16EB716176CDF00F0251D /* UIImage+HNCaching.m */,
 			);
 			path = XKCD1110;
 			sourceTree = "<group>";
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
-		7FF16E7916175B7100F0251D /* XKCD1110 */ = {
+		7FF16E7916175B7100F0251D /* xkcd #1110 */ = {
 			isa = PBXNativeTarget;
-			buildConfigurationList = 7FF16EA716175B7300F0251D /* Build configuration list for PBXNativeTarget "XKCD1110" */;
+			buildConfigurationList = 7FF16EA716175B7300F0251D /* Build configuration list for PBXNativeTarget "xkcd #1110" */;
 			buildPhases = (
 				7FF16E7616175B7100F0251D /* Sources */,
 				7FF16E7716175B7100F0251D /* Frameworks */,
 			);
 			dependencies = (
 			);
-			name = XKCD1110;
+			name = "xkcd #1110";
 			productName = XKCD1110;
 			productReference = 7FF16E7A16175B7100F0251D /* XKCD1110.app */;
 			productType = "com.apple.product-type.application";
 			projectDirPath = "";
 			projectRoot = "";
 			targets = (
-				7FF16E7916175B7100F0251D /* XKCD1110 */,
+				7FF16E7916175B7100F0251D /* xkcd #1110 */,
 			);
 		};
 /* End PBXProject section */
 				7FF16E8F16175B7200F0251D /* IVAppDelegate.m in Sources */,
 				7FF16E9816175B7300F0251D /* IVMainViewController.m in Sources */,
 				7FF16E9B16175B7300F0251D /* IVFlipsideViewController.m in Sources */,
+				7FF16EAC16175C6B00F0251D /* IVXkcdView.m in Sources */,
+				7FF16EAF16175CA900F0251D /* IVXkcdTiledLayer.m in Sources */,
+				7FF16EB816176CDF00F0251D /* NSData+HNCaching.m in Sources */,
+				7FF16EB916176CDF00F0251D /* NSURL+HNCaching.m in Sources */,
+				7FF16EBA16176CDF00F0251D /* UIImage+HNCaching.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
-		7FF16EA716175B7300F0251D /* Build configuration list for PBXNativeTarget "XKCD1110" */ = {
+		7FF16EA716175B7300F0251D /* Build configuration list for PBXNativeTarget "xkcd #1110" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
 				7FF16EA816175B7300F0251D /* Debug */,

XKCD1110/IVMainViewController.h

 
 #import "IVFlipsideViewController.h"
 
-@interface IVMainViewController : UIViewController <IVFlipsideViewControllerDelegate>
+@class IVXkcdView;
+
+@interface IVMainViewController : UIViewController <IVFlipsideViewControllerDelegate, UIScrollViewDelegate>
 
 @property (strong, nonatomic) UIPopoverController *flipsidePopoverController;
 
 - (IBAction)showInfo:(id)sender;
 
+@property (retain, nonatomic) IBOutlet UILabel *statusLabel;
+@property (retain, nonatomic) IBOutlet UIScrollView *scrollView;
+@property (retain, nonatomic) IBOutlet IVXkcdView *xkcdView;
+
 @end

XKCD1110/IVMainViewController.m

 //
 
 #import "IVMainViewController.h"
+#import "IVXkcdView.h"
 
 @interface IVMainViewController ()
 
 {
     [super viewDidLoad];
 	// Do any additional setup after loading the view, typically from a nib.
+    [self.scrollView zoomToRect:CGRectMake(0, 0, 256, 256) animated:NO];
+    [self performSelector:@selector(initialZoom) withObject:nil afterDelay:0.5];
+    self.title = @"xkcd #1110";
+}
+
+- (void)initialZoom
+{
+    [UIView beginAnimations:@"initialZoom" context:nil];
+    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
+    [UIView setAnimationDuration:5];
+    [self.scrollView zoomToRect:CGRectFromString(@"{{127.928, 127.082}, {0.498523, 0.623154}}") animated:NO];
+    [UIView commitAnimations];
 }
 
 - (void)didReceiveMemoryWarning
 - (void)dealloc
 {
     [_flipsidePopoverController release];
+    [_xkcdView release];
+    [_scrollView release];
+    [_statusLabel release];
     [super dealloc];
 }
 
     }
 }
 
+#pragma mark - Scrollview delegate
+- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
+{
+    return self.xkcdView;
+}
+
+- (void)scrollViewDidScroll:(UIScrollView *)scrollView
+{
+    [self updateStatus];
+}
+
+- (void)scrollViewDidZoom:(UIScrollView *)scrollView
+{
+    [self updateStatus];
+}
+
+- (void)updateStatus
+{
+    NSString * status = [NSString stringWithFormat:@"Scale: %g", self.scrollView.zoomScale];
+    self.statusLabel.text = status;
+    
+    CGRect visibleRect = {0};
+    
+    visibleRect.origin = self.scrollView.contentOffset;
+    visibleRect.origin.x /= self.scrollView.zoomScale;
+    visibleRect.origin.y /= self.scrollView.zoomScale;
+    
+    visibleRect.size = self.scrollView.bounds.size;
+    visibleRect.size.width /= self.scrollView.zoomScale;
+    visibleRect.size.height /= self.scrollView.zoomScale;
+    
+    //NSLog(@"Visible %@", NSStringFromCGRect(visibleRect));
+    
+}
 @end

XKCD1110/IVXkcdTiledLayer.h

+//
+//  IVXkcdTiledLayer.h
+//  XKCD1110
+//
+//  Created by Ivan Vučica on 29.9.2012..
+//  Copyright (c) 2012. Ivan Vučica. All rights reserved.
+//
+
+#import <QuartzCore/QuartzCore.h>
+
+@interface IVXkcdTiledLayer : CATiledLayer
+
+@end

XKCD1110/IVXkcdTiledLayer.m

+//
+//  IVXkcdTiledLayer.m
+//  XKCD1110
+//
+//  Created by Ivan Vučica on 29.9.2012..
+//  Copyright (c) 2012. Ivan Vučica. All rights reserved.
+//
+
+#import "IVXkcdTiledLayer.h"
+#import "UIImage+HNCaching.h"
+
+#define ZOOM_SUPPORT 1
+
+@implementation IVXkcdTiledLayer
+
+- (void)drawInContext:(CGContextRef)context
+{
+	// Fetch clip box in *world* space; context's CTM is preconfigured for world space->tile pixel space transform
+	CGRect box = CGContextGetClipBoundingBox(context);
+    
+	// Calculate tile index
+	CGFloat contentsScale = [self respondsToSelector:@selector(contentsScale)]?[self contentsScale]:1.0;
+	CGSize tileSize = [(CATiledLayer*)self tileSize];
+    CGFloat scaling = box.size.width / tileSize.width;
+#if !(ZOOM_SUPPORT)
+	CGFloat x = box.origin.x * contentsScale / tileSize.width;
+	CGFloat y = box.origin.y * contentsScale / tileSize.height;
+#else
+    CGRect tbox = CGRectApplyAffineTransform(CGRectMake(0, 0, tileSize.width, tileSize.height),
+                                             CGAffineTransformInvert(CGContextGetCTM(context)));
+    CGFloat x = box.origin.x / tbox.size.width;
+    CGFloat y = box.origin.y / tbox.size.height;
+#endif
+	CGPoint tile = CGPointMake(x, y);
+    
+	// Clear background
+	CGContextSetFillColorWithColor(context, [[UIColor grayColor] CGColor]);
+	CGContextFillRect(context, box);
+    
+	// Rendering the contents
+	CGContextSaveGState(context);
+	CGContextConcatCTM(context, [self transformForTile:tile]);
+
+    UIImage * img = [self imageForTile:tile atZoomLevel:-log(scaling)/log(2)];
+    CGContextTranslateCTM(context, 0, box.size.height);
+    CGContextScaleCTM(context, 1, -1);
+    CGContextDrawImage(context, CGContextGetClipBoundingBox(context), [img CGImage]);
+    
+    CGContextRestoreGState(context);
+    
+#if 0
+	// Render label (Setup)
+	UIFont* font = [UIFont fontWithName:@"CourierNewPS-BoldMT" size:12 * scaling * 2];
+	CGContextSelectFont(context, [[font fontName] cStringUsingEncoding:NSASCIIStringEncoding], [font pointSize], kCGEncodingMacRoman);
+	CGContextSetTextDrawingMode(context, kCGTextFill);
+	CGContextSetTextMatrix(context, CGAffineTransformMakeScale(1, -1));
+	CGContextSetFillColorWithColor(context, [[UIColor greenColor] CGColor]);
+    
+	// Draw label
+	NSString* s = [NSString stringWithFormat:@"(%.1f, %.1f) %g",x,y,log(scaling)/log(2)];
+	CGContextShowTextAtPoint(context,
+                             box.origin.x,
+                             box.origin.y + [font pointSize],
+                             [s cStringUsingEncoding:NSMacOSRomanStringEncoding],
+                             [s lengthOfBytesUsingEncoding:NSMacOSRomanStringEncoding]);
+#endif
+}
+
+- (CGAffineTransform)transformForTile:(CGPoint)tile
+{
+	return CGAffineTransformIdentity;
+}
+
+- (UIImage*)imageForTile:(CGPoint)tile atZoomLevel:(int)zoomLevel
+{
+    NSString * urlString = [NSString stringWithFormat:@"http://xkcd1.rent-a-geek.de/converted/%d-%d-%d.png", zoomLevel, (int)tile.x, (int)tile.y];
+    NSURL * url = [NSURL URLWithString:urlString];
+    
+    return [UIImage imageWithContentsOfURLAndCaching:url];
+}
+
+@end

XKCD1110/IVXkcdView.h

+//
+//  IVXkcdView.h
+//  XKCD1110
+//
+//  Created by Ivan Vučica on 29.9.2012..
+//  Copyright (c) 2012. Ivan Vučica. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface IVXkcdView : UIView
+
+@end

XKCD1110/IVXkcdView.m

+//
+//  IVXkcdView.m
+//  XKCD1110
+//
+//  Created by Ivan Vučica on 29.9.2012..
+//  Copyright (c) 2012. Ivan Vučica. All rights reserved.
+//
+
+#import "IVXkcdView.h"
+#import <QuartzCore/QuartzCore.h>
+#import "IVXkcdTiledLayer.h"
+
+@implementation IVXkcdView
+
++ (Class)layerClass
+{
+    return [IVXkcdTiledLayer class];
+}
+
+- (id)initWithFrame:(CGRect)frame
+{
+    self = [super initWithFrame:frame];
+    if (self) {
+        // Initialization code
+        CATiledLayer *tempTiledLayer = (CATiledLayer*)self.layer;
+
+        tempTiledLayer.levelsOfDetail = 10;
+
+        tempTiledLayer.levelsOfDetailBias = 10;
+
+
+    }
+    return self;
+}
+- (id)initWithCoder:(NSCoder *)aDecoder
+{
+    self = [super initWithCoder:aDecoder];
+    if(!self)
+        return nil;
+    CATiledLayer *tempTiledLayer = (CATiledLayer*)self.layer;
+    
+    tempTiledLayer.levelsOfDetail = 11;
+    
+    tempTiledLayer.levelsOfDetailBias = 10;
+    
+
+    return self;
+}
+/*
+- (void)didMoveToSuperview
+{
+ // superview.maximumZoomScale returns 0 even here, despite superview being a scrollview :/
+ 
+    CATiledLayer *tempTiledLayer = (CATiledLayer*)self.layer;
+    
+    tempTiledLayer.levelsOfDetail = ((UIScrollView*)self.superview).maximumZoomScale;
+    
+    tempTiledLayer.levelsOfDetailBias = ((UIScrollView*)self.superview).maximumZoomScale-1;
+    
+    NSLog(@"LOD in superview %@: %d", self.superview, tempTiledLayer.levelsOfDetail);
+    
+    [tempTiledLayer setNeedsDisplay];
+
+}
+ */
+/*
+- (void)drawRect:(CGRect)rect
+{
+    // Drawing code
+
+    CGContextRef context = UIGraphicsGetCurrentContext();
+
+}
+*/
+
+- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
+{
+    [super touchesBegan:touches withEvent:event];
+    NSLog(@"Touchesbegan %d", touches.count);
+}
+@end

XKCD1110/NSData+HNCaching.h

+//
+//  NSData+HNCaching.h
+//  HN
+//
+//  Created by Ivan Vučica on 24.8.2012..
+//  Copyright (c) 2012. Hindarium. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface NSData (HNCaching)
++ (NSData*) dataWithContentsOfURLAndCaching: (NSURL*)url;
+@end

XKCD1110/NSData+HNCaching.m

+//
+//  NSData+HNCaching.m
+//  HN
+//
+//  Created by Ivan Vučica on 24.8.2012..
+//  Copyright (c) 2012. Hindarium. All rights reserved.
+//
+
+#import "NSData+HNCaching.h"
+#import "NSURL+HNCaching.h"
+//#import "ActivityManager.h"
+
+@implementation NSData (HNCaching)
++ (NSData*) dataWithContentsOfURLAndCaching: (NSURL*)url
+{
+    NSData * data;
+    
+    if(![url cacheValid])
+    {
+        //[[ActivityManager sharedManager] addActivity];
+        data = [NSData dataWithContentsOfURL: url];
+        //[[ActivityManager sharedManager] removeActivity];
+        if(data)
+        {
+            [data writeToFile: [url cacheFile] atomically: YES];
+            return data;
+        }
+    }
+    
+    return [self dataWithContentsOfFile: [url cacheFile]];
+}
+
+
+@end

XKCD1110/NSURL+HNCaching.h

+//
+//  NSURL+HNCaching.h
+//  HN
+//
+//  Created by Ivan Vučica on 3.7.2012..
+//  Copyright (c) 2012. Hindarium. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface NSURL (HNCaching)
+-(NSString*)cacheFile;
+-(BOOL)cacheExists;
+-(BOOL)cacheValid;
+-(void)cacheDestroy;
+@end

XKCD1110/NSURL+HNCaching.m

+//
+//  NSURL+HNCaching.m
+//  HN
+//
+//  Created by Ivan Vučica on 3.7.2012..
+//  Copyright (c) 2012. Hindarium. All rights reserved.
+//
+
+#import "NSURL+HNCaching.h"
+
+@implementation NSURL (HNCaching)
+
+-(NSString*)cacheFile
+{
+    NSString * cacheFile = [[[[self absoluteString] stringByDeletingLastPathComponent] lastPathComponent] stringByAppendingString: [[self absoluteString] lastPathComponent]];
+    NSString * cachePath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0];
+    return [cachePath stringByAppendingPathComponent:cacheFile];
+}
+
+#if 1
+#define CACHE_TIME 30*60 // 30min
+#else
+#define CACHE_TIME 5 // 5 sec
+#warning Cache time set to 5 sec!
+#endif
+- (BOOL)cacheExists
+{
+    return [[NSFileManager defaultManager] fileExistsAtPath:[self cacheFile]];
+}
+- (BOOL)cacheValid
+{
+    return [self cacheExists] && 
+    [[[[NSFileManager defaultManager] attributesOfItemAtPath:[self cacheFile] error:nil] valueForKey:NSFileModificationDate] timeIntervalSinceNow] > -CACHE_TIME;
+}
+
+- (void)cacheDestroy
+{
+    [[NSFileManager defaultManager] removeItemAtPath:[self cacheFile] error:nil];
+}
+@end

XKCD1110/UIImage+HNCaching.h

+//
+//  UIImage+HNCaching.h
+//  HN
+//
+//  Created by Ivan Vučica on 10.7.2012..
+//  Copyright (c) 2012. Hindarium. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface UIImage (HNCaching)
++ (UIImage*) imageWithContentsOfURLAndCaching: (NSURL*)url;
+@end

XKCD1110/UIImage+HNCaching.m

+//
+//  UIImage+HNCaching.m
+//  HN
+//
+//  Created by Ivan Vučica on 10.7.2012..
+//  Copyright (c) 2012. Hindarium. All rights reserved.
+//
+
+#import "UIImage+HNCaching.h"
+//#import "ActivityManager.h"
+#import "NSURL+HNCaching.h"
+
+@implementation UIImage (HNCaching)
++ (UIImage*) imageWithContentsOfURLAndCaching: (NSURL*)url
+{
+    
+    NSData * data;
+    
+    if(![url cacheValid])
+    {
+        //[[ActivityManager sharedManager] addActivity];
+        data = [NSData dataWithContentsOfURL: url];
+        //[[ActivityManager sharedManager] removeActivity];
+        if(data)
+        {
+            UIImage * img = [self imageWithData:data];
+            if(img)
+            {
+                [data writeToFile: [url cacheFile] atomically: YES];
+                return img;
+            }
+        }
+    }
+    
+    return [self imageWithContentsOfFile: [url cacheFile]];
+}
+
+@end

XKCD1110/en.lproj/IVFlipsideViewController.xib

 <archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
 	<data>
 		<int key="IBDocument.SystemTarget">1536</int>
-		<string key="IBDocument.SystemVersion">12A269</string>
-		<string key="IBDocument.InterfaceBuilderVersion">2835</string>
-		<string key="IBDocument.AppKitVersion">1187</string>
-		<string key="IBDocument.HIToolboxVersion">624.00</string>
+		<string key="IBDocument.SystemVersion">12C54</string>
+		<string key="IBDocument.InterfaceBuilderVersion">2840</string>
+		<string key="IBDocument.AppKitVersion">1187.34</string>
+		<string key="IBDocument.HIToolboxVersion">625.00</string>
 		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
 			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-			<string key="NS.object.0">1919</string>
+			<string key="NS.object.0">1926</string>
 		</object>
 		<array key="IBDocument.IntegratedClassDependencies">
 			<string>IBNSLayoutConstraint</string>
 			<string>IBProxyObject</string>
 			<string>IBUIBarButtonItem</string>
+			<string>IBUILabel</string>
 			<string>IBUINavigationBar</string>
 			<string>IBUINavigationItem</string>
 			<string>IBUIView</string>
 						<int key="NSvFlags">290</int>
 						<string key="NSFrameSize">{320, 44}</string>
 						<reference key="NSSuperview" ref="249263867"/>
-						<reference key="NSWindow"/>
-						<reference key="NSNextKeyView"/>
+						<reference key="NSNextKeyView" ref="585174927"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
 						<array key="IBUIItems">
 							<object class="IBUINavigationItem" id="553200710">
 								<reference key="IBUINavigationBar" ref="871675769"/>
-								<string key="IBUITitle">Title</string>
+								<string key="IBUITitle">Info</string>
 								<object class="IBUIBarButtonItem" key="IBUILeftBarButtonItem" id="854562692">
 									<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
 									<int key="IBUIStyle">1</int>
 							</object>
 						</array>
 					</object>
+					<object class="IBUILabel" id="585174927">
+						<reference key="NSNextResponder" ref="249263867"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{20, 93}, {281, 34}}</string>
+						<reference key="NSSuperview" ref="249263867"/>
+						<reference key="NSNextKeyView" ref="858711408"/>
+						<string key="NSReuseIdentifierKey">_NS:9</string>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClipsSubviews">YES</bool>
+						<int key="IBUIContentMode">7</int>
+						<bool key="IBUIUserInteractionEnabled">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<string key="IBUIText">xkcd #1110</string>
+						<object class="NSColor" key="IBUITextColor" id="353423499">
+							<int key="NSColorSpace">3</int>
+							<bytes key="NSWhite">MQA</bytes>
+						</object>
+						<nil key="IBUIHighlightedColor"/>
+						<int key="IBUIBaselineAdjustment">0</int>
+						<int key="IBUITextAlignment">1</int>
+						<object class="IBUIFontDescription" key="IBUIFontDescription">
+							<int key="type">2</int>
+							<double key="pointSize">28</double>
+						</object>
+						<object class="NSFont" key="IBUIFont">
+							<string key="NSName">Helvetica-Bold</string>
+							<double key="NSSize">28</double>
+							<int key="NSfFlags">16</int>
+						</object>
+						<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
+					</object>
+					<object class="IBUILabel" id="858711408">
+						<reference key="NSNextResponder" ref="249263867"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{20, 126}, {281, 34}}</string>
+						<reference key="NSSuperview" ref="249263867"/>
+						<reference key="NSNextKeyView" ref="538246754"/>
+						<string key="NSReuseIdentifierKey">_NS:9</string>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClipsSubviews">YES</bool>
+						<int key="IBUIContentMode">7</int>
+						<bool key="IBUIUserInteractionEnabled">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<string key="IBUIText">for iOS</string>
+						<reference key="IBUITextColor" ref="353423499"/>
+						<nil key="IBUIHighlightedColor"/>
+						<int key="IBUIBaselineAdjustment">0</int>
+						<int key="IBUITextAlignment">1</int>
+						<object class="IBUIFontDescription" key="IBUIFontDescription" id="577310509">
+							<int key="type">1</int>
+							<double key="pointSize">14</double>
+						</object>
+						<object class="NSFont" key="IBUIFont" id="379834064">
+							<string key="NSName">Helvetica</string>
+							<double key="NSSize">14</double>
+							<int key="NSfFlags">16</int>
+						</object>
+						<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
+					</object>
+					<object class="IBUILabel" id="399235240">
+						<reference key="NSNextResponder" ref="249263867"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{20, 219}, {281, 34}}</string>
+						<reference key="NSSuperview" ref="249263867"/>
+						<reference key="NSNextKeyView" ref="262554441"/>
+						<string key="NSReuseIdentifierKey">_NS:9</string>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClipsSubviews">YES</bool>
+						<int key="IBUIContentMode">7</int>
+						<bool key="IBUIUserInteractionEnabled">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<string key="IBUIText">Artwork: Randall Munroe</string>
+						<reference key="IBUITextColor" ref="353423499"/>
+						<nil key="IBUIHighlightedColor"/>
+						<int key="IBUIBaselineAdjustment">0</int>
+						<int key="IBUITextAlignment">1</int>
+						<reference key="IBUIFontDescription" ref="577310509"/>
+						<reference key="IBUIFont" ref="379834064"/>
+						<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
+					</object>
+					<object class="IBUILabel" id="262554441">
+						<reference key="NSNextResponder" ref="249263867"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{20, 244}, {281, 34}}</string>
+						<reference key="NSSuperview" ref="249263867"/>
+						<reference key="NSNextKeyView" ref="801664589"/>
+						<string key="NSReuseIdentifierKey">_NS:9</string>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClipsSubviews">YES</bool>
+						<int key="IBUIContentMode">7</int>
+						<bool key="IBUIUserInteractionEnabled">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<string key="IBUIText">Slicing, web version and idea: Florian Wesch</string>
+						<reference key="IBUITextColor" ref="353423499"/>
+						<nil key="IBUIHighlightedColor"/>
+						<int key="IBUIBaselineAdjustment">0</int>
+						<int key="IBUITextAlignment">1</int>
+						<reference key="IBUIFontDescription" ref="577310509"/>
+						<reference key="IBUIFont" ref="379834064"/>
+						<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
+					</object>
+					<object class="IBUILabel" id="801664589">
+						<reference key="NSNextResponder" ref="249263867"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{20, 276}, {281, 34}}</string>
+						<reference key="NSSuperview" ref="249263867"/>
+						<reference key="NSNextKeyView" ref="144899368"/>
+						<string key="NSReuseIdentifierKey">_NS:9</string>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClipsSubviews">YES</bool>
+						<int key="IBUIContentMode">7</int>
+						<bool key="IBUIUserInteractionEnabled">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<string key="IBUIText">iOS app: Ivan Vučica</string>
+						<reference key="IBUITextColor" ref="353423499"/>
+						<nil key="IBUIHighlightedColor"/>
+						<int key="IBUIBaselineAdjustment">0</int>
+						<int key="IBUITextAlignment">1</int>
+						<reference key="IBUIFontDescription" ref="577310509"/>
+						<reference key="IBUIFont" ref="379834064"/>
+						<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
+					</object>
+					<object class="IBUILabel" id="144899368">
+						<reference key="NSNextResponder" ref="249263867"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{20, 494}, {281, 34}}</string>
+						<reference key="NSSuperview" ref="249263867"/>
+						<reference key="NSNextKeyView"/>
+						<string key="NSReuseIdentifierKey">_NS:9</string>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClipsSubviews">YES</bool>
+						<int key="IBUIContentMode">7</int>
+						<bool key="IBUIUserInteractionEnabled">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<string key="IBUIText">September 29, 2012</string>
+						<reference key="IBUITextColor" ref="353423499"/>
+						<nil key="IBUIHighlightedColor"/>
+						<int key="IBUIBaselineAdjustment">0</int>
+						<int key="IBUITextAlignment">1</int>
+						<reference key="IBUIFontDescription" ref="577310509"/>
+						<reference key="IBUIFont" ref="379834064"/>
+						<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
+					</object>
+					<object class="IBUILabel" id="538246754">
+						<reference key="NSNextResponder" ref="249263867"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{20, 177}, {281, 34}}</string>
+						<reference key="NSSuperview" ref="249263867"/>
+						<reference key="NSNextKeyView" ref="399235240"/>
+						<string key="NSReuseIdentifierKey">_NS:9</string>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClipsSubviews">YES</bool>
+						<int key="IBUIContentMode">7</int>
+						<bool key="IBUIUserInteractionEnabled">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<string type="base64-UTF8" key="IBUIText">QWJvdXQgM2ggb2Ygd29yaywKb24gYSBjb2xkIFNlcHRlbWJlciBuaWdodC4</string>
+						<reference key="IBUITextColor" ref="353423499"/>
+						<nil key="IBUIHighlightedColor"/>
+						<int key="IBUIBaselineAdjustment">0</int>
+						<int key="IBUINumberOfLines">2</int>
+						<int key="IBUITextAlignment">1</int>
+						<reference key="IBUIFontDescription" ref="577310509"/>
+						<reference key="IBUIFont" ref="379834064"/>
+						<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
+						<double key="preferredMaxLayoutWidth">281</double>
+					</object>
 				</array>
 				<string key="NSFrame">{{0, 20}, {320, 548}}</string>
 				<reference key="NSSuperview"/>
-				<reference key="NSWindow"/>
 				<reference key="NSNextKeyView" ref="871675769"/>
 				<object class="NSColor" key="IBUIBackgroundColor">
 					<int key="NSColorSpace">3</int>
 						<reference key="object" ref="249263867"/>
 						<array class="NSMutableArray" key="children">
 							<reference ref="871675769"/>
+							<object class="IBNSLayoutConstraint" id="392172463">
+								<reference key="firstItem" ref="249263867"/>
+								<int key="firstAttribute">4</int>
+								<int key="relation">0</int>
+								<reference key="secondItem" ref="144899368"/>
+								<int key="secondAttribute">4</int>
+								<float key="multiplier">1</float>
+								<object class="IBNSLayoutSymbolicConstant" key="constant">
+									<double key="value">20</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="249263867"/>
+								<int key="scoringType">8</int>
+								<float key="scoringTypeFloat">29</float>
+								<int key="contentType">3</int>
+							</object>
+							<object class="IBNSLayoutConstraint" id="202359554">
+								<reference key="firstItem" ref="144899368"/>
+								<int key="firstAttribute">5</int>
+								<int key="relation">0</int>
+								<reference key="secondItem" ref="249263867"/>
+								<int key="secondAttribute">5</int>
+								<float key="multiplier">1</float>
+								<object class="IBNSLayoutSymbolicConstant" key="constant">
+									<double key="value">20</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="249263867"/>
+								<int key="scoringType">8</int>
+								<float key="scoringTypeFloat">29</float>
+								<int key="contentType">3</int>
+							</object>
+							<object class="IBNSLayoutConstraint" id="154419028">
+								<reference key="firstItem" ref="144899368"/>
+								<int key="firstAttribute">6</int>
+								<int key="relation">0</int>
+								<reference key="secondItem" ref="801664589"/>
+								<int key="secondAttribute">6</int>
+								<float key="multiplier">1</float>
+								<object class="IBLayoutConstant" key="constant">
+									<double key="value">0.0</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="249263867"/>
+								<int key="scoringType">6</int>
+								<float key="scoringTypeFloat">24</float>
+								<int key="contentType">2</int>
+							</object>
+							<object class="IBNSLayoutConstraint" id="534252093">
+								<reference key="firstItem" ref="249263867"/>
+								<int key="firstAttribute">4</int>
+								<int key="relation">0</int>
+								<reference key="secondItem" ref="801664589"/>
+								<int key="secondAttribute">4</int>
+								<float key="multiplier">1</float>
+								<object class="IBLayoutConstant" key="constant">
+									<double key="value">238</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="249263867"/>
+								<int key="scoringType">3</int>
+								<float key="scoringTypeFloat">9</float>
+								<int key="contentType">3</int>
+							</object>
+							<object class="IBNSLayoutConstraint" id="1013546937">
+								<reference key="firstItem" ref="801664589"/>
+								<int key="firstAttribute">6</int>
+								<int key="relation">0</int>
+								<reference key="secondItem" ref="262554441"/>
+								<int key="secondAttribute">6</int>
+								<float key="multiplier">1</float>
+								<object class="IBLayoutConstant" key="constant">
+									<double key="value">0.0</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="249263867"/>
+								<int key="scoringType">6</int>
+								<float key="scoringTypeFloat">24</float>
+								<int key="contentType">2</int>
+							</object>
+							<object class="IBNSLayoutConstraint" id="874739352">
+								<reference key="firstItem" ref="801664589"/>
+								<int key="firstAttribute">5</int>
+								<int key="relation">0</int>
+								<reference key="secondItem" ref="249263867"/>
+								<int key="secondAttribute">5</int>
+								<float key="multiplier">1</float>
+								<object class="IBNSLayoutSymbolicConstant" key="constant">
+									<double key="value">20</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="249263867"/>
+								<int key="scoringType">8</int>
+								<float key="scoringTypeFloat">29</float>
+								<int key="contentType">3</int>
+							</object>
+							<object class="IBNSLayoutConstraint" id="154836529">
+								<reference key="firstItem" ref="262554441"/>
+								<int key="firstAttribute">5</int>
+								<int key="relation">0</int>
+								<reference key="secondItem" ref="249263867"/>
+								<int key="secondAttribute">5</int>
+								<float key="multiplier">1</float>
+								<object class="IBNSLayoutSymbolicConstant" key="constant">
+									<double key="value">20</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="249263867"/>
+								<int key="scoringType">8</int>
+								<float key="scoringTypeFloat">29</float>
+								<int key="contentType">3</int>
+							</object>
+							<object class="IBNSLayoutConstraint" id="289565424">
+								<reference key="firstItem" ref="262554441"/>
+								<int key="firstAttribute">3</int>
+								<int key="relation">0</int>
+								<reference key="secondItem" ref="249263867"/>
+								<int key="secondAttribute">3</int>
+								<float key="multiplier">1</float>
+								<object class="IBLayoutConstant" key="constant">
+									<double key="value">244</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="249263867"/>
+								<int key="scoringType">3</int>
+								<float key="scoringTypeFloat">9</float>
+								<int key="contentType">3</int>
+							</object>
+							<object class="IBNSLayoutConstraint" id="945968116">
+								<reference key="firstItem" ref="262554441"/>
+								<int key="firstAttribute">6</int>
+								<int key="relation">0</int>
+								<reference key="secondItem" ref="399235240"/>
+								<int key="secondAttribute">6</int>
+								<float key="multiplier">1</float>
+								<object class="IBLayoutConstant" key="constant">
+									<double key="value">0.0</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="249263867"/>
+								<int key="scoringType">6</int>
+								<float key="scoringTypeFloat">24</float>
+								<int key="contentType">2</int>
+							</object>
+							<object class="IBNSLayoutConstraint" id="458947079">
+								<reference key="firstItem" ref="399235240"/>
+								<int key="firstAttribute">6</int>
+								<int key="relation">0</int>
+								<reference key="secondItem" ref="538246754"/>
+								<int key="secondAttribute">6</int>
+								<float key="multiplier">1</float>
+								<object class="IBLayoutConstant" key="constant">
+									<double key="value">0.0</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="249263867"/>
+								<int key="scoringType">6</int>
+								<float key="scoringTypeFloat">24</float>
+								<int key="contentType">2</int>
+							</object>
+							<object class="IBNSLayoutConstraint" id="534867620">
+								<reference key="firstItem" ref="399235240"/>
+								<int key="firstAttribute">5</int>
+								<int key="relation">0</int>
+								<reference key="secondItem" ref="249263867"/>
+								<int key="secondAttribute">5</int>
+								<float key="multiplier">1</float>
+								<object class="IBNSLayoutSymbolicConstant" key="constant">
+									<double key="value">20</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="249263867"/>
+								<int key="scoringType">8</int>
+								<float key="scoringTypeFloat">29</float>
+								<int key="contentType">3</int>
+							</object>
+							<object class="IBNSLayoutConstraint" id="967572429">
+								<reference key="firstItem" ref="399235240"/>
+								<int key="firstAttribute">3</int>
+								<int key="relation">0</int>
+								<reference key="secondItem" ref="538246754"/>
+								<int key="secondAttribute">4</int>
+								<float key="multiplier">1</float>
+								<object class="IBNSLayoutSymbolicConstant" key="constant">
+									<double key="value">8</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="249263867"/>
+								<int key="scoringType">6</int>
+								<float key="scoringTypeFloat">24</float>
+								<int key="contentType">3</int>
+							</object>
+							<object class="IBNSLayoutConstraint" id="30504726">
+								<reference key="firstItem" ref="538246754"/>
+								<int key="firstAttribute">5</int>
+								<int key="relation">0</int>
+								<reference key="secondItem" ref="249263867"/>
+								<int key="secondAttribute">5</int>
+								<float key="multiplier">1</float>
+								<object class="IBNSLayoutSymbolicConstant" key="constant">
+									<double key="value">20</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="249263867"/>
+								<int key="scoringType">8</int>
+								<float key="scoringTypeFloat">29</float>
+								<int key="contentType">3</int>
+							</object>
+							<object class="IBNSLayoutConstraint" id="506804384">
+								<reference key="firstItem" ref="538246754"/>
+								<int key="firstAttribute">3</int>
+								<int key="relation">0</int>
+								<reference key="secondItem" ref="249263867"/>
+								<int key="secondAttribute">3</int>
+								<float key="multiplier">1</float>
+								<object class="IBLayoutConstant" key="constant">
+									<double key="value">177</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="249263867"/>
+								<int key="scoringType">3</int>
+								<float key="scoringTypeFloat">9</float>
+								<int key="contentType">3</int>
+							</object>
+							<object class="IBNSLayoutConstraint" id="549522802">
+								<reference key="firstItem" ref="538246754"/>
+								<int key="firstAttribute">6</int>
+								<int key="relation">0</int>
+								<reference key="secondItem" ref="858711408"/>
+								<int key="secondAttribute">6</int>
+								<float key="multiplier">1</float>
+								<object class="IBLayoutConstant" key="constant">
+									<double key="value">0.0</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="249263867"/>
+								<int key="scoringType">6</int>
+								<float key="scoringTypeFloat">24</float>
+								<int key="contentType">2</int>
+							</object>
+							<object class="IBNSLayoutConstraint" id="294112825">
+								<reference key="firstItem" ref="858711408"/>
+								<int key="firstAttribute">5</int>
+								<int key="relation">0</int>
+								<reference key="secondItem" ref="249263867"/>
+								<int key="secondAttribute">5</int>
+								<float key="multiplier">1</float>
+								<object class="IBNSLayoutSymbolicConstant" key="constant">
+									<double key="value">20</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="249263867"/>
+								<int key="scoringType">8</int>
+								<float key="scoringTypeFloat">29</float>
+								<int key="contentType">3</int>
+							</object>
+							<object class="IBNSLayoutConstraint" id="236413759">
+								<reference key="firstItem" ref="858711408"/>
+								<int key="firstAttribute">6</int>
+								<int key="relation">0</int>
+								<reference key="secondItem" ref="585174927"/>
+								<int key="secondAttribute">6</int>
+								<float key="multiplier">1</float>
+								<object class="IBLayoutConstant" key="constant">
+									<double key="value">0.0</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="249263867"/>
+								<int key="scoringType">6</int>
+								<float key="scoringTypeFloat">24</float>
+								<int key="contentType">2</int>
+							</object>
+							<object class="IBNSLayoutConstraint" id="185966605">
+								<reference key="firstItem" ref="858711408"/>
+								<int key="firstAttribute">3</int>
+								<int key="relation">0</int>
+								<reference key="secondItem" ref="249263867"/>
+								<int key="secondAttribute">3</int>
+								<float key="multiplier">1</float>
+								<object class="IBLayoutConstant" key="constant">
+									<double key="value">126</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="249263867"/>
+								<int key="scoringType">3</int>
+								<float key="scoringTypeFloat">9</float>
+								<int key="contentType">3</int>
+							</object>
+							<object class="IBNSLayoutConstraint" id="746744863">
+								<reference key="firstItem" ref="585174927"/>
+								<int key="firstAttribute">5</int>
+								<int key="relation">0</int>
+								<reference key="secondItem" ref="249263867"/>
+								<int key="secondAttribute">5</int>
+								<float key="multiplier">1</float>
+								<object class="IBNSLayoutSymbolicConstant" key="constant">
+									<double key="value">20</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="249263867"/>
+								<int key="scoringType">8</int>
+								<float key="scoringTypeFloat">29</float>
+								<int key="contentType">3</int>
+							</object>
+							<object class="IBNSLayoutConstraint" id="873302976">
+								<reference key="firstItem" ref="585174927"/>
+								<int key="firstAttribute">3</int>
+								<int key="relation">0</int>
+								<reference key="secondItem" ref="249263867"/>
+								<int key="secondAttribute">3</int>
+								<float key="multiplier">1</float>
+								<object class="IBLayoutConstant" key="constant">
+									<double key="value">93</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="249263867"/>
+								<int key="scoringType">3</int>
+								<float key="scoringTypeFloat">9</float>
+								<int key="contentType">3</int>
+							</object>
+							<object class="IBNSLayoutConstraint" id="833081181">
+								<reference key="firstItem" ref="585174927"/>
+								<int key="firstAttribute">9</int>
+								<int key="relation">0</int>
+								<reference key="secondItem" ref="871675769"/>
+								<int key="secondAttribute">9</int>
+								<float key="multiplier">1</float>
+								<object class="IBLayoutConstant" key="constant">
+									<double key="value">0.0</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="249263867"/>
+								<int key="scoringType">6</int>
+								<float key="scoringTypeFloat">24</float>
+								<int key="contentType">2</int>
+							</object>
 							<object class="IBNSLayoutConstraint" id="591162250">
 								<reference key="firstItem" ref="871675769"/>
 								<int key="firstAttribute">6</int>
 								<float key="scoringTypeFloat">29</float>
 								<int key="contentType">3</int>
 							</object>
+							<reference ref="585174927"/>
+							<reference ref="858711408"/>
+							<reference ref="538246754"/>
+							<reference ref="399235240"/>
+							<reference ref="262554441"/>
+							<reference ref="801664589"/>
+							<reference ref="144899368"/>
 						</array>
 						<reference key="parent" ref="0"/>
 					</object>
 						<reference key="object" ref="591162250"/>
 						<reference key="parent" ref="249263867"/>
 					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">50</int>
+						<reference key="object" ref="585174927"/>
+						<array class="NSMutableArray" key="children"/>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">52</int>
+						<reference key="object" ref="833081181"/>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">55</int>
+						<reference key="object" ref="873302976"/>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">56</int>
+						<reference key="object" ref="858711408"/>
+						<array class="NSMutableArray" key="children">
+							<object class="IBNSLayoutConstraint" id="708718284">
+								<reference key="firstItem" ref="858711408"/>
+								<int key="firstAttribute">8</int>
+								<int key="relation">0</int>
+								<nil key="secondItem"/>
+								<int key="secondAttribute">0</int>
+								<float key="multiplier">1</float>
+								<object class="IBLayoutConstant" key="constant">
+									<double key="value">34</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="858711408"/>
+								<int key="scoringType">3</int>
+								<float key="scoringTypeFloat">9</float>
+								<int key="contentType">1</int>
+							</object>
+						</array>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">59</int>
+						<reference key="object" ref="185966605"/>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">61</int>
+						<reference key="object" ref="236413759"/>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">62</int>
+						<reference key="object" ref="708718284"/>
+						<reference key="parent" ref="858711408"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">63</int>
+						<reference key="object" ref="538246754"/>
+						<array class="NSMutableArray" key="children">
+							<object class="IBNSLayoutConstraint" id="172185075">
+								<reference key="firstItem" ref="538246754"/>
+								<int key="firstAttribute">8</int>
+								<int key="relation">0</int>
+								<nil key="secondItem"/>
+								<int key="secondAttribute">0</int>
+								<float key="multiplier">1</float>
+								<object class="IBLayoutConstant" key="constant">
+									<double key="value">34</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="538246754"/>
+								<int key="scoringType">3</int>
+								<float key="scoringTypeFloat">9</float>
+								<int key="contentType">1</int>
+							</object>
+						</array>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">64</int>
+						<reference key="object" ref="172185075"/>
+						<reference key="parent" ref="538246754"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">68</int>
+						<reference key="object" ref="549522802"/>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">70</int>
+						<reference key="object" ref="506804384"/>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">71</int>
+						<reference key="object" ref="294112825"/>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">72</int>
+						<reference key="object" ref="30504726"/>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">73</int>
+						<reference key="object" ref="746744863"/>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">74</int>
+						<reference key="object" ref="399235240"/>
+						<array class="NSMutableArray" key="children">
+							<object class="IBNSLayoutConstraint" id="25339159">
+								<reference key="firstItem" ref="399235240"/>
+								<int key="firstAttribute">8</int>
+								<int key="relation">0</int>
+								<nil key="secondItem"/>
+								<int key="secondAttribute">0</int>
+								<float key="multiplier">1</float>
+								<object class="IBLayoutConstant" key="constant">
+									<double key="value">34</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="399235240"/>
+								<int key="scoringType">3</int>
+								<float key="scoringTypeFloat">9</float>
+								<int key="contentType">1</int>
+							</object>
+						</array>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">75</int>
+						<reference key="object" ref="25339159"/>
+						<reference key="parent" ref="399235240"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">79</int>
+						<reference key="object" ref="967572429"/>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">80</int>
+						<reference key="object" ref="534867620"/>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">81</int>
+						<reference key="object" ref="458947079"/>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">82</int>
+						<reference key="object" ref="262554441"/>
+						<array class="NSMutableArray" key="children">
+							<object class="IBNSLayoutConstraint" id="146703890">
+								<reference key="firstItem" ref="262554441"/>
+								<int key="firstAttribute">8</int>
+								<int key="relation">0</int>
+								<nil key="secondItem"/>
+								<int key="secondAttribute">0</int>
+								<float key="multiplier">1</float>
+								<object class="IBLayoutConstant" key="constant">
+									<double key="value">34</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="262554441"/>
+								<int key="scoringType">3</int>
+								<float key="scoringTypeFloat">9</float>
+								<int key="contentType">1</int>
+							</object>
+						</array>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">83</int>
+						<reference key="object" ref="146703890"/>
+						<reference key="parent" ref="262554441"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">87</int>
+						<reference key="object" ref="945968116"/>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">88</int>
+						<reference key="object" ref="289565424"/>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">89</int>
+						<reference key="object" ref="154836529"/>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">90</int>
+						<reference key="object" ref="801664589"/>
+						<array class="NSMutableArray" key="children">
+							<object class="IBNSLayoutConstraint" id="350360023">
+								<reference key="firstItem" ref="801664589"/>
+								<int key="firstAttribute">8</int>
+								<int key="relation">0</int>
+								<nil key="secondItem"/>
+								<int key="secondAttribute">0</int>
+								<float key="multiplier">1</float>
+								<object class="IBLayoutConstant" key="constant">
+									<double key="value">34</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="801664589"/>
+								<int key="scoringType">3</int>
+								<float key="scoringTypeFloat">9</float>
+								<int key="contentType">1</int>
+							</object>
+						</array>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">91</int>
+						<reference key="object" ref="350360023"/>
+						<reference key="parent" ref="801664589"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">95</int>
+						<reference key="object" ref="874739352"/>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">97</int>
+						<reference key="object" ref="1013546937"/>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">98</int>
+						<reference key="object" ref="144899368"/>
+						<array class="NSMutableArray" key="children">
+							<object class="IBNSLayoutConstraint" id="888605777">
+								<reference key="firstItem" ref="144899368"/>
+								<int key="firstAttribute">8</int>
+								<int key="relation">0</int>
+								<nil key="secondItem"/>
+								<int key="secondAttribute">0</int>
+								<float key="multiplier">1</float>
+								<object class="IBLayoutConstant" key="constant">
+									<double key="value">34</double>
+								</object>
+								<float key="priority">1000</float>
+								<reference key="containingView" ref="144899368"/>
+								<int key="scoringType">3</int>
+								<float key="scoringTypeFloat">9</float>
+								<int key="contentType">1</int>
+							</object>
+						</array>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">99</int>
+						<reference key="object" ref="888605777"/>
+						<reference key="parent" ref="144899368"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">104</int>
+						<reference key="object" ref="154419028"/>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">106</int>
+						<reference key="object" ref="202359554"/>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">107</int>
+						<reference key="object" ref="392172463"/>
+						<reference key="parent" ref="249263867"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">108</int>
+						<reference key="object" ref="534252093"/>
+						<reference key="parent" ref="249263867"/>
+					</object>
 				</array>
 			</object>
 			<dictionary class="NSMutableDictionary" key="flattenedProperties">
 				<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 				<string key="-2.CustomClassName">UIResponder</string>
 				<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="104.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="106.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="107.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="108.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 				<string key="40.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-				<array key="40.IBViewMetadataConstraints">
+				<array class="NSMutableArray" key="40.IBViewMetadataConstraints">
 					<reference ref="927769008"/>
 					<reference ref="64945523"/>
 					<reference ref="591162250"/>
+					<reference ref="833081181"/>
+					<reference ref="873302976"/>
+					<reference ref="746744863"/>
+					<reference ref="185966605"/>
+					<reference ref="236413759"/>
+					<reference ref="294112825"/>
+					<reference ref="549522802"/>
+					<reference ref="506804384"/>
+					<reference ref="30504726"/>
+					<reference ref="967572429"/>
+					<reference ref="534867620"/>
+					<reference ref="458947079"/>
+					<reference ref="945968116"/>
+					<reference ref="289565424"/>
+					<reference ref="154836529"/>
+					<reference ref="874739352"/>
+					<reference ref="1013546937"/>
+					<reference ref="534252093"/>
+					<reference ref="154419028"/>
+					<reference ref="202359554"/>
+					<reference ref="392172463"/>
 				</array>
 				<string key="42.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 				<boolean value="NO" key="42.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
 				<string key="47.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 				<string key="48.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 				<string key="49.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="50.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<boolean value="NO" key="50.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
+				<string key="52.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="55.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="56.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<array key="56.IBViewMetadataConstraints">
+					<reference ref="708718284"/>
+				</array>
+				<boolean value="NO" key="56.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
+				<string key="59.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="61.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="62.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="63.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<array class="NSMutableArray" key="63.IBViewMetadataConstraints">
+					<reference ref="172185075"/>
+				</array>
+				<boolean value="NO" key="63.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
+				<string key="64.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="68.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="70.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="71.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="72.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="73.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="74.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<array class="NSMutableArray" key="74.IBViewMetadataConstraints">
+					<reference ref="25339159"/>
+				</array>
+				<boolean value="NO" key="74.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
+				<string key="75.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="79.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="80.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="81.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="82.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<array class="NSMutableArray" key="82.IBViewMetadataConstraints">
+					<reference ref="146703890"/>
+				</array>
+				<boolean value="NO" key="82.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
+				<string key="83.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="87.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="88.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="89.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="90.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<array class="NSMutableArray" key="90.IBViewMetadataConstraints">
+					<reference ref="350360023"/>
+				</array>
+				<boolean value="NO" key="90.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
+				<string key="91.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="95.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="97.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="98.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<array class="NSMutableArray" key="98.IBViewMetadataConstraints">
+					<reference ref="888605777"/>
+				</array>
+				<boolean value="NO" key="98.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
+				<string key="99.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 			</dictionary>
 			<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
 			<nil key="activeLocalization"/>
 			<dictionary class="NSMutableDictionary" key="localizations"/>
 			<nil key="sourceID"/>
-			<int key="maxID">49</int>
+			<int key="maxID">108</int>
 		</object>
 		<object class="IBClassDescriber" key="IBDocument.Classes"/>
 		<int key="IBDocument.localizationMode">0</int>
 		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
 		<int key="IBDocument.defaultPropertyAccessControl">3</int>
 		<bool key="IBDocument.UseAutolayout">YES</bool>
-		<string key="IBCocoaTouchPluginVersion">1919</string>
+		<string key="IBCocoaTouchPluginVersion">1926</string>
 	</data>
 </archive>

XKCD1110/en.lproj/IVMainViewController_iPad.xib

 <archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="8.00">
 	<data>
 		<int key="IBDocument.SystemTarget">1536</int>
-		<string key="IBDocument.SystemVersion">12A206j</string>
-		<string key="IBDocument.InterfaceBuilderVersion">2519</string>
-		<string key="IBDocument.AppKitVersion">1172.1</string>
-		<string key="IBDocument.HIToolboxVersion">613.00</string>
+		<string key="IBDocument.SystemVersion">12C54</string>
+		<string key="IBDocument.InterfaceBuilderVersion">2840</string>
+		<string key="IBDocument.AppKitVersion">1187.34</string>
+		<string key="IBDocument.HIToolboxVersion">625.00</string>
 		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
 			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-			<string key="NS.object.0">1856</string>
+			<string key="NS.object.0">1926</string>
 		</object>
 		<array key="IBDocument.IntegratedClassDependencies">
-			<string>IBNSLayoutConstraint</string>
 			<string>IBProxyObject</string>
 			<string>IBUIBarButtonItem</string>
 			<string>IBUINavigationBar</string>
 			<string>IBUINavigationItem</string>
+			<string>IBUIScrollView</string>
 			<string>IBUIView</string>
 		</array>
 		<array key="IBDocument.PluginDependencies">
 				<reference key="NSNextResponder"/>
 				<int key="NSvFlags">274</int>
 				<array class="NSMutableArray" key="NSSubviews">
+					<object class="IBUIScrollView" id="19171963">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">274</int>
+						<array class="NSMutableArray" key="NSSubviews">
+							<object class="IBUIView" id="518330023">
+								<reference key="NSNextResponder" ref="19171963"/>
+								<int key="NSvFlags">292</int>
+								<string key="NSFrameSize">{256, 256}</string>
+								<reference key="NSSuperview" ref="19171963"/>
+								<reference key="NSNextKeyView"/>
+								<string key="NSReuseIdentifierKey">_NS:9</string>
+								<object class="NSColor" key="IBUIBackgroundColor">
+									<int key="NSColorSpace">3</int>
+									<bytes key="NSWhite">MQA</bytes>
+									<object class="NSColorSpace" key="NSCustomColorSpace">
+										<int key="NSID">2</int>
+									</object>
+								</object>
+								<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+							</object>
+						</array>
+						<string key="NSFrame">{{0, 44}, {768, 960}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSNextKeyView" ref="518330023"/>
+						<string key="NSReuseIdentifierKey">_NS:9</string>
+						<bool key="IBUIClipsSubviews">YES</bool>
+						<bool key="IBUIMultipleTouchEnabled">YES</bool>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<float key="IBUIMaximumZoomScale">2048</float>
+					</object>
 					<object class="IBUINavigationBar" id="812863800">
 						<reference key="NSNextResponder" ref="191373211"/>
 						<int key="NSvFlags">290</int>
 						<string key="NSFrameSize">{768, 44}</string>
 						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="NSWindow"/>
+						<reference key="NSNextKeyView" ref="19171963"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
 				</array>
 				<string key="NSFrame">{{0, 20}, {768, 1004}}</string>
 				<reference key="NSSuperview"/>
-				<reference key="NSWindow"/>
 				<reference key="NSNextKeyView" ref="812863800"/>
 				<object class="NSColor" key="IBUIBackgroundColor">
 					<int key="NSColorSpace">3</int>
-					<bytes key="NSWhite">MC4yNQA</bytes>
-					<object class="NSColorSpace" key="NSCustomColorSpace">
-						<int key="NSID">2</int>
-					</object>
+					<bytes key="NSWhite">MQA</bytes>
 				</object>
+				<bool key="IBUIMultipleTouchEnabled">YES</bool>
 				<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
 					<int key="IBUIStatusBarStyle">2</int>
 				</object>
 					<int key="connectionID">3</int>
 				</object>
 				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">scrollView</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="19171963"/>
+					</object>
+					<int key="connectionID">17</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">xkcdView</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="518330023"/>
+					</object>
+					<int key="connectionID">18</int>
+				</object>
+				<object class="IBConnectionRecord">
 					<object class="IBCocoaTouchEventConnection" key="connection">
 						<string key="label">showInfo:</string>
 						<reference key="source" ref="827738330"/>
 					</object>
 					<int key="connectionID">11</int>
 				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">delegate</string>
+						<reference key="source" ref="19171963"/>
+						<reference key="destination" ref="372490531"/>
+					</object>
+					<int key="connectionID">19</int>
+				</object>
 			</array>
 			<object class="IBMutableOrderedSet" key="objectRecords">
 				<array key="orderedObjects">
 						<reference key="object" ref="191373211"/>
 						<array class="NSMutableArray" key="children">
 							<reference ref="812863800"/>
-							<object class="IBNSLayoutConstraint" id="278524894">
-								<reference key="firstItem" ref="812863800"/>
-								<int key="firstAttribute">6</int>
-								<int key="relation">0</int>
-								<reference key="secondItem" ref="191373211"/>
-								<int key="secondAttribute">6</int>
-								<float key="multiplier">1</float>
-								<object class="IBLayoutConstant" key="constant">
-									<double key="value">0.0</double>
-								</object>
-								<float key="priority">1000</float>
-								<reference key="containingView" ref="191373211"/>
-								<int key="scoringType">8</int>
-								<float key="scoringTypeFloat">29</float>
-								<int key="contentType">3</int>
-							</object>
-							<object class="IBNSLayoutConstraint" id="1056034120">
-								<reference key="firstItem" ref="812863800"/>
-								<int key="firstAttribute">5</int>
-								<int key="relation">0</int>
-								<reference key="secondItem" ref="191373211"/>
-								<int key="secondAttribute">5</int>
-								<float key="multiplier">1</float>
-								<object class="IBLayoutConstant" key="constant">
-									<double key="value">0.0</double>
-								</object>
-								<float key="priority">1000</float>
-								<reference key="containingView" ref="191373211"/>
-								<int key="scoringType">8</int>
-								<float key="scoringTypeFloat">29</float>
-								<int key="contentType">3</int>
-							</object>
-							<object class="IBNSLayoutConstraint" id="643006596">
-								<reference key="firstItem" ref="812863800"/>
-								<int key="firstAttribute">3</int>
-								<int key="relation">0</int>
-								<reference key="secondItem" ref="191373211"/>
-								<int key="secondAttribute">3</int>
-								<float key="multiplier">1</float>
-								<object class="IBLayoutConstant" key="constant">
-									<double key="value">0.0</double>
-								</object>
-								<float key="priority">1000</float>
-								<reference key="containingView" ref="191373211"/>
-								<int key="scoringType">8</int>
-								<float key="scoringTypeFloat">29</float>
-								<int key="contentType">3</int>
-							</object>
+							<reference ref="19171963"/>
 						</array>
 						<reference key="parent" ref="0"/>
 					</object>
 						<reference key="parent" ref="677504279"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">12</int>
-						<reference key="object" ref="643006596"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">13</int>
-						<reference key="object" ref="1056034120"/>
+						<int key="objectID">15</int>
+						<reference key="object" ref="19171963"/>
+						<array class="NSMutableArray" key="children">
+							<reference ref="518330023"/>
+						</array>
 						<reference key="parent" ref="191373211"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">14</int>
-						<reference key="object" ref="278524894"/>
-						<reference key="parent" ref="191373211"/>
+						<int key="objectID">16</int>
+						<reference key="object" ref="518330023"/>
+						<reference key="parent" ref="19171963"/>
 					</object>
 				</array>
 			</object>
 				<string key="-2.CustomClassName">UIResponder</string>
 				<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 				<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-				<array key="1.IBViewMetadataConstraints">
-					<reference ref="643006596"/>
-					<reference ref="1056034120"/>
-					<reference ref="278524894"/>
-				</array>
 				<string key="10.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-				<string key="12.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-				<string key="13.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-				<string key="14.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="15.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				<string key="16.CustomClassName">IVXkcdView</string>
+				<string key="16.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 				<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-				<boolean value="NO" key="7.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
 				<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 			</dictionary>
 			<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
 			<nil key="activeLocalization"/>
 			<dictionary class="NSMutableDictionary" key="localizations"/>
 			<nil key="sourceID"/>
-			<int key="maxID">14</int>
+			<int key="maxID">19</int>
 		</object>
 		<object class="IBClassDescriber" key="IBDocument.Classes"/>
 		<int key="IBDocument.localizationMode">0</int>
 		<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
 		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
 		<int key="IBDocument.defaultPropertyAccessControl">3</int>
-		<bool key="IBDocument.UseAutolayout">YES</bool>
-		<string key="IBCocoaTouchPluginVersion">1856</string>
+		<string key="IBCocoaTouchPluginVersion">1926</string>
 	</data>
 </archive>

XKCD1110/en.lproj/IVMainViewController_iPhone.xib

 <archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
 	<data>
 		<int key="IBDocument.SystemTarget">1536</int>
-		<string key="IBDocument.SystemVersion">12A269</string>
-		<string key="IBDocument.InterfaceBuilderVersion">2835</string>
-		<string key="IBDocument.AppKitVersion">1187</string>
-		<string key="IBDocument.HIToolboxVersion">624.00</string>
+		<string key="IBDocument.SystemVersion">12C54</string>
+		<string key="IBDocument.InterfaceBuilderVersion">2840</string>
+		<string key="IBDocument.AppKitVersion">1187.34</string>
+		<string key="IBDocument.HIToolboxVersion">625.00</string>
 		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
 			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-			<string key="NS.object.0">1919</string>
+			<string key="NS.object.0">1926</string>
 		</object>
 		<array key="IBDocument.IntegratedClassDependencies">
-			<string>IBNSLayoutConstraint</string>
 			<string>IBProxyObject</string>
 			<string>IBUIButton</string>
+			<string>IBUIScrollView</string>
 			<string>IBUIView</string>
 		</array>
 		<array key="IBDocument.PluginDependencies">
 				<reference key="NSNextResponder"/>
 				<int key="NSvFlags">274</int>
 				<array class="NSMutableArray" key="NSSubviews">
+					<object class="IBUIScrollView" id="56958387">
+						<reference key="NSNextResponder" ref="883825266"/>
+						<int key="NSvFlags">274</int>
+						<array class="NSMutableArray" key="NSSubviews">
+							<object class="IBUIView" id="833447873">
+								<reference key="NSNextResponder" ref="56958387"/>
+								<int key="NSvFlags">292</int>
+								<string key="NSFrameSize">{256, 256}</string>
+								<reference key="NSSuperview" ref="56958387"/>
+								<reference key="NSWindow"/>
+								<reference key="NSNextKeyView" ref="558454645"/>
+								<string key="NSReuseIdentifierKey">_NS:9</string>
+								<object class="NSColor" key="IBUIBackgroundColor">
+									<int key="NSColorSpace">3</int>
+									<bytes key="NSWhite">MQA</bytes>
+									<object class="NSColorSpace" key="NSCustomColorSpace">
+										<int key="NSID">2</int>
+									</object>
+								</object>
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+							</object>
+						</array>
+						<string key="NSFrameSize">{320, 548}</string>
+						<reference key="NSSuperview" ref="883825266"/>
+						<reference key="NSWindow"/>
+						<reference key="NSNextKeyView" ref="833447873"/>
+						<string key="NSReuseIdentifierKey">_NS:9</string>
+						<bool key="IBUIClipsSubviews">YES</bool>
+						<bool key="IBUIMultipleTouchEnabled">YES</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<float key="IBUIMaximumZoomScale">2048</float>
+					</object>
 					<object class="IBUIButton" id="558454645">
 						<reference key="NSNextResponder" ref="883825266"/>
 						<int key="NSvFlags">265</int>
 						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
 						<int key="IBUIContentHorizontalAlignment">0</int>
 						<int key="IBUIContentVerticalAlignment">0</int>
-						<int key="IBUIButtonType">3</int>
+						<int key="IBUIButtonType">4</int>
 						<bool key="IBUIShowsTouchWhenHighlighted">YES</bool>
 						<object class="NSColor" key="IBUIHighlightedTitleColor">
 							<int key="NSColorSpace">1</int>
 				<string key="NSFrame">{{0, 20}, {320, 548}}</string>
 				<reference key="NSSuperview"/>
 				<reference key="NSWindow"/>
-				<reference key="NSNextKeyView" ref="558454645"/>
+				<reference key="NSNextKeyView" ref="56958387"/>
 				<object class="NSColor" key="IBUIBackgroundColor">
 					<int key="NSColorSpace">3</int>
-					<bytes key="NSWhite">MC4yNQA</bytes>
-					<object class="NSColorSpace" key="NSCustomColorSpace">
-						<int key="NSID">2</int>
-					</object>
+					<bytes key="NSWhite">MQA</bytes>
 				</object>
 				<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+				<bool key="IBUIMultipleTouchEnabled">YES</bool>
 				<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
 				<object class="IBUIScreenMetrics" key="IBUISimulatedDestinationMetrics">
 					<string key="IBUISimulatedSizeMetricsClass">IBUIScreenMetrics</string>
 					<int key="connectionID">35</int>
 				</object>
 				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">xkcdView</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="833447873"/>
+					</object>
+					<int key="connectionID">60</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">scrollView</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="56958387"/>
+					</object>
+					<int key="connectionID">61</int>
+				</object>
+				<object class="IBConnectionRecord">
 					<object class="IBCocoaTouchEventConnection" key="connection">
 						<string key="label">showInfo:</string>
 						<reference key="source" ref="558454645"/>
 					</object>
 					<int key="connectionID">38</int>
 				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">delegate</string>
+						<reference key="source" ref="56958387"/>
+						<reference key="destination" ref="372490531"/>
+					</object>