├── Default.png ├── TilesIcon.png ├── .hgignore ├── Tiles_Prefix.pch ├── Classes ├── CALayer+Additions.h ├── NSString+Additions.h ├── CALayer+Additions.m ├── TilesAppDelegate.h ├── Tile.h ├── TilesViewController.h ├── NSString+Additions.m ├── TilesAppDelegate.m ├── Tile.m └── TilesViewController.m ├── main.m ├── .gitignore ├── Tiles-Info.plist ├── README.markdown ├── MainWindow.xib ├── Tiles.xcodeproj └── project.pbxproj └── TilesViewController.xib /Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kristopherjohnson/tilessample/HEAD/Default.png -------------------------------------------------------------------------------- /TilesIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kristopherjohnson/tilessample/HEAD/TilesIcon.png -------------------------------------------------------------------------------- /.hgignore: -------------------------------------------------------------------------------- 1 | syntax: glob 2 | 3 | .DS_Store 4 | build 5 | kdj.* 6 | *.orig 7 | *~ 8 | push 9 | pull 10 | incoming 11 | outgoing 12 | .svn 13 | *.uncrustify 14 | 15 | -------------------------------------------------------------------------------- /Tiles_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Tiles' target in the 'Tiles' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /Classes/CALayer+Additions.h: -------------------------------------------------------------------------------- 1 | // 2 | // CALayer+Additions.h 3 | // Tiles 4 | // 5 | 6 | #import 7 | #import 8 | 9 | @interface CALayer (Additions) 10 | 11 | - (void)moveToFront; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Classes/NSString+Additions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+Additions.h 3 | // Tiles 4 | // 5 | 6 | #import 7 | 8 | 9 | @interface NSString (Additions) 10 | 11 | - (void)drawCenteredInRect:(CGRect)rect withFont:(UIFont *)font; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Classes/CALayer+Additions.m: -------------------------------------------------------------------------------- 1 | // 2 | // CALayer+Additions.m 3 | // Tiles 4 | // 5 | 6 | #import "CALayer+Additions.h" 7 | 8 | 9 | @implementation CALayer (Additions) 10 | 11 | 12 | - (void)moveToFront { 13 | CALayer *superlayer = self.superlayer; 14 | [self retain]; 15 | [self removeFromSuperlayer]; 16 | [superlayer addSublayer:self]; 17 | [self release]; 18 | } 19 | 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Tiles 4 | // 5 | // Created by Kristopher Johnson on 2/3/10. 6 | // Copyright Capable Hands Technologies, Inc. 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | 13 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | [pool release]; 16 | return retVal; 17 | } 18 | -------------------------------------------------------------------------------- /Classes/TilesAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // TilesAppDelegate.h 3 | // Tiles 4 | // 5 | 6 | #import 7 | 8 | @class TilesViewController; 9 | 10 | @interface TilesAppDelegate : NSObject { 11 | UIWindow *window; 12 | TilesViewController *viewController; 13 | } 14 | 15 | @property (nonatomic, retain) IBOutlet UIWindow *window; 16 | @property (nonatomic, retain) IBOutlet TilesViewController *viewController; 17 | 18 | @end 19 | 20 | -------------------------------------------------------------------------------- /Classes/Tile.h: -------------------------------------------------------------------------------- 1 | // 2 | // Tile.h 3 | // Tiles 4 | // 5 | 6 | #import 7 | #import 8 | #import "CALayer+Additions.h" 9 | 10 | 11 | @interface Tile : CAGradientLayer { 12 | int tileIndex; 13 | } 14 | 15 | @property (nonatomic) int tileIndex; 16 | 17 | - (void)draw; 18 | 19 | - (void)appearDraggable; 20 | 21 | - (void)appearNormal; 22 | 23 | - (void)startWiggling; 24 | 25 | - (void)stopWiggling; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Classes/TilesViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TilesViewController.h 3 | // Tiles 4 | // 5 | 6 | #import 7 | 8 | #define TILE_ROWS 6 9 | #define TILE_COLUMNS 4 10 | #define TILE_COUNT (TILE_ROWS * TILE_COLUMNS) 11 | 12 | @class Tile; 13 | 14 | @interface TilesViewController : UIViewController { 15 | @private 16 | CGRect tileFrame[TILE_COUNT]; 17 | Tile *tileForFrame[TILE_COUNT]; 18 | 19 | Tile *heldTile; 20 | int heldFrameIndex; 21 | CGPoint heldStartPosition; 22 | CGPoint touchStartLocation; 23 | } 24 | 25 | @end 26 | 27 | -------------------------------------------------------------------------------- /Classes/NSString+Additions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+Additions.m 3 | // Tiles 4 | // 5 | 6 | #import "NSString+Additions.h" 7 | 8 | 9 | @implementation NSString (Additions) 10 | 11 | 12 | - (void)drawCenteredInRect:(CGRect)rect withFont:(UIFont *)font { 13 | CGSize size = [self sizeWithFont:font]; 14 | 15 | CGRect textBounds = CGRectMake(rect.origin.x + (rect.size.width - size.width) / 2, 16 | rect.origin.y + (rect.size.height - size.height) / 2, 17 | size.width, size.height); 18 | [self drawInRect:textBounds withFont:font]; 19 | } 20 | 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Classes/TilesAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // TilesAppDelegate.m 3 | // Tiles 4 | // 5 | 6 | #import "TilesAppDelegate.h" 7 | #import "TilesViewController.h" 8 | 9 | @implementation TilesAppDelegate 10 | 11 | @synthesize window; 12 | @synthesize viewController; 13 | 14 | 15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 16 | 17 | [window addSubview:viewController.view]; 18 | [window makeKeyAndVisible]; 19 | 20 | return YES; 21 | } 22 | 23 | 24 | - (void)dealloc { 25 | [viewController release]; 26 | [window release]; 27 | [super dealloc]; 28 | } 29 | 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | CVS 2 | .#* 3 | 4 | .hg 5 | .hgignore 6 | 7 | .svn 8 | 9 | bin 10 | Bin 11 | obj 12 | Debug 13 | Debug Dist 14 | Release 15 | Release Dist 16 | TestResults 17 | *.obj 18 | *.suo 19 | *.ncb 20 | *.aps 21 | *.user 22 | *.tli 23 | *.tlh 24 | *.idb 25 | *.pdb 26 | *.tlb 27 | *_i.h 28 | *_h.h 29 | *_i.c 30 | *_p.c 31 | *idl.h 32 | dlldata.c 33 | *ps.dll 34 | *ps.exp 35 | *ps.lib 36 | *.sdf 37 | *.opensdf 38 | ipch 39 | PrecompiledWeb 40 | 41 | build 42 | *.pbxuser 43 | *.perspectivev3 44 | .DS_Store 45 | 46 | *.old 47 | *.log 48 | *.out 49 | *.cache 50 | *.orig 51 | logs 52 | 53 | gen 54 | .metadata 55 | 56 | *~ 57 | 58 | -------------------------------------------------------------------------------- /Tiles-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | TilesIcon.png 13 | CFBundleIdentifier 14 | net.kristopherjohnson.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | UIStatusBarStyle 30 | UIStatusBarStyleBlackOpaque 31 | 32 | 33 | -------------------------------------------------------------------------------- /README.markdown: -------------------------------------------------------------------------------- 1 | See http://undefinedvalue.com/2010/02/05/iphone-sample-code-tiles-arrangement for more information. 2 | 3 | Copyright © 2013 Kristopher Johnson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /Classes/Tile.m: -------------------------------------------------------------------------------- 1 | // 2 | // Tile.m 3 | // Tiles 4 | // 5 | 6 | #import "Tile.h" 7 | #import "NSString+Additions.h" 8 | #import 9 | 10 | 11 | @interface Tile () 12 | - (void)setGlossGradientProperties; 13 | - (CAAnimation *)wiggleRotationAnimation; 14 | - (CAAnimation *)wiggleTranslationYAnimation; 15 | @end 16 | 17 | 18 | @implementation Tile 19 | 20 | @synthesize tileIndex; 21 | 22 | 23 | #pragma mark - 24 | #pragma mark Initialization 25 | 26 | 27 | - (id)init { 28 | self = [super init]; 29 | if (self) { 30 | [self setGlossGradientProperties]; 31 | } 32 | return self; 33 | } 34 | 35 | 36 | - (void)setGlossGradientProperties { 37 | static NSArray *colors = nil; 38 | if (colors == nil) { 39 | colors = [NSArray arrayWithObjects: 40 | (id)[UIColor colorWithWhite:1.0f alpha:0.50f].CGColor, 41 | (id)[UIColor colorWithWhite:1.0f alpha:0.12f].CGColor, 42 | (id)[UIColor colorWithWhite:1.0f alpha:0.00f].CGColor, 43 | (id)[UIColor colorWithWhite:1.0f alpha:0.00f].CGColor, 44 | (id)[UIColor colorWithWhite:1.0f alpha:0.25f].CGColor, 45 | nil]; 46 | [colors retain]; 47 | } 48 | 49 | static NSArray *locations = nil; 50 | if (locations == nil) { 51 | locations = [NSArray arrayWithObjects: 52 | [NSNumber numberWithFloat:0.0f], 53 | [NSNumber numberWithFloat:0.5f], 54 | [NSNumber numberWithFloat:0.5f], 55 | [NSNumber numberWithFloat:0.85f], 56 | [NSNumber numberWithFloat:1.0f], 57 | nil]; 58 | [locations retain]; 59 | } 60 | 61 | self.colors = colors; 62 | self.locations = locations; 63 | } 64 | 65 | 66 | #pragma mark - 67 | #pragma mark Drawing 68 | 69 | 70 | - (void)draw { 71 | NSString *labelText = [NSString stringWithFormat:@"%d", (int)tileIndex]; 72 | 73 | UIFont *font = [UIFont boldSystemFontOfSize:36.0f]; 74 | [[UIColor whiteColor] set]; 75 | [labelText drawCenteredInRect:self.bounds withFont:font]; 76 | } 77 | 78 | 79 | #pragma mark - 80 | #pragma mark Draggable animation 81 | 82 | 83 | - (void)appearDraggable { 84 | self.opacity = 0.6f; 85 | [self setValue:[NSNumber numberWithFloat:1.25f] forKeyPath:@"transform.scale"]; 86 | } 87 | 88 | 89 | - (void)appearNormal { 90 | self.opacity = 1.0f; 91 | [self setValue:[NSNumber numberWithFloat:1.0f] forKeyPath:@"transform.scale"]; 92 | } 93 | 94 | 95 | #pragma mark - 96 | #pragma mark Wiggle animation 97 | 98 | 99 | - (void)startWiggling { 100 | CAAnimation *rotationAnimation = [self wiggleRotationAnimation]; 101 | [self addAnimation:rotationAnimation forKey:@"wiggleRotation"]; 102 | 103 | CAAnimation *translationYAnimation = [self wiggleTranslationYAnimation]; 104 | [self addAnimation:translationYAnimation forKey:@"wiggleTranslationY"]; 105 | } 106 | 107 | 108 | - (void)stopWiggling { 109 | [self removeAnimationForKey:@"wiggleRotation"]; 110 | [self removeAnimationForKey:@"wiggleTranslationY"]; 111 | } 112 | 113 | 114 | - (CAAnimation *)wiggleRotationAnimation { 115 | CAKeyframeAnimation *anim = [CAKeyframeAnimation animationWithKeyPath:@"transform.rotation"]; 116 | anim.values = [NSArray arrayWithObjects:[NSNumber numberWithFloat:-0.05f], 117 | [NSNumber numberWithFloat:0.05f], 118 | nil]; 119 | anim.duration = 0.09f + ((tileIndex % 10) * 0.01f); 120 | anim.autoreverses = YES; 121 | anim.repeatCount = HUGE_VALF; 122 | return anim; 123 | } 124 | 125 | 126 | - (CAAnimation *)wiggleTranslationYAnimation { 127 | CAKeyframeAnimation *anim = [CAKeyframeAnimation animationWithKeyPath:@"transform.translation.y"]; 128 | anim.values = [NSArray arrayWithObjects:[NSNumber numberWithFloat:-1.0f], 129 | [NSNumber numberWithFloat:1.0f], 130 | nil]; 131 | anim.duration = 0.07f + ((tileIndex % 10) * 0.01f); 132 | anim.autoreverses = YES; 133 | anim.repeatCount = HUGE_VALF; 134 | anim.additive = YES; 135 | return anim; 136 | } 137 | 138 | 139 | @end 140 | -------------------------------------------------------------------------------- /Classes/TilesViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TilesViewController.m 3 | // Tiles 4 | // 5 | 6 | #import "TilesViewController.h" 7 | #import "Tile.h" 8 | #import 9 | 10 | 11 | #define TILE_WIDTH 57 12 | #define TILE_HEIGHT TILE_WIDTH 13 | #define TILE_MARGIN 18 14 | 15 | 16 | @interface TilesViewController () 17 | - (void)createTiles; 18 | - (CALayer *)layerForTouch:(UITouch *)touch; 19 | - (void)touchBegan:(UITouch *)touch forTile:(Tile *)tile; 20 | - (int)frameIndexForTileIndex:(int)tileIndex; 21 | - (void)moveHeldTileToPoint:(CGPoint)location; 22 | - (void)moveUnheldTilesAwayFromPoint:(CGPoint)location; 23 | - (int)indexOfClosestFrameToPoint:(CGPoint)point; 24 | - (void)startTilesWiggling; 25 | - (void)stopTilesWiggling; 26 | @end 27 | 28 | 29 | @implementation TilesViewController 30 | 31 | 32 | #pragma mark - 33 | #pragma mark Initialization 34 | 35 | 36 | - (void)viewDidLoad { 37 | [super viewDidLoad]; 38 | [self createTiles]; 39 | } 40 | 41 | 42 | - (void)createTiles { 43 | UIColor *tileColors[] = { 44 | [UIColor blueColor], 45 | [UIColor brownColor], 46 | [UIColor grayColor], 47 | [UIColor greenColor], 48 | [UIColor orangeColor], 49 | [UIColor purpleColor], 50 | [UIColor redColor], 51 | }; 52 | int tileColorCount = sizeof(tileColors) / sizeof(tileColors[0]); 53 | 54 | for (int row = 0; row < TILE_ROWS; ++row) { 55 | for (int col = 0; col < TILE_COLUMNS; ++col) { 56 | int index = (row * TILE_COLUMNS) + col; 57 | 58 | CGRect frame = CGRectMake(TILE_MARGIN + col * (TILE_MARGIN + TILE_WIDTH), 59 | TILE_MARGIN + row * (TILE_MARGIN + TILE_HEIGHT), 60 | TILE_WIDTH, TILE_HEIGHT); 61 | tileFrame[index] = frame; 62 | 63 | Tile *tile = [[Tile alloc] init]; 64 | tile.tileIndex = index; 65 | tileForFrame[index] = tile; 66 | tile.frame = frame; 67 | tile.backgroundColor = tileColors[index % tileColorCount].CGColor; 68 | tile.cornerRadius = 8; 69 | tile.delegate = self; 70 | if ([tile respondsToSelector:@selector(setContentsScale:)]) 71 | { 72 | tile.contentsScale = [[UIScreen mainScreen] scale]; 73 | } 74 | [self.view.layer addSublayer:tile]; 75 | [tile setNeedsDisplay]; 76 | [tile release]; 77 | } 78 | } 79 | } 80 | 81 | 82 | #pragma mark - 83 | #pragma mark Layer delegate methods 84 | 85 | 86 | - (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx { 87 | if ([layer isKindOfClass:[Tile class]]) { 88 | Tile *tile = (Tile *)layer; 89 | UIGraphicsPushContext(ctx); 90 | [tile draw]; 91 | UIGraphicsPopContext(); 92 | } 93 | } 94 | 95 | 96 | #pragma mark - 97 | #pragma mark touchesBegan 98 | 99 | 100 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { 101 | UITouch *touch = [touches anyObject]; 102 | CALayer *hitLayer = [self layerForTouch:touch]; 103 | if ([hitLayer isKindOfClass:[Tile class]]) { 104 | [self touchBegan:touch forTile:(Tile*)hitLayer]; 105 | } 106 | } 107 | 108 | 109 | - (CALayer *)layerForTouch:(UITouch *)touch { 110 | UIView *view = self.view; 111 | 112 | CGPoint location = [touch locationInView:view]; 113 | location = [view convertPoint:location toView:nil]; 114 | 115 | CALayer *hitPresentationLayer = [view.layer.presentationLayer hitTest:location]; 116 | if (hitPresentationLayer) { 117 | return hitPresentationLayer.modelLayer; 118 | } 119 | 120 | return nil; 121 | } 122 | 123 | 124 | - (void)touchBegan:(UITouch *)touch forTile:(Tile *)tile { 125 | heldTile = tile; 126 | 127 | touchStartLocation = [touch locationInView:self.view]; 128 | heldStartPosition = tile.position; 129 | heldFrameIndex = [self frameIndexForTileIndex:tile.tileIndex]; 130 | 131 | [tile moveToFront]; 132 | [tile appearDraggable]; 133 | [self startTilesWiggling]; 134 | } 135 | 136 | 137 | - (int)frameIndexForTileIndex:(int)tileIndex { 138 | for (int i = 0; i < TILE_COUNT; ++i) { 139 | if (tileForFrame[i].tileIndex == tileIndex) { 140 | return i; 141 | } 142 | } 143 | return 0; 144 | } 145 | 146 | 147 | #pragma mark - 148 | #pragma mark touchesMoved 149 | 150 | 151 | - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { 152 | if (heldTile) { 153 | UITouch *touch = [touches anyObject]; 154 | UIView *view = self.view; 155 | CGPoint location = [touch locationInView:view]; 156 | [self moveHeldTileToPoint:location]; 157 | [self moveUnheldTilesAwayFromPoint:location]; 158 | } 159 | } 160 | 161 | 162 | - (void)moveHeldTileToPoint:(CGPoint)location { 163 | float dx = location.x - touchStartLocation.x; 164 | float dy = location.y - touchStartLocation.y; 165 | CGPoint newPosition = CGPointMake(heldStartPosition.x + dx, heldStartPosition.y + dy); 166 | 167 | [CATransaction begin]; 168 | [CATransaction setDisableActions:YES]; 169 | heldTile.position = newPosition; 170 | [CATransaction commit]; 171 | } 172 | 173 | 174 | - (void)moveUnheldTilesAwayFromPoint:(CGPoint)location { 175 | int frameIndex = [self indexOfClosestFrameToPoint:location]; 176 | if (frameIndex != heldFrameIndex) { 177 | [CATransaction begin]; 178 | 179 | if (frameIndex < heldFrameIndex) { 180 | for (int i = heldFrameIndex; i > frameIndex; --i) { 181 | Tile *movingTile = tileForFrame[i-1]; 182 | movingTile.frame = tileFrame[i]; 183 | tileForFrame[i] = movingTile; 184 | } 185 | } 186 | else if (heldFrameIndex < frameIndex) { 187 | for (int i = heldFrameIndex; i < frameIndex; ++i) { 188 | Tile *movingTile = tileForFrame[i+1]; 189 | movingTile.frame = tileFrame[i]; 190 | tileForFrame[i] = movingTile; 191 | } 192 | } 193 | heldFrameIndex = frameIndex; 194 | tileForFrame[heldFrameIndex] = heldTile; 195 | 196 | [CATransaction commit]; 197 | } 198 | } 199 | 200 | 201 | - (int)indexOfClosestFrameToPoint:(CGPoint)point { 202 | int index = 0; 203 | float minDist = FLT_MAX; 204 | for (int i = 0; i < TILE_COUNT; ++i) { 205 | CGRect frame = tileFrame[i]; 206 | 207 | float dx = point.x - CGRectGetMidX(frame); 208 | float dy = point.y - CGRectGetMidY(frame); 209 | 210 | float dist = (dx * dx) + (dy * dy); 211 | if (dist < minDist) { 212 | index = i; 213 | minDist = dist; 214 | } 215 | } 216 | return index; 217 | } 218 | 219 | 220 | #pragma mark - 221 | #pragma mark touchesEnded 222 | 223 | 224 | - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { 225 | if (heldTile) { 226 | [heldTile appearNormal]; 227 | heldTile.frame = tileFrame[heldFrameIndex]; 228 | heldTile = nil; 229 | [self stopTilesWiggling]; 230 | } 231 | } 232 | 233 | 234 | - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { 235 | [self touchesEnded:touches withEvent:event]; 236 | } 237 | 238 | 239 | #pragma mark - 240 | #pragma mark Tile animation 241 | 242 | 243 | - (void)startTilesWiggling { 244 | for (int i = 0; i < TILE_COUNT; ++i) { 245 | Tile *tile = tileForFrame[i]; 246 | if (tile != heldTile) { 247 | [tile startWiggling]; 248 | } 249 | } 250 | } 251 | 252 | 253 | - (void)stopTilesWiggling { 254 | for (int i = 0; i < TILE_COUNT; ++i) { 255 | Tile *tile = tileForFrame[i]; 256 | [tile stopWiggling]; 257 | } 258 | } 259 | 260 | 261 | @end 262 | -------------------------------------------------------------------------------- /MainWindow.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 800 5 | 10C540 6 | 740 7 | 1038.25 8 | 458.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 62 12 | 13 | 14 | YES 15 | 16 | 17 | 18 | YES 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | YES 23 | 24 | YES 25 | 26 | 27 | YES 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | 35 | 36 | IBFirstResponder 37 | 38 | 39 | 40 | TilesViewController 41 | 42 | 2 43 | 44 | 45 | 46 | 47 | 292 48 | {320, 480} 49 | 50 | 1 51 | MCAwIDAAA 52 | 53 | NO 54 | NO 55 | 56 | 2 57 | 58 | 59 | 60 | 61 | 62 | YES 63 | 64 | 65 | delegate 66 | 67 | 68 | 69 | 4 70 | 71 | 72 | 73 | viewController 74 | 75 | 76 | 77 | 11 78 | 79 | 80 | 81 | window 82 | 83 | 84 | 85 | 14 86 | 87 | 88 | 89 | 90 | YES 91 | 92 | 0 93 | 94 | 95 | 96 | 97 | 98 | -1 99 | 100 | 101 | File's Owner 102 | 103 | 104 | 3 105 | 106 | 107 | Tiles App Delegate 108 | 109 | 110 | -2 111 | 112 | 113 | 114 | 115 | 10 116 | 117 | 118 | 119 | 120 | 12 121 | 122 | 123 | 124 | 125 | 126 | 127 | YES 128 | 129 | YES 130 | -1.CustomClassName 131 | -2.CustomClassName 132 | 10.CustomClassName 133 | 10.IBEditorWindowLastContentRect 134 | 10.IBPluginDependency 135 | 12.IBEditorWindowLastContentRect 136 | 12.IBPluginDependency 137 | 3.CustomClassName 138 | 3.IBPluginDependency 139 | 140 | 141 | YES 142 | UIApplication 143 | UIResponder 144 | TilesViewController 145 | {{234, 376}, {320, 480}} 146 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 147 | {{525, 346}, {320, 480}} 148 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 149 | TilesAppDelegate 150 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 151 | 152 | 153 | 154 | YES 155 | 156 | 157 | YES 158 | 159 | 160 | 161 | 162 | YES 163 | 164 | 165 | YES 166 | 167 | 168 | 169 | 14 170 | 171 | 172 | 173 | YES 174 | 175 | TilesAppDelegate 176 | NSObject 177 | 178 | YES 179 | 180 | YES 181 | viewController 182 | window 183 | 184 | 185 | YES 186 | TilesViewController 187 | UIWindow 188 | 189 | 190 | 191 | IBProjectSource 192 | Classes/TilesAppDelegate.h 193 | 194 | 195 | 196 | TilesAppDelegate 197 | NSObject 198 | 199 | IBUserSource 200 | 201 | 202 | 203 | 204 | TilesViewController 205 | UIViewController 206 | 207 | IBProjectSource 208 | Classes/TilesViewController.h 209 | 210 | 211 | 212 | 213 | 0 214 | 215 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 216 | 217 | 218 | 219 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 220 | 221 | 222 | YES 223 | Tiles.xcodeproj 224 | 3 225 | 3.1 226 | 227 | 228 | -------------------------------------------------------------------------------- /Tiles.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 45; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1D3623260D0F684500981E51 /* TilesAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* TilesAppDelegate.m */; }; 11 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 12 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 13 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 14 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; 15 | 2899E5220DE3E06400AC0155 /* TilesViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* TilesViewController.xib */; }; 16 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; 17 | 28D7ACF80DDB3853001CB0EB /* TilesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* TilesViewController.m */; }; 18 | 4E3848A5111B7FB700E6AEFC /* CALayer+Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E3848A4111B7FB700E6AEFC /* CALayer+Additions.m */; }; 19 | 4E384901111BA32D00E6AEFC /* NSString+Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E384900111BA32D00E6AEFC /* NSString+Additions.m */; }; 20 | 4E384985111BB3BE00E6AEFC /* TilesIcon.png in Resources */ = {isa = PBXBuildFile; fileRef = 4E384984111BB3BE00E6AEFC /* TilesIcon.png */; }; 21 | 4EC0B94F111A51BC00E604BD /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4EC0B94E111A51BC00E604BD /* QuartzCore.framework */; }; 22 | 4EC0B9F8111A5AF200E604BD /* Tile.m in Sources */ = {isa = PBXBuildFile; fileRef = 4EC0B9F7111A5AF200E604BD /* Tile.m */; }; 23 | 4EC0BC7A111AEF5300E604BD /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 4EC0BC79111AEF5300E604BD /* Default.png */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXFileReference section */ 27 | 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 28 | 1D3623240D0F684500981E51 /* TilesAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TilesAppDelegate.h; sourceTree = ""; }; 29 | 1D3623250D0F684500981E51 /* TilesAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TilesAppDelegate.m; sourceTree = ""; }; 30 | 1D6058910D05DD3D006BFB54 /* Tiles.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Tiles.app; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 32 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 33 | 2899E5210DE3E06400AC0155 /* TilesViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TilesViewController.xib; sourceTree = ""; }; 34 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; 35 | 28D7ACF60DDB3853001CB0EB /* TilesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TilesViewController.h; sourceTree = ""; }; 36 | 28D7ACF70DDB3853001CB0EB /* TilesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TilesViewController.m; sourceTree = ""; }; 37 | 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 38 | 32CA4F630368D1EE00C91783 /* Tiles_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tiles_Prefix.pch; sourceTree = ""; }; 39 | 4E3848A3111B7FB700E6AEFC /* CALayer+Additions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CALayer+Additions.h"; sourceTree = ""; }; 40 | 4E3848A4111B7FB700E6AEFC /* CALayer+Additions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "CALayer+Additions.m"; sourceTree = ""; }; 41 | 4E3848FF111BA32D00E6AEFC /* NSString+Additions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Additions.h"; sourceTree = ""; }; 42 | 4E384900111BA32D00E6AEFC /* NSString+Additions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Additions.m"; sourceTree = ""; }; 43 | 4E384984111BB3BE00E6AEFC /* TilesIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TilesIcon.png; sourceTree = ""; }; 44 | 4EC0B94E111A51BC00E604BD /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 45 | 4EC0B9F6111A5AF200E604BD /* Tile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tile.h; sourceTree = ""; }; 46 | 4EC0B9F7111A5AF200E604BD /* Tile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Tile.m; sourceTree = ""; }; 47 | 4EC0BC79111AEF5300E604BD /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; 48 | 8D1107310486CEB800E47090 /* Tiles-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Tiles-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; 49 | /* End PBXFileReference section */ 50 | 51 | /* Begin PBXFrameworksBuildPhase section */ 52 | 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { 53 | isa = PBXFrameworksBuildPhase; 54 | buildActionMask = 2147483647; 55 | files = ( 56 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 57 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 58 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, 59 | 4EC0B94F111A51BC00E604BD /* QuartzCore.framework in Frameworks */, 60 | ); 61 | runOnlyForDeploymentPostprocessing = 0; 62 | }; 63 | /* End PBXFrameworksBuildPhase section */ 64 | 65 | /* Begin PBXGroup section */ 66 | 080E96DDFE201D6D7F000001 /* Classes */ = { 67 | isa = PBXGroup; 68 | children = ( 69 | 1D3623240D0F684500981E51 /* TilesAppDelegate.h */, 70 | 1D3623250D0F684500981E51 /* TilesAppDelegate.m */, 71 | 28D7ACF60DDB3853001CB0EB /* TilesViewController.h */, 72 | 28D7ACF70DDB3853001CB0EB /* TilesViewController.m */, 73 | 4EC0B9F6111A5AF200E604BD /* Tile.h */, 74 | 4EC0B9F7111A5AF200E604BD /* Tile.m */, 75 | 4E3848A3111B7FB700E6AEFC /* CALayer+Additions.h */, 76 | 4E3848A4111B7FB700E6AEFC /* CALayer+Additions.m */, 77 | 4E3848FF111BA32D00E6AEFC /* NSString+Additions.h */, 78 | 4E384900111BA32D00E6AEFC /* NSString+Additions.m */, 79 | ); 80 | path = Classes; 81 | sourceTree = ""; 82 | }; 83 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 1D6058910D05DD3D006BFB54 /* Tiles.app */, 87 | ); 88 | name = Products; 89 | sourceTree = ""; 90 | }; 91 | 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | 080E96DDFE201D6D7F000001 /* Classes */, 95 | 29B97315FDCFA39411CA2CEA /* Other Sources */, 96 | 29B97317FDCFA39411CA2CEA /* Resources-iPhone */, 97 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 98 | 19C28FACFE9D520D11CA2CBB /* Products */, 99 | ); 100 | name = CustomTemplate; 101 | sourceTree = ""; 102 | }; 103 | 29B97315FDCFA39411CA2CEA /* Other Sources */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 32CA4F630368D1EE00C91783 /* Tiles_Prefix.pch */, 107 | 29B97316FDCFA39411CA2CEA /* main.m */, 108 | ); 109 | name = "Other Sources"; 110 | sourceTree = ""; 111 | }; 112 | 29B97317FDCFA39411CA2CEA /* Resources-iPhone */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | 4E384984111BB3BE00E6AEFC /* TilesIcon.png */, 116 | 4EC0BC79111AEF5300E604BD /* Default.png */, 117 | 2899E5210DE3E06400AC0155 /* TilesViewController.xib */, 118 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */, 119 | 8D1107310486CEB800E47090 /* Tiles-Info.plist */, 120 | ); 121 | name = "Resources-iPhone"; 122 | sourceTree = ""; 123 | }; 124 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | 4EC0B94E111A51BC00E604BD /* QuartzCore.framework */, 128 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 129 | 1D30AB110D05D00D00671497 /* Foundation.framework */, 130 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */, 131 | ); 132 | name = Frameworks; 133 | sourceTree = ""; 134 | }; 135 | /* End PBXGroup section */ 136 | 137 | /* Begin PBXNativeTarget section */ 138 | 1D6058900D05DD3D006BFB54 /* Tiles */ = { 139 | isa = PBXNativeTarget; 140 | buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Tiles" */; 141 | buildPhases = ( 142 | 1D60588D0D05DD3D006BFB54 /* Resources */, 143 | 1D60588E0D05DD3D006BFB54 /* Sources */, 144 | 1D60588F0D05DD3D006BFB54 /* Frameworks */, 145 | ); 146 | buildRules = ( 147 | ); 148 | dependencies = ( 149 | ); 150 | name = Tiles; 151 | productName = Tiles; 152 | productReference = 1D6058910D05DD3D006BFB54 /* Tiles.app */; 153 | productType = "com.apple.product-type.application"; 154 | }; 155 | /* End PBXNativeTarget section */ 156 | 157 | /* Begin PBXProject section */ 158 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 159 | isa = PBXProject; 160 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Tiles" */; 161 | compatibilityVersion = "Xcode 3.1"; 162 | hasScannedForEncodings = 1; 163 | mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; 164 | projectDirPath = ""; 165 | projectRoot = ""; 166 | targets = ( 167 | 1D6058900D05DD3D006BFB54 /* Tiles */, 168 | ); 169 | }; 170 | /* End PBXProject section */ 171 | 172 | /* Begin PBXResourcesBuildPhase section */ 173 | 1D60588D0D05DD3D006BFB54 /* Resources */ = { 174 | isa = PBXResourcesBuildPhase; 175 | buildActionMask = 2147483647; 176 | files = ( 177 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, 178 | 2899E5220DE3E06400AC0155 /* TilesViewController.xib in Resources */, 179 | 4EC0BC7A111AEF5300E604BD /* Default.png in Resources */, 180 | 4E384985111BB3BE00E6AEFC /* TilesIcon.png in Resources */, 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | }; 184 | /* End PBXResourcesBuildPhase section */ 185 | 186 | /* Begin PBXSourcesBuildPhase section */ 187 | 1D60588E0D05DD3D006BFB54 /* Sources */ = { 188 | isa = PBXSourcesBuildPhase; 189 | buildActionMask = 2147483647; 190 | files = ( 191 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 192 | 1D3623260D0F684500981E51 /* TilesAppDelegate.m in Sources */, 193 | 28D7ACF80DDB3853001CB0EB /* TilesViewController.m in Sources */, 194 | 4EC0B9F8111A5AF200E604BD /* Tile.m in Sources */, 195 | 4E3848A5111B7FB700E6AEFC /* CALayer+Additions.m in Sources */, 196 | 4E384901111BA32D00E6AEFC /* NSString+Additions.m in Sources */, 197 | ); 198 | runOnlyForDeploymentPostprocessing = 0; 199 | }; 200 | /* End PBXSourcesBuildPhase section */ 201 | 202 | /* Begin XCBuildConfiguration section */ 203 | 1D6058940D05DD3E006BFB54 /* Debug */ = { 204 | isa = XCBuildConfiguration; 205 | buildSettings = { 206 | ALWAYS_SEARCH_USER_PATHS = NO; 207 | COPY_PHASE_STRIP = NO; 208 | GCC_DYNAMIC_NO_PIC = NO; 209 | GCC_OPTIMIZATION_LEVEL = 0; 210 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 211 | GCC_PREFIX_HEADER = Tiles_Prefix.pch; 212 | INFOPLIST_FILE = "Tiles-Info.plist"; 213 | PRODUCT_NAME = Tiles; 214 | }; 215 | name = Debug; 216 | }; 217 | 1D6058950D05DD3E006BFB54 /* Release */ = { 218 | isa = XCBuildConfiguration; 219 | buildSettings = { 220 | ALWAYS_SEARCH_USER_PATHS = NO; 221 | COPY_PHASE_STRIP = YES; 222 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 223 | GCC_PREFIX_HEADER = Tiles_Prefix.pch; 224 | INFOPLIST_FILE = "Tiles-Info.plist"; 225 | PRODUCT_NAME = Tiles; 226 | VALIDATE_PRODUCT = YES; 227 | }; 228 | name = Release; 229 | }; 230 | C01FCF4F08A954540054247B /* Debug */ = { 231 | isa = XCBuildConfiguration; 232 | buildSettings = { 233 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 234 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 235 | GCC_C_LANGUAGE_STANDARD = c99; 236 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 237 | GCC_WARN_UNUSED_VARIABLE = YES; 238 | PREBINDING = NO; 239 | SDKROOT = iphoneos3.2; 240 | }; 241 | name = Debug; 242 | }; 243 | C01FCF5008A954540054247B /* Release */ = { 244 | isa = XCBuildConfiguration; 245 | buildSettings = { 246 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 247 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 248 | GCC_C_LANGUAGE_STANDARD = c99; 249 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 250 | GCC_WARN_UNUSED_VARIABLE = YES; 251 | PREBINDING = NO; 252 | SDKROOT = iphoneos3.2; 253 | }; 254 | name = Release; 255 | }; 256 | /* End XCBuildConfiguration section */ 257 | 258 | /* Begin XCConfigurationList section */ 259 | 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Tiles" */ = { 260 | isa = XCConfigurationList; 261 | buildConfigurations = ( 262 | 1D6058940D05DD3E006BFB54 /* Debug */, 263 | 1D6058950D05DD3E006BFB54 /* Release */, 264 | ); 265 | defaultConfigurationIsVisible = 0; 266 | defaultConfigurationName = Release; 267 | }; 268 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Tiles" */ = { 269 | isa = XCConfigurationList; 270 | buildConfigurations = ( 271 | C01FCF4F08A954540054247B /* Debug */, 272 | C01FCF5008A954540054247B /* Release */, 273 | ); 274 | defaultConfigurationIsVisible = 0; 275 | defaultConfigurationName = Release; 276 | }; 277 | /* End XCConfigurationList section */ 278 | }; 279 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 280 | } 281 | -------------------------------------------------------------------------------- /TilesViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 800 5 | 10C540 6 | 759 7 | 1038.25 8 | 458.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 79 12 | 13 | 14 | YES 15 | 16 | 17 | 18 | YES 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | YES 23 | 24 | YES 25 | 26 | 27 | YES 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | IBCocoaTouchFramework 35 | 36 | 37 | IBFirstResponder 38 | IBCocoaTouchFramework 39 | 40 | 41 | 42 | 274 43 | {320, 460} 44 | 45 | 46 | 1 47 | MCAwIDAAA 48 | 49 | NO 50 | 51 | 2 52 | 53 | IBCocoaTouchFramework 54 | 55 | 56 | 57 | 58 | YES 59 | 60 | 61 | view 62 | 63 | 64 | 65 | 7 66 | 67 | 68 | 69 | 70 | YES 71 | 72 | 0 73 | 74 | 75 | 76 | 77 | 78 | -1 79 | 80 | 81 | File's Owner 82 | 83 | 84 | -2 85 | 86 | 87 | 88 | 89 | 6 90 | 91 | 92 | 93 | 94 | 95 | 96 | YES 97 | 98 | YES 99 | -1.CustomClassName 100 | -2.CustomClassName 101 | 6.IBEditorWindowLastContentRect 102 | 6.IBPluginDependency 103 | 104 | 105 | YES 106 | TilesViewController 107 | UIResponder 108 | {{239, 376}, {320, 480}} 109 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 110 | 111 | 112 | 113 | YES 114 | 115 | 116 | YES 117 | 118 | 119 | 120 | 121 | YES 122 | 123 | 124 | YES 125 | 126 | 127 | 128 | 7 129 | 130 | 131 | 132 | YES 133 | 134 | TilesViewController 135 | UIViewController 136 | 137 | IBProjectSource 138 | Classes/TilesViewController.h 139 | 140 | 141 | 142 | 143 | YES 144 | 145 | NSObject 146 | 147 | IBFrameworkSource 148 | Foundation.framework/Headers/NSError.h 149 | 150 | 151 | 152 | NSObject 153 | 154 | IBFrameworkSource 155 | Foundation.framework/Headers/NSFileManager.h 156 | 157 | 158 | 159 | NSObject 160 | 161 | IBFrameworkSource 162 | Foundation.framework/Headers/NSKeyValueCoding.h 163 | 164 | 165 | 166 | NSObject 167 | 168 | IBFrameworkSource 169 | Foundation.framework/Headers/NSKeyValueObserving.h 170 | 171 | 172 | 173 | NSObject 174 | 175 | IBFrameworkSource 176 | Foundation.framework/Headers/NSKeyedArchiver.h 177 | 178 | 179 | 180 | NSObject 181 | 182 | IBFrameworkSource 183 | Foundation.framework/Headers/NSNetServices.h 184 | 185 | 186 | 187 | NSObject 188 | 189 | IBFrameworkSource 190 | Foundation.framework/Headers/NSObject.h 191 | 192 | 193 | 194 | NSObject 195 | 196 | IBFrameworkSource 197 | Foundation.framework/Headers/NSPort.h 198 | 199 | 200 | 201 | NSObject 202 | 203 | IBFrameworkSource 204 | Foundation.framework/Headers/NSRunLoop.h 205 | 206 | 207 | 208 | NSObject 209 | 210 | IBFrameworkSource 211 | Foundation.framework/Headers/NSStream.h 212 | 213 | 214 | 215 | NSObject 216 | 217 | IBFrameworkSource 218 | Foundation.framework/Headers/NSThread.h 219 | 220 | 221 | 222 | NSObject 223 | 224 | IBFrameworkSource 225 | Foundation.framework/Headers/NSURL.h 226 | 227 | 228 | 229 | NSObject 230 | 231 | IBFrameworkSource 232 | Foundation.framework/Headers/NSURLConnection.h 233 | 234 | 235 | 236 | NSObject 237 | 238 | IBFrameworkSource 239 | Foundation.framework/Headers/NSXMLParser.h 240 | 241 | 242 | 243 | NSObject 244 | 245 | IBFrameworkSource 246 | QuartzCore.framework/Headers/CAAnimation.h 247 | 248 | 249 | 250 | NSObject 251 | 252 | IBFrameworkSource 253 | QuartzCore.framework/Headers/CALayer.h 254 | 255 | 256 | 257 | NSObject 258 | 259 | IBFrameworkSource 260 | UIKit.framework/Headers/UIAccessibility.h 261 | 262 | 263 | 264 | NSObject 265 | 266 | IBFrameworkSource 267 | UIKit.framework/Headers/UINibLoading.h 268 | 269 | 270 | 271 | NSObject 272 | 273 | IBFrameworkSource 274 | UIKit.framework/Headers/UIResponder.h 275 | 276 | 277 | 278 | UIResponder 279 | NSObject 280 | 281 | 282 | 283 | UISearchBar 284 | UIView 285 | 286 | IBFrameworkSource 287 | UIKit.framework/Headers/UISearchBar.h 288 | 289 | 290 | 291 | UISearchDisplayController 292 | NSObject 293 | 294 | IBFrameworkSource 295 | UIKit.framework/Headers/UISearchDisplayController.h 296 | 297 | 298 | 299 | UIView 300 | 301 | IBFrameworkSource 302 | UIKit.framework/Headers/UITextField.h 303 | 304 | 305 | 306 | UIView 307 | UIResponder 308 | 309 | IBFrameworkSource 310 | UIKit.framework/Headers/UIView.h 311 | 312 | 313 | 314 | UIViewController 315 | 316 | IBFrameworkSource 317 | UIKit.framework/Headers/UINavigationController.h 318 | 319 | 320 | 321 | UIViewController 322 | 323 | IBFrameworkSource 324 | UIKit.framework/Headers/UIPopoverController.h 325 | 326 | 327 | 328 | UIViewController 329 | 330 | IBFrameworkSource 331 | UIKit.framework/Headers/UISplitViewController.h 332 | 333 | 334 | 335 | UIViewController 336 | 337 | IBFrameworkSource 338 | UIKit.framework/Headers/UITabBarController.h 339 | 340 | 341 | 342 | UIViewController 343 | UIResponder 344 | 345 | IBFrameworkSource 346 | UIKit.framework/Headers/UIViewController.h 347 | 348 | 349 | 350 | 351 | 0 352 | IBCocoaTouchFramework 353 | 354 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 355 | 356 | 357 | 358 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 359 | 360 | 361 | YES 362 | Tiles.xcodeproj 363 | 3 364 | 79 365 | 366 | 367 | 368 | --------------------------------------------------------------------------------