Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

first committed

  • Loading branch information...
commit 4da81ba98bc8d3e614d7abea32edc2db4246b284 0 parents
@shichangone authored
BIN  1.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 SCGIFImageView.h
@@ -0,0 +1,61 @@
+//
+// SCGIFImageView.h
+// TestGIF
+//
+// Created by shichangone on 11-7-12.
+// Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface AnimatedGifFrame : NSObject
+{
+ NSData *data;
+ NSData *header;
+ double delay;
+ int disposalMethod;
+ CGRect area;
+}
+
+@property (nonatomic, copy) NSData *header;
+@property (nonatomic, copy) NSData *data;
+@property (nonatomic) double delay;
+@property (nonatomic) int disposalMethod;
+@property (nonatomic) CGRect area;
+
+@end
+
+@interface SCGIFImageView : UIImageView {
+ NSData *GIF_pointer;
+ NSMutableData *GIF_buffer;
+ NSMutableData *GIF_screen;
+ NSMutableData *GIF_global;
+ NSMutableArray *GIF_frames;
+
+ int GIF_sorted;
+ int GIF_colorS;
+ int GIF_colorC;
+ int GIF_colorF;
+ int animatedGifDelay;
+
+ int dataPointer;
+}
+@property (nonatomic, retain) NSMutableArray *GIF_frames;
+
+- (id)initWithGIFFile:(NSString*)gifFilePath;
+- (id)initWithGIFData:(NSData*)gifImageData;
+
+- (void)loadImageData;
+
++ (NSMutableArray*)getGifFrames:(NSData*)gifImageData;
++ (BOOL)isGifImage:(NSData*)imageData;
+
+- (void) decodeGIF:(NSData *)GIFData;
+- (void) GIFReadExtensions;
+- (void) GIFReadDescriptor;
+- (bool) GIFGetBytes:(int)length;
+- (bool) GIFSkipBytes: (int) length;
+- (NSData*) getFrameAsDataAtIndex:(int)index;
+- (UIImage*) getFrameAsImageAtIndex:(int)index;
+
+@end
544 SCGIFImageView.m
@@ -0,0 +1,544 @@
+//
+// SCGIFImageView.m
+// TestGIF
+//
+// Created by shichangone on 11-7-12.
+// Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import "SCGIFImageView.h"
+
+@implementation AnimatedGifFrame
+
+@synthesize data, delay, disposalMethod, area, header;
+
+- (void) dealloc
+{
+ [data release];
+ [header release];
+ [super dealloc];
+}
+
+@end
+
+@implementation SCGIFImageView
+@synthesize GIF_frames;
+
++ (BOOL)isGifImage:(NSData*)imageData {
+ const char* buf = (const char*)[imageData bytes];
+ if (buf[0] == 0x47 && buf[1] == 0x49 && buf[2] == 0x46 && buf[3] == 0x38) {
+ return YES;
+ }
+ return NO;
+}
+
++ (NSMutableArray*)getGifFrames:(NSData*)gifImageData {
+ SCGIFImageView* gifImageView = [[SCGIFImageView alloc] initWithGIFData:gifImageData];
+ if (!gifImageView) {
+ return nil;
+ }
+
+ NSMutableArray* gifFrames = gifImageView.GIF_frames;
+ [[gifFrames retain] autorelease];
+ [gifImageView release];
+ return gifFrames;
+}
+
+- (id)initWithGIFFile:(NSString*)gifFilePath {
+ NSData* imageData = [NSData dataWithContentsOfFile:gifFilePath];
+ return [self initWithGIFData:imageData];
+}
+
+- (id)initWithGIFData:(NSData*)gifImageData {
+ if (gifImageData.length < 4) {
+ return nil;
+ }
+
+ if (![SCGIFImageView isGifImage:gifImageData]) {
+ UIImage* image = [UIImage imageWithData:gifImageData];
+ return [super initWithImage:image];
+ }
+
+ [self decodeGIF:gifImageData];
+
+ if (GIF_frames.count <= 0) {
+ UIImage* image = [UIImage imageWithData:gifImageData];
+ return [super initWithImage:image];
+ }
+
+ self = [super init];
+ if (self) {
+ [self loadImageData];
+ }
+
+ return self;
+}
+
+- (void)setGIF_frames:(NSMutableArray *)gifFrames {
+ [gifFrames retain];
+
+ if (GIF_frames) {
+ [GIF_frames release];
+ }
+ GIF_frames = gifFrames;
+
+ [self loadImageData];
+}
+
+- (void)loadImageData {
+ // Add all subframes to the animation
+ NSMutableArray *array = [[NSMutableArray alloc] init];
+ for (NSUInteger i = 0; i < [GIF_frames count]; i++)
+ {
+ [array addObject: [self getFrameAsImageAtIndex:i]];
+ }
+
+ NSMutableArray *overlayArray = [[NSMutableArray alloc] init];
+ UIImage *firstImage = [array objectAtIndex:0];
+ CGSize size = firstImage.size;
+ CGRect rect = CGRectZero;
+ rect.size = size;
+
+ UIGraphicsBeginImageContext(size);
+ CGContextRef ctx = UIGraphicsGetCurrentContext();
+
+ int i = 0;
+ AnimatedGifFrame *lastFrame = nil;
+ for (UIImage *image in array)
+ {
+ // Get Frame
+ AnimatedGifFrame *frame = [GIF_frames objectAtIndex:i];
+
+ // Initialize Flag
+ UIImage *previousCanvas = nil;
+
+ // Save Context
+ CGContextSaveGState(ctx);
+ // Change CTM
+ CGContextScaleCTM(ctx, 1.0, -1.0);
+ CGContextTranslateCTM(ctx, 0.0, -size.height);
+
+ // Check if lastFrame exists
+ CGRect clipRect;
+
+ // Disposal Method (Operations before draw frame)
+ switch (frame.disposalMethod)
+ {
+ case 1: // Do not dispose (draw over context)
+ // Create Rect (y inverted) to clipping
+ clipRect = CGRectMake(frame.area.origin.x, size.height - frame.area.size.height - frame.area.origin.y, frame.area.size.width, frame.area.size.height);
+ // Clip Context
+ CGContextClipToRect(ctx, clipRect);
+ break;
+ case 2: // Restore to background the rect when the actual frame will go to be drawed
+ // Create Rect (y inverted) to clipping
+ clipRect = CGRectMake(frame.area.origin.x, size.height - frame.area.size.height - frame.area.origin.y, frame.area.size.width, frame.area.size.height);
+ // Clip Context
+ CGContextClipToRect(ctx, clipRect);
+ break;
+ case 3: // Restore to Previous
+ // Get Canvas
+ previousCanvas = UIGraphicsGetImageFromCurrentImageContext();
+
+ // Create Rect (y inverted) to clipping
+ clipRect = CGRectMake(frame.area.origin.x, size.height - frame.area.size.height - frame.area.origin.y, frame.area.size.width, frame.area.size.height);
+ // Clip Context
+ CGContextClipToRect(ctx, clipRect);
+ break;
+ }
+
+ // Draw Actual Frame
+ CGContextDrawImage(ctx, rect, image.CGImage);
+ // Restore State
+ CGContextRestoreGState(ctx);
+
+ //delay must larger than 0, the minimum delay in firefox is 10.
+ if (frame.delay <= 0) {
+ frame.delay = 10;
+ }
+ [overlayArray addObject:UIGraphicsGetImageFromCurrentImageContext()];
+
+ // Set Last Frame
+ lastFrame = frame;
+
+ // Disposal Method (Operations afte draw frame)
+ switch (frame.disposalMethod)
+ {
+ case 2: // Restore to background color the zone of the actual frame
+ // Save Context
+ CGContextSaveGState(ctx);
+ // Change CTM
+ CGContextScaleCTM(ctx, 1.0, -1.0);
+ CGContextTranslateCTM(ctx, 0.0, -size.height);
+ // Clear Context
+ CGContextClearRect(ctx, clipRect);
+ // Restore Context
+ CGContextRestoreGState(ctx);
+ break;
+ case 3: // Restore to Previous Canvas
+ // Save Context
+ CGContextSaveGState(ctx);
+ // Change CTM
+ CGContextScaleCTM(ctx, 1.0, -1.0);
+ CGContextTranslateCTM(ctx, 0.0, -size.height);
+ // Clear Context
+ CGContextClearRect(ctx, lastFrame.area);
+ // Draw previous frame
+ CGContextDrawImage(ctx, rect, previousCanvas.CGImage);
+ // Restore State
+ CGContextRestoreGState(ctx);
+ break;
+ }
+
+ // Increment counter
+ i++;
+ }
+ UIGraphicsEndImageContext();
+
+ [self setImage:[overlayArray objectAtIndex:0]];
+ [self setAnimationImages:overlayArray];
+
+ [overlayArray release];
+ [array release];
+
+ // Count up the total delay, since Cocoa doesn't do per frame delays.
+ double total = 0;
+ for (AnimatedGifFrame *frame in GIF_frames) {
+ total += frame.delay;
+ }
+
+ // GIFs store the delays as 1/100th of a second,
+ // UIImageViews want it in seconds.
+ [self setAnimationDuration:total/100];
+
+ // Repeat infinite
+ [self setAnimationRepeatCount:0];
+
+ [self startAnimating];
+}
+
+- (void)dealloc {
+ if (GIF_buffer != nil)
+ {
+ [GIF_buffer release];
+ }
+
+ if (GIF_screen != nil)
+ {
+ [GIF_screen release];
+ }
+
+ if (GIF_global != nil)
+ {
+ [GIF_global release];
+ }
+
+ [GIF_frames release];
+
+ [super dealloc];
+}
+
+- (void) decodeGIF:(NSData *)GIFData {
+ GIF_pointer = GIFData;
+
+ if (GIF_buffer != nil)
+ {
+ [GIF_buffer release];
+ }
+
+ if (GIF_global != nil)
+ {
+ [GIF_global release];
+ }
+
+ if (GIF_screen != nil)
+ {
+ [GIF_screen release];
+ }
+
+ [GIF_frames release];
+
+ GIF_buffer = [[NSMutableData alloc] init];
+ GIF_global = [[NSMutableData alloc] init];
+ GIF_screen = [[NSMutableData alloc] init];
+ GIF_frames = [[NSMutableArray alloc] init];
+
+ // Reset file counters to 0
+ dataPointer = 0;
+
+ [self GIFSkipBytes: 6]; // GIF89a, throw away
+ [self GIFGetBytes: 7]; // Logical Screen Descriptor
+
+ // Deep copy
+ [GIF_screen setData: GIF_buffer];
+
+ // Copy the read bytes into a local buffer on the stack
+ // For easy byte access in the following lines.
+ int length = [GIF_buffer length];
+ unsigned char aBuffer[length];
+ [GIF_buffer getBytes:aBuffer length:length];
+
+ if (aBuffer[4] & 0x80) GIF_colorF = 1; else GIF_colorF = 0;
+ if (aBuffer[4] & 0x08) GIF_sorted = 1; else GIF_sorted = 0;
+ GIF_colorC = (aBuffer[4] & 0x07);
+ GIF_colorS = 2 << GIF_colorC;
+
+ if (GIF_colorF == 1)
+ {
+ [self GIFGetBytes: (3 * GIF_colorS)];
+
+ // Deep copy
+ [GIF_global setData:GIF_buffer];
+ }
+
+ unsigned char bBuffer[1];
+ while ([self GIFGetBytes:1] == YES)
+ {
+ [GIF_buffer getBytes:bBuffer length:1];
+
+ if (bBuffer[0] == 0x3B)
+ { // This is the end
+ break;
+ }
+
+ switch (bBuffer[0])
+ {
+ case 0x21:
+ // Graphic Control Extension (#n of n)
+ [self GIFReadExtensions];
+ break;
+ case 0x2C:
+ // Image Descriptor (#n of n)
+ [self GIFReadDescriptor];
+ break;
+ }
+ }
+
+ // clean up stuff
+ [GIF_buffer release];
+ GIF_buffer = nil;
+
+ [GIF_screen release];
+ GIF_screen = nil;
+
+ [GIF_global release];
+ GIF_global = nil;
+}
+
+- (void) GIFReadExtensions {
+ // 21! But we still could have an Application Extension,
+ // so we want to check for the full signature.
+ unsigned char cur[1], prev[1];
+ [self GIFGetBytes:1];
+ [GIF_buffer getBytes:cur length:1];
+
+ while (cur[0] != 0x00)
+ {
+
+ // TODO: Known bug, the sequence F9 04 could occur in the Application Extension, we
+ // should check whether this combo follows directly after the 21.
+ if (cur[0] == 0x04 && prev[0] == 0xF9)
+ {
+ [self GIFGetBytes:5];
+
+ AnimatedGifFrame *frame = [[AnimatedGifFrame alloc] init];
+
+ unsigned char buffer[5];
+ [GIF_buffer getBytes:buffer length:5];
+ frame.disposalMethod = (buffer[0] & 0x1c) >> 2;
+ //NSLog(@"flags=%x, dm=%x", (int)(buffer[0]), frame.disposalMethod);
+
+ // We save the delays for easy access.
+ frame.delay = (buffer[1] | buffer[2] << 8);
+
+ unsigned char board[8];
+ board[0] = 0x21;
+ board[1] = 0xF9;
+ board[2] = 0x04;
+
+ for(int i = 3, a = 0; a < 5; i++, a++)
+ {
+ board[i] = buffer[a];
+ }
+
+ frame.header = [NSData dataWithBytes:board length:8];
+
+ [GIF_frames addObject:frame];
+ [frame release];
+ break;
+ }
+
+ prev[0] = cur[0];
+ [self GIFGetBytes:1];
+ [GIF_buffer getBytes:cur length:1];
+ }
+}
+
+- (void) GIFReadDescriptor {
+ [self GIFGetBytes:9];
+
+ // Deep copy
+ NSMutableData *GIF_screenTmp = [NSMutableData dataWithData:GIF_buffer];
+
+ unsigned char aBuffer[9];
+ [GIF_buffer getBytes:aBuffer length:9];
+
+ CGRect rect;
+ rect.origin.x = ((int)aBuffer[1] << 8) | aBuffer[0];
+ rect.origin.y = ((int)aBuffer[3] << 8) | aBuffer[2];
+ rect.size.width = ((int)aBuffer[5] << 8) | aBuffer[4];
+ rect.size.height = ((int)aBuffer[7] << 8) | aBuffer[6];
+
+ AnimatedGifFrame *frame = [GIF_frames lastObject];
+ frame.area = rect;
+
+ if (aBuffer[8] & 0x80) GIF_colorF = 1; else GIF_colorF = 0;
+
+ unsigned char GIF_code = GIF_colorC, GIF_sort = GIF_sorted;
+
+ if (GIF_colorF == 1)
+ {
+ GIF_code = (aBuffer[8] & 0x07);
+
+ if (aBuffer[8] & 0x20)
+ {
+ GIF_sort = 1;
+ }
+ else
+ {
+ GIF_sort = 0;
+ }
+ }
+
+ int GIF_size = (2 << GIF_code);
+
+ size_t blength = [GIF_screen length];
+ unsigned char bBuffer[blength];
+ [GIF_screen getBytes:bBuffer length:blength];
+
+ bBuffer[4] = (bBuffer[4] & 0x70);
+ bBuffer[4] = (bBuffer[4] | 0x80);
+ bBuffer[4] = (bBuffer[4] | GIF_code);
+
+ if (GIF_sort)
+ {
+ bBuffer[4] |= 0x08;
+ }
+
+ NSMutableData *GIF_string = [NSMutableData dataWithData:[[NSString stringWithString:@"GIF89a"] dataUsingEncoding: NSUTF8StringEncoding]];
+ [GIF_screen setData:[NSData dataWithBytes:bBuffer length:blength]];
+ [GIF_string appendData: GIF_screen];
+
+ if (GIF_colorF == 1)
+ {
+ [self GIFGetBytes:(3 * GIF_size)];
+ [GIF_string appendData:GIF_buffer];
+ }
+ else
+ {
+ [GIF_string appendData:GIF_global];
+ }
+
+ // Add Graphic Control Extension Frame (for transparancy)
+ [GIF_string appendData:frame.header];
+
+ char endC = 0x2c;
+ [GIF_string appendBytes:&endC length:sizeof(endC)];
+
+ size_t clength = [GIF_screenTmp length];
+ unsigned char cBuffer[clength];
+ [GIF_screenTmp getBytes:cBuffer length:clength];
+
+ cBuffer[8] &= 0x40;
+
+ [GIF_screenTmp setData:[NSData dataWithBytes:cBuffer length:clength]];
+
+ [GIF_string appendData: GIF_screenTmp];
+ [self GIFGetBytes:1];
+ [GIF_string appendData: GIF_buffer];
+
+ while (true)
+ {
+ [self GIFGetBytes:1];
+ [GIF_string appendData: GIF_buffer];
+
+ unsigned char dBuffer[1];
+ [GIF_buffer getBytes:dBuffer length:1];
+
+ long u = (long) dBuffer[0];
+
+ if (u != 0x00)
+ {
+ [self GIFGetBytes:u];
+ [GIF_string appendData: GIF_buffer];
+ }
+ else
+ {
+ break;
+ }
+
+ }
+
+ endC = 0x3b;
+ [GIF_string appendBytes:&endC length:sizeof(endC)];
+
+ // save the frame into the array of frames
+ frame.data = GIF_string;
+}
+
+- (bool) GIFGetBytes:(int)length {
+ if (GIF_buffer != nil)
+ {
+ [GIF_buffer release]; // Release old buffer
+ GIF_buffer = nil;
+ }
+
+ if ((NSInteger)[GIF_pointer length] >= dataPointer + length) // Don't read across the edge of the file..
+ {
+ GIF_buffer = [[GIF_pointer subdataWithRange:NSMakeRange(dataPointer, length)] retain];
+ dataPointer += length;
+ return YES;
+ }
+ else
+ {
+ return NO;
+ }
+}
+
+- (bool) GIFSkipBytes: (int) length {
+ if ((NSInteger)[GIF_pointer length] >= dataPointer + length)
+ {
+ dataPointer += length;
+ return YES;
+ }
+ else
+ {
+ return NO;
+ }
+}
+
+- (NSData*) getFrameAsDataAtIndex:(int)index {
+ if (index < (NSInteger)[GIF_frames count])
+ {
+ return ((AnimatedGifFrame *)[GIF_frames objectAtIndex:index]).data;
+ }
+ else
+ {
+ return nil;
+ }
+}
+
+- (UIImage*) getFrameAsImageAtIndex:(int)index {
+ NSData *frameData = [self getFrameAsDataAtIndex: index];
+ UIImage *image = nil;
+
+ if (frameData != nil)
+ {
+ image = [UIImage imageWithData:frameData];
+ }
+
+ return image;
+}
+
+
+@end
38 SCGifExample-Info.plist
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.wsc.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>NSMainNibFile</key>
+ <string>MainWindow</string>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
14 SCGifExample-Prefix.pch
@@ -0,0 +1,14 @@
+//
+// Prefix header for all source files of the 'SCGifExample' target in the 'SCGifExample' project
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_3_0
+#warning "This project uses features only available in iPhone SDK 3.0 and later."
+#endif
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+#endif
301 SCGifExample.xcodeproj/project.pbxproj
@@ -0,0 +1,301 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 8C5CE826148F3E4900B71B27 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C5CE825148F3E4900B71B27 /* UIKit.framework */; };
+ 8C5CE828148F3E4900B71B27 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C5CE827148F3E4900B71B27 /* Foundation.framework */; };
+ 8C5CE82A148F3E4900B71B27 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C5CE829148F3E4900B71B27 /* CoreGraphics.framework */; };
+ 8C5CE85B148F469600B71B27 /* 1.gif in Resources */ = {isa = PBXBuildFile; fileRef = 8C5CE84E148F469600B71B27 /* 1.gif */; };
+ 8C5CE85C148F469600B71B27 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C5CE84F148F469600B71B27 /* main.m */; };
+ 8C5CE85D148F469600B71B27 /* SCGifExample-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 8C5CE850148F469600B71B27 /* SCGifExample-Info.plist */; };
+ 8C5CE85E148F469600B71B27 /* SCGifExampleAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C5CE856148F469600B71B27 /* SCGifExampleAppDelegate.m */; };
+ 8C5CE85F148F469600B71B27 /* SCGifExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C5CE858148F469600B71B27 /* SCGifExampleViewController.m */; };
+ 8C5CE860148F469600B71B27 /* SCGIFImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C5CE85A148F469600B71B27 /* SCGIFImageView.m */; };
+ 8C5CE868148F470F00B71B27 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8C5CE866148F470F00B71B27 /* InfoPlist.strings */; };
+ 8C5CE86E148F471500B71B27 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8C5CE86A148F471500B71B27 /* MainWindow.xib */; };
+ 8C5CE86F148F471500B71B27 /* SCGifExampleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8C5CE86C148F471500B71B27 /* SCGifExampleViewController.xib */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 8C5CE821148F3E4900B71B27 /* SCGifExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SCGifExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 8C5CE825148F3E4900B71B27 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ 8C5CE827148F3E4900B71B27 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 8C5CE829148F3E4900B71B27 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ 8C5CE84E148F469600B71B27 /* 1.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = 1.gif; sourceTree = SOURCE_ROOT; };
+ 8C5CE84F148F469600B71B27 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = SOURCE_ROOT; };
+ 8C5CE850148F469600B71B27 /* SCGifExample-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "SCGifExample-Info.plist"; sourceTree = SOURCE_ROOT; };
+ 8C5CE851148F469600B71B27 /* SCGifExample-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SCGifExample-Prefix.pch"; sourceTree = SOURCE_ROOT; };
+ 8C5CE855148F469600B71B27 /* SCGifExampleAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCGifExampleAppDelegate.h; sourceTree = SOURCE_ROOT; };
+ 8C5CE856148F469600B71B27 /* SCGifExampleAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCGifExampleAppDelegate.m; sourceTree = SOURCE_ROOT; };
+ 8C5CE857148F469600B71B27 /* SCGifExampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCGifExampleViewController.h; sourceTree = SOURCE_ROOT; };
+ 8C5CE858148F469600B71B27 /* SCGifExampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCGifExampleViewController.m; sourceTree = SOURCE_ROOT; };
+ 8C5CE859148F469600B71B27 /* SCGIFImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCGIFImageView.h; sourceTree = SOURCE_ROOT; };
+ 8C5CE85A148F469600B71B27 /* SCGIFImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SCGIFImageView.m; sourceTree = SOURCE_ROOT; };
+ 8C5CE867148F470F00B71B27 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = SOURCE_ROOT; };
+ 8C5CE86B148F471500B71B27 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindow.xib; sourceTree = SOURCE_ROOT; };
+ 8C5CE86D148F471500B71B27 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/SCGifExampleViewController.xib; sourceTree = SOURCE_ROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 8C5CE81E148F3E4900B71B27 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8C5CE826148F3E4900B71B27 /* UIKit.framework in Frameworks */,
+ 8C5CE828148F3E4900B71B27 /* Foundation.framework in Frameworks */,
+ 8C5CE82A148F3E4900B71B27 /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 8C5CE816148F3E4900B71B27 = {
+ isa = PBXGroup;
+ children = (
+ 8C5CE82B148F3E4900B71B27 /* SCGifExample */,
+ 8C5CE824148F3E4900B71B27 /* Frameworks */,
+ 8C5CE822148F3E4900B71B27 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 8C5CE822148F3E4900B71B27 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 8C5CE821148F3E4900B71B27 /* SCGifExample.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 8C5CE824148F3E4900B71B27 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 8C5CE825148F3E4900B71B27 /* UIKit.framework */,
+ 8C5CE827148F3E4900B71B27 /* Foundation.framework */,
+ 8C5CE829148F3E4900B71B27 /* CoreGraphics.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 8C5CE82B148F3E4900B71B27 /* SCGifExample */ = {
+ isa = PBXGroup;
+ children = (
+ 8C5CE84E148F469600B71B27 /* 1.gif */,
+ 8C5CE855148F469600B71B27 /* SCGifExampleAppDelegate.h */,
+ 8C5CE856148F469600B71B27 /* SCGifExampleAppDelegate.m */,
+ 8C5CE857148F469600B71B27 /* SCGifExampleViewController.h */,
+ 8C5CE858148F469600B71B27 /* SCGifExampleViewController.m */,
+ 8C5CE859148F469600B71B27 /* SCGIFImageView.h */,
+ 8C5CE85A148F469600B71B27 /* SCGIFImageView.m */,
+ 8C5CE86A148F471500B71B27 /* MainWindow.xib */,
+ 8C5CE86C148F471500B71B27 /* SCGifExampleViewController.xib */,
+ 8C5CE82C148F3E4900B71B27 /* Supporting Files */,
+ );
+ path = SCGifExample;
+ sourceTree = "<group>";
+ };
+ 8C5CE82C148F3E4900B71B27 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 8C5CE866148F470F00B71B27 /* InfoPlist.strings */,
+ 8C5CE84F148F469600B71B27 /* main.m */,
+ 8C5CE850148F469600B71B27 /* SCGifExample-Info.plist */,
+ 8C5CE851148F469600B71B27 /* SCGifExample-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 8C5CE820148F3E4900B71B27 /* SCGifExample */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 8C5CE842148F3E4900B71B27 /* Build configuration list for PBXNativeTarget "SCGifExample" */;
+ buildPhases = (
+ 8C5CE81D148F3E4900B71B27 /* Sources */,
+ 8C5CE81E148F3E4900B71B27 /* Frameworks */,
+ 8C5CE81F148F3E4900B71B27 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = SCGifExample;
+ productName = SCGifExample;
+ productReference = 8C5CE821148F3E4900B71B27 /* SCGifExample.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 8C5CE818148F3E4900B71B27 /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = 8C5CE81B148F3E4900B71B27 /* Build configuration list for PBXProject "SCGifExample" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 8C5CE816148F3E4900B71B27;
+ productRefGroup = 8C5CE822148F3E4900B71B27 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 8C5CE820148F3E4900B71B27 /* SCGifExample */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 8C5CE81F148F3E4900B71B27 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8C5CE85B148F469600B71B27 /* 1.gif in Resources */,
+ 8C5CE85D148F469600B71B27 /* SCGifExample-Info.plist in Resources */,
+ 8C5CE868148F470F00B71B27 /* InfoPlist.strings in Resources */,
+ 8C5CE86E148F471500B71B27 /* MainWindow.xib in Resources */,
+ 8C5CE86F148F471500B71B27 /* SCGifExampleViewController.xib in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 8C5CE81D148F3E4900B71B27 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8C5CE85C148F469600B71B27 /* main.m in Sources */,
+ 8C5CE85E148F469600B71B27 /* SCGifExampleAppDelegate.m in Sources */,
+ 8C5CE85F148F469600B71B27 /* SCGifExampleViewController.m in Sources */,
+ 8C5CE860148F469600B71B27 /* SCGIFImageView.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 8C5CE866148F470F00B71B27 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 8C5CE867148F470F00B71B27 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 8C5CE86A148F471500B71B27 /* MainWindow.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 8C5CE86B148F471500B71B27 /* en */,
+ );
+ name = MainWindow.xib;
+ sourceTree = "<group>";
+ };
+ 8C5CE86C148F471500B71B27 /* SCGifExampleViewController.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 8C5CE86D148F471500B71B27 /* en */,
+ );
+ name = SCGifExampleViewController.xib;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 8C5CE840148F3E4900B71B27 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvmgcc42;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ 8C5CE841148F3E4900B71B27 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_VERSION = com.apple.compilers.llvmgcc42;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ SDKROOT = iphoneos;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 8C5CE843148F3E4900B71B27 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "SCGifExample-Prefix.pch";
+ INFOPLIST_FILE = "SCGifExample-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ 8C5CE844148F3E4900B71B27 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "SCGifExample-Prefix.pch";
+ INFOPLIST_FILE = "SCGifExample-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 8C5CE81B148F3E4900B71B27 /* Build configuration list for PBXProject "SCGifExample" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 8C5CE840148F3E4900B71B27 /* Debug */,
+ 8C5CE841148F3E4900B71B27 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 8C5CE842148F3E4900B71B27 /* Build configuration list for PBXNativeTarget "SCGifExample" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 8C5CE843148F3E4900B71B27 /* Debug */,
+ 8C5CE844148F3E4900B71B27 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 8C5CE818148F3E4900B71B27 /* Project object */;
+}
7 SCGifExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:SCGifExample.xcodeproj">
+ </FileRef>
+</Workspace>
8,033 SCGifExample.xcodeproj/project.xcworkspace/xcuserdata/jackie.xcuserdatad/UserInterfaceState.xcuserstate
8,033 additions, 0 deletions not shown
10 SCGifExample.xcodeproj/project.xcworkspace/xcuserdata/jackie.xcuserdatad/WorkspaceSettings.xcsettings
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IDEWorkspaceUserSettings_HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges</key>
+ <true/>
+ <key>IDEWorkspaceUserSettings_SnapshotAutomaticallyBeforeSignificantChanges</key>
+ <false/>
+</dict>
+</plist>
72 SCGifExample.xcodeproj/xcuserdata/jackie.xcuserdatad/xcschemes/SCGifExample.xcscheme
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "8C5CE820148F3E4900B71B27"
+ BuildableName = "SCGifExample.app"
+ BlueprintName = "SCGifExample"
+ ReferencedContainer = "container:SCGifExample.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "8C5CE820148F3E4900B71B27"
+ BuildableName = "SCGifExample.app"
+ BlueprintName = "SCGifExample"
+ ReferencedContainer = "container:SCGifExample.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "8C5CE820148F3E4900B71B27"
+ BuildableName = "SCGifExample.app"
+ BlueprintName = "SCGifExample"
+ ReferencedContainer = "container:SCGifExample.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
22 SCGifExample.xcodeproj/xcuserdata/jackie.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>SCGifExample.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict>
+ <key>8C5CE820148F3E4900B71B27</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ </dict>
+</dict>
+</plist>
19 SCGifExampleAppDelegate.h
@@ -0,0 +1,19 @@
+//
+// SCGifExampleAppDelegate.h
+// SCGifExample
+//
+// Created by on 11-12-7.
+// Copyright 2011年 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class SCGifExampleViewController;
+
+@interface SCGifExampleAppDelegate : NSObject <UIApplicationDelegate>
+
+@property (nonatomic, retain) IBOutlet UIWindow *window;
+
+@property (nonatomic, retain) IBOutlet SCGifExampleViewController *viewController;
+
+@end
73 SCGifExampleAppDelegate.m
@@ -0,0 +1,73 @@
+//
+// SCGifExampleAppDelegate.m
+// SCGifExample
+//
+// Created by on 11-12-7.
+// Copyright 2011年 __MyCompanyName__. All rights reserved.
+//
+
+#import "SCGifExampleAppDelegate.h"
+
+#import "SCGifExampleViewController.h"
+
+@implementation SCGifExampleAppDelegate
+
+@synthesize window = _window;
+@synthesize viewController = _viewController;
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ // Override point for customization after application launch.
+
+ self.window.rootViewController = self.viewController;
+ [self.window makeKeyAndVisible];
+ return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application
+{
+ /*
+ Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+ Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+ */
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application
+{
+ /*
+ Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+ */
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+ /*
+ Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+ */
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application
+{
+ /*
+ Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+ */
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application
+{
+ /*
+ Called when the application is about to terminate.
+ Save data if appropriate.
+ See also applicationDidEnterBackground:.
+ */
+}
+
+- (void)dealloc
+{
+ [_window release];
+ [_viewController release];
+ [super dealloc];
+}
+
+@end
13 SCGifExampleViewController.h
@@ -0,0 +1,13 @@
+//
+// SCGifExampleViewController.h
+// SCGifExample
+//
+// Created by on 11-12-7.
+// Copyright 2011年 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface SCGifExampleViewController : UIViewController
+
+@end
48 SCGifExampleViewController.m
@@ -0,0 +1,48 @@
+//
+// SCGifExampleViewController.m
+// SCGifExample
+//
+// Created by on 11-12-7.
+// Copyright 2011年 __MyCompanyName__. All rights reserved.
+//
+
+#import "SCGifExampleViewController.h"
+#import "SCGIFImageView.h"
+
+@implementation SCGifExampleViewController
+
+- (void)didReceiveMemoryWarning
+{
+ // Releases the view if it doesn't have a superview.
+ [super didReceiveMemoryWarning];
+
+ // Release any cached data, images, etc that aren't in use.
+}
+
+#pragma mark - View lifecycle
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+
+ NSString* filePath = [[NSBundle mainBundle] pathForResource:@"1.gif" ofType:nil];
+ SCGIFImageView* gifImageView = [[[SCGIFImageView alloc] initWithGIFFile:filePath] autorelease];
+ gifImageView.frame = CGRectMake(0, 0, gifImageView.image.size.width, gifImageView.image.size.height);
+ gifImageView.center = self.view.center;
+ [self.view addSubview:gifImageView];
+}
+
+
+- (void)viewDidUnload
+{
+ [super viewDidUnload];
+ // Release any retained subviews of the main view.
+ // e.g. self.myOutlet = nil;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ // Return YES for supported orientations
+ return (interfaceOrientation == UIInterfaceOrientationPortrait);
+}
+
+@end
2  en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
444 en.lproj/MainWindow.xib
@@ -0,0 +1,444 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+ <data>
+ <int key="IBDocument.SystemTarget">1024</int>
+ <string key="IBDocument.SystemVersion">10D571</string>
+ <string key="IBDocument.InterfaceBuilderVersion">786</string>
+ <string key="IBDocument.AppKitVersion">1038.29</string>
+ <string key="IBDocument.HIToolboxVersion">460.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">112</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="10"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="841351856">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="427554174">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUICustomObject" id="664661524">
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIViewController" id="943309135">
+ <string key="IBUINibName">SCGifExampleViewController</string>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
+ <int key="interfaceOrientation">1</int>
+ </object>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIHorizontal">NO</bool>
+ </object>
+ <object class="IBUIWindow" id="117978783">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrameSize">{320, 480}</string>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDEAA</bytes>
+ </object>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIResizesToFullScreen">YES</bool>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="664661524"/>
+ </object>
+ <int key="connectionID">4</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">viewController</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="943309135"/>
+ </object>
+ <int key="connectionID">11</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">window</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="117978783"/>
+ </object>
+ <int key="connectionID">14</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="841351856"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">3</int>
+ <reference key="object" ref="664661524"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">SCGifExample App Delegate</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="427554174"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">10</int>
+ <reference key="object" ref="943309135"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">12</int>
+ <reference key="object" ref="117978783"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-2.CustomClassName</string>
+ <string>10.CustomClassName</string>
+ <string>10.IBEditorWindowLastContentRect</string>
+ <string>10.IBPluginDependency</string>
+ <string>12.IBEditorWindowLastContentRect</string>
+ <string>12.IBPluginDependency</string>
+ <string>3.CustomClassName</string>
+ <string>3.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>UIApplication</string>
+ <string>UIResponder</string>
+ <string>SCGifExampleViewController</string>
+ <string>{{234, 376}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>{{525, 346}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>SCGifExampleAppDelegate</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">15</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIWindow</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SCGifExampleAppDelegate</string>
+ <string key="superclassName">NSObject</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>viewController</string>
+ <string>window</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>SCGifExampleViewController</string>
+ <string>UIWindow</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>viewController</string>
+ <string>window</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">viewController</string>
+ <string key="candidateClassName">SCGifExampleViewController</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">window</string>
+ <string key="candidateClassName">UIWindow</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">SCGifExampleAppDelegate.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SCGifExampleAppDelegate</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SCGifExampleViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">SCGifExampleViewController.h</string>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSError.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="356479594">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIApplication</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIApplication.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIResponder</string>
+ <string key="superclassName">NSObject</string>
+ <reference key="sourceIdentifier" ref="356479594"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UISearchBar</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UISearchDisplayController</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIWindow</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIWindow.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+ <integer value="1024" key="NS.object.0"/>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+ <integer value="3100" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <string key="IBDocument.LastKnownRelativeProjectPath">SCGifExample.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">112</string>
+ </data>
+</archive>
156 en.lproj/SCGifExampleViewController.xib
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+ <data>
+ <int key="IBDocument.SystemTarget">800</int>
+ <string key="IBDocument.SystemVersion">10C540</string>
+ <string key="IBDocument.InterfaceBuilderVersion">759</string>
+ <string key="IBDocument.AppKitVersion">1038.25</string>
+ <string key="IBDocument.HIToolboxVersion">458.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">77</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="6"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="372490531">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="843779117">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIView" id="774585933">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <string key="NSFrameSize">{320, 460}</string>
+ <reference key="NSSuperview"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC43NQA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace">
+ <int key="NSID">2</int>
+ </object>
+ </object>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="774585933"/>
+ </object>
+ <int key="connectionID">7</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="372490531"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="843779117"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6</int>
+ <reference key="object" ref="774585933"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-2.CustomClassName</string>
+ <string>6.IBEditorWindowLastContentRect</string>
+ <string>6.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>SCGifExampleViewController</string>
+ <string>UIResponder</string>
+ <string>{{239, 654}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">7</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">SCGifExampleViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">SCGifExampleViewController.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+ <integer value="3100" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <string key="IBDocument.LastKnownRelativeProjectPath">SCGifExample.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">77</string>
+ <nil key="IBCocoaTouchSimulationTargetRuntimeIdentifier"/>
+ </data>
+</archive>
17 main.m
@@ -0,0 +1,17 @@
+//
+// main.m
+// SCGifExample
+//
+// Created by on 11-12-7.
+// Copyright 2011年 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+int main(int argc, char *argv[])
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ int retVal = UIApplicationMain(argc, argv, nil, nil);
+ [pool release];
+ return retVal;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.