Skip to content
Browse files

According to the iphone for programmers book chapter 9 sample

  • Loading branch information...
0 parents commit f994d78c75661d97acc9440fa012978b44b231d1 Edward Chiang committed Nov 24, 2010
46 Classes/FlipsideViewController.h
@@ -0,0 +1,46 @@
+//
+// FlipsideViewController.h
+// Painter
+//
+// Created by Edward Chiang on 2010/11/20.
+// Copyright GSS 2010. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@protocol FlipsideViewControllerDelegate;
+
+
+@interface FlipsideViewController : UIViewController {
+ id <FlipsideViewControllerDelegate> delegate;
+ IBOutlet UISlider *redSlider;
+ IBOutlet UISlider *greenSlider;
+ IBOutlet UISlider *blueSlider;
+ IBOutlet UISlider *widthSlider;
+ IBOutlet UIView *colorView;
+ BOOL clearScreen;
+}
+
+// declare delegate and outlets as properties
+@property(nonatomic, assign) id <FlipsideViewControllerDelegate> delegate;
+@property(nonatomic, retain) IBOutlet UISlider *redSlider;
+@property(nonatomic, retain) IBOutlet UISlider *greenSlider;
+@property(nonatomic, retain) IBOutlet UISlider *blueSlider;
+@property(nonatomic, retain) IBOutlet UISlider *widthSlider;
+@property(nonatomic, retain) IBOutlet UIView *colorView;
+
+- (IBAction)done:(id)sender;
+- (IBAction)updateColor:sender;
+- (IBAction)erase:sender;
+- (IBAction)clearScreen:sender;
+- (void)setColor:(UIColor *)c lineWidth:(float)width;
+@end
+
+
+@protocol FlipsideViewControllerDelegate
+- (void)flipsideViewControllerDidFinish:(FlipsideViewController *)controller;
+- (void)setColor:(UIColor *)color;
+- (void)setLineWidth:(float)width;
+- (void)resetView;
+@end
+
116 Classes/FlipsideViewController.m
@@ -0,0 +1,116 @@
+//
+// FlipsideViewController.m
+// Painter
+//
+// Created by Edward Chiang on 2010/11/20.
+// Copyright GSS 2010. All rights reserved.
+//
+
+#import "FlipsideViewController.h"
+#import "MainViewController.h"
+
+@implementation FlipsideViewController
+
+@synthesize delegate;
+@synthesize redSlider;
+@synthesize greenSlider;
+@synthesize blueSlider;
+@synthesize widthSlider;
+@synthesize colorView;
+
+- (void)viewDidLoad {
+ [super viewDidLoad];
+ self.view.backgroundColor = [UIColor viewFlipsideBackgroundColor];
+}
+
+// called when view is going to be displayed
+- (void)viewWillAppear:(BOOL)animated {
+ [super viewWillAppear:animated];
+ clearScreen = NO;
+}
+
+// set the values for color and lineWidth
+- (void)setColor:(UIColor *)c lineWidth:(float)width {
+ // split the passed color into its RGB compoments
+ const float *colors = CGColorGetComponents(c.CGColor);
+
+ // update the sliders with the new value
+ redSlider.value = colors[0]; // set the red slider's value
+ greenSlider.value = colors[1];
+ blueSlider.value = colors[2];
+
+ // update the color of colorView to reflect
+ colorView.backgroundColor = c;
+
+ // update the width slider
+ widthSlider.value = width;
+}
+
+- (IBAction)done:(id)sender {
+ // set the new values for color and line width
+ [self.delegate setColor:colorView.backgroundColor];
+ [self.delegate setLineWidth:widthSlider.value];
+ if (clearScreen) {
+ [self.delegate resetView];
+ }
+ [self.delegate flipsideViewControllerDidFinish:self];
+}
+
+
+- (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.
+}
+
+- (IBAction)clearScreen:sender {
+ clearScreen = YES;
+}
+
+- (IBAction)erase:sender {
+ // do all the changes in an animation block so all the sliders finish
+ // moving at the same time
+ [UIView beginAnimations:nil context:nil]; // begin animation block
+ [UIView setAnimationDuration:0.5]; // set the animation length
+
+ // set all sliders to their max value so the color is white
+ [redSlider setValue:1.0]; // set the red slider’s value to 1
+ [greenSlider setValue:1.0]; // set the green slider’s value to 1
+ [blueSlider setValue:1.0]; // set the blue slider’s value to 1
+
+ // update colorView to reflect the new slider values
+ [colorView setBackgroundColor:[UIColor whiteColor]];
+ [UIView commitAnimations]; // end animation block // end method erase
+}
+
+- (void)viewDidUnload {
+ // Release any retained subviews of the main view.
+ // e.g. self.myOutlet = nil;
+}
+
+
+/*
+// Override to allow orientations other than the default portrait orientation.
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ // Return YES for supported orientations
+ return (interfaceOrientation == UIInterfaceOrientationPortrait);
+}
+*/
+
+
+- (void)dealloc {
+ [redSlider release];
+ [greenSlider release];
+ [blueSlider release];
+ [colorView release];
+ [super dealloc];
+}
+
+- (IBAction)updateColor:sender {
+ UIColor *color = [UIColor colorWithRed:redSlider.value green:greenSlider.value blue:blueSlider.value alpha:1.0];
+
+ [colorView setBackgroundColor:color];
+}
+
+@end
16 Classes/MainViewController.h
@@ -0,0 +1,16 @@
+//
+// MainViewController.h
+// Painter
+//
+// Created by Edward Chiang on 2010/11/20.
+// Copyright GSS 2010. All rights reserved.
+//
+
+#import "FlipsideViewController.h"
+
+@interface MainViewController : UIViewController <FlipsideViewControllerDelegate> {
+}
+
+- (IBAction)showInfo:(id)sender;
+
+@end
93 Classes/MainViewController.m
@@ -0,0 +1,93 @@
+//
+// MainViewController.m
+// Painter
+//
+// Created by Edward Chiang on 2010/11/20.
+// Copyright GSS 2010. All rights reserved.
+//
+
+#import "MainViewController.h"
+#import "MainView.h"
+
+@implementation MainViewController
+
+
+/*
+// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
+- (void)viewDidLoad {
+ [super viewDidLoad];
+}
+*/
+
+
+- (void)flipsideViewControllerDidFinish:(FlipsideViewController *)controller {
+
+ [self dismissModalViewControllerAnimated:YES];
+}
+
+
+- (IBAction)showInfo:(id)sender {
+
+ FlipsideViewController *controller = [[FlipsideViewController alloc] initWithNibName:@"FlipsideView" bundle:nil];
+ controller.delegate = self;
+
+ controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
+ [self presentModalViewController:controller animated:YES];
+
+ // set the sliders on the flipside to the current values in view
+ // MainView *view = (MainView *)self.view;
+ // [controller setColor:view.color lineWidth:view.lineWidth];
+ [controller release];
+}
+
+
+- (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.
+}
+
+- (void)viewDidAppear:(BOOL)animated {
+ [super viewDidAppear:animated];
+ [self.view becomeFirstResponder]; // make main view the first responder
+} // end method
+
+- (void)viewDidUnload {
+ // Release any retained subviews of the main view.
+ // e.g. self.myOutlet = nil;
+}
+
+
+/*
+// Override to allow orientations other than the default portrait orientation.
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ // Return YES for supported orientations.
+ return (interfaceOrientation == UIInterfaceOrientationPortrait);
+}
+*/
+
+// set the color of the main view
+- (void)setColor:(UIColor *)color {
+ MainView *view = (MainView *)self.view; //get main view as MainView
+ view.color = color; // update the color in the main view
+}
+
+// set the line width of the main view
+- (void)setLineWidth:(float)width {
+ MainView *view = (MainView *)self.view; // get main view as a MainView
+ view.lineWidth = width; // update the line width in the main view
+}
+
+// clear the paintings in main view
+- (void)resetView {
+ MainView *view = (MainView *)self.view;
+ [view resetView];
+}
+
+- (void)dealloc {
+ [super dealloc];
+}
+
+
+@end
22 Classes/PainterAppDelegate.h
@@ -0,0 +1,22 @@
+//
+// PainterAppDelegate.h
+// Painter
+//
+// Created by Edward Chiang on 2010/11/20.
+// Copyright GSS 2010. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class MainViewController;
+
+@interface PainterAppDelegate : NSObject <UIApplicationDelegate> {
+ UIWindow *window;
+ MainViewController *mainViewController;
+}
+
+@property (nonatomic, retain) IBOutlet UIWindow *window;
+@property (nonatomic, retain) IBOutlet MainViewController *mainViewController;
+
+@end
+
88 Classes/PainterAppDelegate.m
@@ -0,0 +1,88 @@
+//
+// PainterAppDelegate.m
+// Painter
+//
+// Created by Edward Chiang on 2010/11/20.
+// Copyright GSS 2010. All rights reserved.
+//
+
+#import "PainterAppDelegate.h"
+#import "MainViewController.h"
+
+@implementation PainterAppDelegate
+
+
+@synthesize window;
+@synthesize mainViewController;
+
+
+#pragma mark -
+#pragma mark Application lifecycle
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+
+ // Override point for customization after application launch.
+
+ // Add the main view controller's view to the window and display.
+ [window addSubview:mainViewController.view];
+ [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, called instead of applicationWillTerminate: when the user quits.
+ */
+}
+
+
+- (void)applicationWillEnterForeground:(UIApplication *)application {
+ /*
+ Called as part of 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.
+ See also applicationDidEnterBackground:.
+ */
+}
+
+
+#pragma mark -
+#pragma mark Memory management
+
+- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
+ /*
+ Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later.
+ */
+}
+
+
+- (void)dealloc {
+ [mainViewController release];
+ [window release];
+ [super dealloc];
+}
+
+@end
943 FlipsideView.xib
@@ -0,0 +1,943 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+ <data>
+ <int key="IBDocument.SystemTarget">1056</int>
+ <string key="IBDocument.SystemVersion">10H574</string>
+ <string key="IBDocument.InterfaceBuilderVersion">823</string>
+ <string key="IBDocument.AppKitVersion">1038.35</string>
+ <string key="IBDocument.HIToolboxVersion">461.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">132</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="65"/>
+ </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="340535442">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIView" id="249263867">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBUINavigationBar" id="871675769">
+ <reference key="NSNextResponder" ref="249263867"/>
+ <int key="NSvFlags">290</int>
+ <string key="NSFrameSize">{320, 44}</string>
+ <reference key="NSSuperview" ref="249263867"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIBarStyle">1</int>
+ <object class="NSArray" key="IBUIItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBUINavigationItem" id="553200710">
+ <reference key="IBUINavigationBar" ref="871675769"/>
+ <string key="IBUITitle">Painter</string>
+ <object class="IBUIBarButtonItem" key="IBUILeftBarButtonItem" id="854562692">
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIStyle">1</int>
+ <reference key="IBUINavigationItem" ref="553200710"/>
+ <int key="IBUISystemItemIdentifier">0</int>
+ </object>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBUISlider" id="764277655">
+ <reference key="NSNextResponder" ref="249263867"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{18, 166}, {284, 23}}</string>
+ <reference key="NSSuperview" ref="249263867"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <float key="IBUIValue">5</float>
+ <float key="IBUIMinValue">1</float>
+ <float key="IBUIMaxValue">20</float>
+ </object>
+ <object class="IBUILabel" id="1054168911">
+ <reference key="NSNextResponder" ref="249263867"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 137}, {280, 21}}</string>
+ <reference key="NSSuperview" ref="249263867"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">7</int>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">Line Width</string>
+ <object class="NSColor" key="IBUITextColor" id="248075357">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ <reference key="IBUIHighlightedColor" ref="248075357"/>
+ <int key="IBUIBaselineAdjustment">1</int>
+ <float key="IBUIMinimumFontSize">10</float>
+ <int key="IBUINumberOfLines">20</int>
+ <int key="IBUITextAlignment">1</int>
+ </object>
+ <object class="IBUISlider" id="587104908">
+ <reference key="NSNextResponder" ref="249263867"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{73, 225}, {228, 23}}</string>
+ <reference key="NSSuperview" ref="249263867"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <float key="IBUIMaxValue">255</float>
+ </object>
+ <object class="IBUILabel" id="312965902">
+ <reference key="NSNextResponder" ref="249263867"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{19, 225}, {42, 21}}</string>
+ <reference key="NSSuperview" ref="249263867"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">7</int>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">Red</string>
+ <reference key="IBUITextColor" ref="248075357"/>
+ <reference key="IBUIHighlightedColor" ref="248075357"/>
+ <int key="IBUIBaselineAdjustment">1</int>
+ <float key="IBUIMinimumFontSize">10</float>
+ </object>
+ <object class="IBUILabel" id="103492477">
+ <reference key="NSNextResponder" ref="249263867"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{19, 254}, {48, 21}}</string>
+ <reference key="NSSuperview" ref="249263867"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">7</int>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">Green</string>
+ <reference key="IBUITextColor" ref="248075357"/>
+ <reference key="IBUIHighlightedColor" ref="248075357"/>
+ <int key="IBUIBaselineAdjustment">1</int>
+ <float key="IBUIMinimumFontSize">10</float>
+ </object>
+ <object class="IBUISlider" id="467892188">
+ <reference key="NSNextResponder" ref="249263867"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{73, 255}, {228, 23}}</string>
+ <reference key="NSSuperview" ref="249263867"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <float key="IBUIMaxValue">255</float>
+ </object>
+ <object class="IBUILabel" id="395732431">
+ <reference key="NSNextResponder" ref="249263867"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{19, 283}, {42, 21}}</string>
+ <reference key="NSSuperview" ref="249263867"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">7</int>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">Blue</string>
+ <reference key="IBUITextColor" ref="248075357"/>
+ <reference key="IBUIHighlightedColor" ref="248075357"/>
+ <int key="IBUIBaselineAdjustment">1</int>
+ <float key="IBUIMinimumFontSize">10</float>
+ </object>
+ <object class="IBUISlider" id="173043542">
+ <reference key="NSNextResponder" ref="249263867"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{73, 283}, {228, 23}}</string>
+ <reference key="NSSuperview" ref="249263867"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <float key="IBUIMaxValue">255</float>
+ </object>
+ <object class="IBUIButton" id="970415218">
+ <reference key="NSNextResponder" ref="249263867"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{183, 403}, {117, 37}}</string>
+ <reference key="NSSuperview" ref="249263867"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <object class="NSFont" key="IBUIFont" id="70094784">
+ <string key="NSName">Helvetica-Bold</string>
+ <double key="NSSize">15</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <int key="IBUIButtonType">1</int>
+ <string key="IBUINormalTitle">Clear Screen</string>
+ <reference key="IBUIHighlightedTitleColor" ref="248075357"/>
+ <object class="NSColor" key="IBUINormalTitleColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+ </object>
+ <object class="NSColor" key="IBUINormalTitleShadowColor" id="966181483">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC41AA</bytes>
+ </object>
+ </object>
+ <object class="IBUIButton" id="855845934">
+ <reference key="NSNextResponder" ref="249263867"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{103, 403}, {72, 37}}</string>
+ <reference key="NSSuperview" ref="249263867"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <reference key="IBUIFont" ref="70094784"/>
+ <int key="IBUIButtonType">1</int>
+ <string key="IBUINormalTitle">Eraser</string>
+ <reference key="IBUIHighlightedTitleColor" ref="248075357"/>
+ <object class="NSColor" key="IBUINormalTitleColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+ </object>
+ <reference key="IBUINormalTitleShadowColor" ref="966181483"/>
+ </object>
+ <object class="IBUILabel" id="289915037">
+ <reference key="NSNextResponder" ref="249263867"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{120, 196}, {79, 21}}</string>
+ <reference key="NSSuperview" ref="249263867"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">7</int>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">Line Color</string>
+ <reference key="IBUITextColor" ref="248075357"/>
+ <reference key="IBUIHighlightedColor" ref="248075357"/>
+ <int key="IBUIBaselineAdjustment">1</int>
+ <float key="IBUIMinimumFontSize">10</float>
+ </object>
+ <object class="IBUIView" id="340069292">
+ <reference key="NSNextResponder" ref="249263867"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 313}, {279, 82}}</string>
+ <reference key="NSSuperview" ref="249263867"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace" id="608998808">
+ <int key="NSID">2</int>
+ </object>
+ </object>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </object>
+ <string key="NSFrameSize">{320, 460}</string>
+ <reference key="NSSuperview"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC4yNQA</bytes>
+ <reference key="NSCustomColorSpace" ref="608998808"/>
+ </object>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
+ <int key="IBUIStatusBarStyle">2</int>
+ </object>
+ <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="249263867"/>
+ </object>
+ <int key="connectionID">41</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">done:</string>
+ <reference key="source" ref="854562692"/>
+ <reference key="destination" ref="372490531"/>
+ </object>
+ <int key="connectionID">46</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">blueSlider</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="173043542"/>
+ </object>
+ <int key="connectionID">67</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">colorView</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="340069292"/>
+ </object>
+ <int key="connectionID">68</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">greenSlider</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="467892188"/>
+ </object>
+ <int key="connectionID">69</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">redSlider</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="587104908"/>
+ </object>
+ <int key="connectionID">70</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">widthSlider</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="764277655"/>
+ </object>
+ <int key="connectionID">71</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">clearScreen:</string>
+ <reference key="source" ref="970415218"/>
+ <reference key="destination" ref="372490531"/>
+ <int key="IBEventType">7</int>
+ </object>
+ <int key="connectionID">72</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">erase:</string>
+ <reference key="source" ref="855845934"/>
+ <reference key="destination" ref="372490531"/>
+ <int key="IBEventType">7</int>
+ </object>
+ <int key="connectionID">73</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="340535442"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">40</int>
+ <reference key="object" ref="249263867"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="871675769"/>
+ <reference ref="764277655"/>
+ <reference ref="1054168911"/>
+ <reference ref="970415218"/>
+ <reference ref="855845934"/>
+ <reference ref="289915037"/>
+ <reference ref="587104908"/>
+ <reference ref="312965902"/>
+ <reference ref="103492477"/>
+ <reference ref="467892188"/>
+ <reference ref="395732431"/>
+ <reference ref="173043542"/>
+ <reference ref="340069292"/>
+ </object>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">42</int>
+ <reference key="object" ref="871675769"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="553200710"/>
+ </object>
+ <reference key="parent" ref="249263867"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">43</int>
+ <reference key="object" ref="553200710"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="854562692"/>
+ </object>
+ <reference key="parent" ref="871675769"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">44</int>
+ <reference key="object" ref="854562692"/>
+ <reference key="parent" ref="553200710"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">47</int>
+ <reference key="object" ref="764277655"/>
+ <reference key="parent" ref="249263867"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">48</int>
+ <reference key="object" ref="1054168911"/>
+ <reference key="parent" ref="249263867"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">49</int>
+ <reference key="object" ref="587104908"/>
+ <reference key="parent" ref="249263867"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">50</int>
+ <reference key="object" ref="312965902"/>
+ <reference key="parent" ref="249263867"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">51</int>
+ <reference key="object" ref="103492477"/>
+ <reference key="parent" ref="249263867"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">52</int>
+ <reference key="object" ref="467892188"/>
+ <reference key="parent" ref="249263867"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">53</int>
+ <reference key="object" ref="395732431"/>
+ <reference key="parent" ref="249263867"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">54</int>
+ <reference key="object" ref="173043542"/>
+ <reference key="parent" ref="249263867"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">55</int>
+ <reference key="object" ref="970415218"/>
+ <reference key="parent" ref="249263867"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">56</int>
+ <reference key="object" ref="855845934"/>
+ <reference key="parent" ref="249263867"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">57</int>
+ <reference key="object" ref="289915037"/>
+ <reference key="parent" ref="249263867"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">65</int>
+ <reference key="object" ref="340069292"/>
+ <reference key="parent" ref="249263867"/>
+ </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>40.IBEditorWindowLastContentRect</string>
+ <string>40.IBPluginDependency</string>
+ <string>42.IBPluginDependency</string>
+ <string>43.IBPluginDependency</string>
+ <string>44.IBPluginDependency</string>
+ <string>47.IBPluginDependency</string>
+ <string>48.IBPluginDependency</string>
+ <string>49.IBPluginDependency</string>
+ <string>49.IBViewBoundsToFrameTransform</string>
+ <string>50.IBPluginDependency</string>
+ <string>50.IBViewBoundsToFrameTransform</string>
+ <string>51.IBPluginDependency</string>
+ <string>51.IBViewBoundsToFrameTransform</string>
+ <string>52.IBPluginDependency</string>
+ <string>52.IBViewBoundsToFrameTransform</string>
+ <string>53.IBPluginDependency</string>
+ <string>53.IBViewBoundsToFrameTransform</string>
+ <string>54.IBPluginDependency</string>
+ <string>54.IBViewBoundsToFrameTransform</string>
+ <string>55.IBPluginDependency</string>
+ <string>55.IBViewBoundsToFrameTransform</string>
+ <string>56.IBPluginDependency</string>
+ <string>57.IBPluginDependency</string>
+ <string>57.IBViewBoundsToFrameTransform</string>
+ <string>65.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>FlipsideViewController</string>
+ <string>UIResponder</string>
+ <string>{{618, 241}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABClAAAw4eAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABBoAAAw4aAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABBoAAAw5UAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABClAAAw5aAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABBoAAAw6OAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABClAAAw6SAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABDTgAAw9sAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABDCwAAw1cAAA</bytes>
+ </object>
+ <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">73</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">FlipsideViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>clearScreen:</string>
+ <string>done:</string>
+ <string>erase:</string>
+ <string>updateColor:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>clearScreen:</string>
+ <string>done:</string>
+ <string>erase:</string>
+ <string>updateColor:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBActionInfo">
+ <string key="name">clearScreen:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">done:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">erase:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">updateColor:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>blueSlider</string>
+ <string>colorView</string>
+ <string>delegate</string>
+ <string>greenSlider</string>
+ <string>redSlider</string>
+ <string>widthSlider</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>UISlider</string>
+ <string>UIView</string>
+ <string>id</string>
+ <string>UISlider</string>
+ <string>UISlider</string>
+ <string>UISlider</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>blueSlider</string>
+ <string>colorView</string>
+ <string>delegate</string>
+ <string>greenSlider</string>
+ <string>redSlider</string>
+ <string>widthSlider</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">blueSlider</string>
+ <string key="candidateClassName">UISlider</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">colorView</string>
+ <string key="candidateClassName">UIView</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">delegate</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">greenSlider</string>
+ <string key="candidateClassName">UISlider</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">redSlider</string>
+ <string key="candidateClassName">UISlider</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">widthSlider</string>
+ <string key="candidateClassName">UISlider</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/FlipsideViewController.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="292697028">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIBarButtonItem</string>
+ <string key="superclassName">UIBarItem</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIBarButtonItem.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIBarItem</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIBarItem.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIButton</string>
+ <string key="superclassName">UIControl</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIButton.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIControl</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIControl.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UILabel</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UILabel.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UINavigationBar</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="522138517">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINavigationBar.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UINavigationItem</string>
+ <string key="superclassName">NSObject</string>
+ <reference key="sourceIdentifier" ref="522138517"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIResponder</string>
+ <string key="superclassName">NSObject</string>
+ <reference key="sourceIdentifier" ref="292697028"/>
+ </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">UISlider</string>
+ <string key="superclassName">UIControl</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISlider.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/UIPrintFormatter.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>
+ </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="1056" 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">Painter.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">132</string>
+ </data>
+</archive>
26 MainView.h
@@ -0,0 +1,26 @@
+//
+// MainView.h
+// Painter
+//
+// Created by Edward Chiang on 2010/11/24.
+// Copyright 2010 GSS. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "Squiggle.h";
+
+@interface MainView : UIView {
+ NSMutableDictionary *squiggles; // sguiggles in progress
+ NSMutableArray *finishedSquiggles; // finished squiggles
+ float lineWidth; // the current drawing line width
+} // end instance variable declaration
+
+// declare color and linewidth as properties
+@property (nonatomic, retain) UIColor *color;
+@property float lineWidth;
+
+// draw the given Squiggle into the given graphics context
+- (void)drawSquiggle:(Squiggle *)squiggle inContext:(CGContextRef)context;
+- (void)resetView; // clear all squiggles from the view
+
+@end
175 MainView.m
@@ -0,0 +1,175 @@
+//
+// MainView.m
+// Painter
+//
+// Created by Edward Chiang on 2010/11/24.
+// Copyright 2010 GSS. All rights reserved.
+//
+
+#import "MainView.h"
+
+
+@implementation MainView
+
+@synthesize color;
+@synthesize lineWidth;
+
+// method is callled when the view is created in a nib file
+- (id)initWithCoder:(NSCoder *)decoder {
+ // if the superclass initializes properly
+ if (self = [super initWithCoder:decoder]) {
+ // initialize squiggles and finishedSquiggles
+ squiggles = [[NSMutableDictionary alloc] init];
+ finishedSquiggles = [[NSMutableArray alloc] init];
+
+ // the starting color is black
+ color = [[UIColor alloc] initWithRed:0 green:0 blue:0 alpha:1];
+ lineWidth = 5;
+ } // end if
+ return self;
+}
+
+// clears all the drawing
+- (void)resetView {
+ [squiggles removeAllObjects];
+ [finishedSquiggles removeAllObjects];
+ [self setNeedsDisplay]; // refresh the display
+}// end method
+
+// draws the given squiggle into the given context
+- (void)drawSquiggle:(Squiggle *)squiggle inContext:(CGContextRef)context {
+ // set the drawing color to the squiggle's color
+ UIColor *squiggleColor = squiggle.strokeColor;
+ CGColorRef colorRef = [squiggleColor CGColor]; // get the CGColor
+ CGContextSetStrokeColorWithColor(context, colorRef);
+
+ // set the line width to the squiggle's line width
+ CGContextSetLineWidth(context, squiggle.lineWidth);
+
+ NSMutableArray *points = [ squiggle points]; // get points from squiggle
+
+ // retrieve the NSValue object and store the value in firstPoint
+ CGPoint firstPoint; // declare a CGPoint
+ [[points objectAtIndex:0] getValue:&firstPoint];
+
+ // move to the point
+ CGContextMoveToPoint(context, firstPoint.x, firstPoint.y);
+
+ // draw a line from each point to the next in order
+ for (int i=1; i < [points count]; i++) {
+ NSValue *value = [points objectAtIndex:i];
+ CGPoint point; // declare a new point
+ [value getValue:&point]; // store the value in point
+
+ // draw a line to the new point
+ CGContextAddLineToPoint(context, point.x, point.y);
+ } // end for
+
+ CGContextStrokePath(context);
+}
+
+// called whenever the user places a finger on the screen
+- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
+ NSArray *array = [ touches allObjects]; // get all the new touches
+
+ // loop through each new touch
+ for (UITouch *touch in array ) {
+ // create and configure a new squiggle
+ Squiggle *squiggle = [[Squiggle alloc] init];
+ [squiggle setStrokeColor:color]; // set squiggle's stroke color
+ [squiggle setLineWidth:lineWidth]; // set squiggle's line width
+
+ // add the location of the first touch to the squiggle
+ [squiggle addPoint:[touch locationInView:self]];
+
+ // the key for each touch is the value of the pointer
+ NSValue *touchValue = [NSValue valueWithPointer:touch];
+ NSString *key = [NSString stringWithFormat:@"%@", touchValue];
+
+ // add the new touch to the dictionary under a unique key
+ [squiggles setValue:squiggle forKey:key];
+ [squiggle release]; // we are done with squiggle so release it
+ } // end for
+}
+
+// called whenever the user drags a finger on the screen
+- (void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
+ NSArray *array = [touches allObjects]; // get all the moved touches
+
+ // loop through all the touches
+ for (UITouch *touch in array) {
+ // get the unique key for this touch
+ NSValue * touchValue = [NSValue valueWithPointer:touch];
+
+ // fetch the squiggle this touch should be added to using the key
+ Squiggle *squiggle = [squiggles valueForKey:[NSString stringWithFormat:@"%@", touchValue]];
+
+ // get the current and previous touch locations
+ CGPoint current = [touch locationInView:self];
+ CGPoint previous = [touch previousLocationInView:self];
+ [squiggle addPoint:current]; // add the new point to the squiggle
+
+ // screen needs to be redrawn
+ CGPoint lower, higher;
+ lower.x = (previous.x > current.x ? current.x : previous.x);
+ lower.y = (previous.y > current.y ? current.y: previous.y);
+ higher.x = (previous.x < current.x ? current.x : previous.x);
+ higher.y = (previous.y < current.y ? current.y: previous.y);
+
+ // redraw the screen in the required region
+ [self setNeedsDisplayInRect:CGRectMake(lower.x - lineWidth,
+ lower.y - lineWidth, higher.x - lower.x + lineWidth * 2,
+ higher.y - lower.y + lineWidth * 2)];
+ } // end for
+}
+
+// called when the user lefts a finger from the screen
+- (void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
+ // loop through the touches
+ for (UITouch *touch in touches) {
+ // get the unique key for the touch
+ NSValue *touchValue = [NSValue valueWithPointer:touch];
+ NSString *key = [NSString stringWithFormat:@"%@", touchValue];
+ // retrieve the squiggle for this touch using the key
+ Squiggle *squiggle = [squiggles valueForKey:key];
+ // remove the squiggle from the dictionary and place it in an array // of finished squiggles [finishedSquiggles addObject:squiggle]; // add to finishedSquiggles [squiggles removeObjectForKey:key]; // remove from squiggles
+ [finishedSquiggles addObject:squiggle]; // add to finishedSquiggles
+ [squiggles removeObjectForKey:key]; // remove from squiggles
+ }//endfor
+}
+
+// called when a motion event, such as a shake, ends
+- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event {
+ // if a shake event ended
+ if (event.subtype == UIEventSubtypeMotionShake){
+ // create an alert prompting the user about clearing the painting
+ NSString *message = @"Are you sure you want to clear the painting?";
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Clear painting" message:message delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"clear", nil];
+ [alert show];
+ [alert release];
+ }// end if
+ [super motionEnded:motion withEvent:event];
+} // end method
+
+// clear the painting if the user touched the "Clear" button
+- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
+ // if the user touched the Clear button
+ if (buttonIndex ==1 )
+ [self resetView]; // clear the screen
+}
+
+// determines if this view can become the first responder
+- (BOOL)canBecomeFirstResponder {
+ return YES;
+}
+
+// free MainView's memory
+- (void)dealloc {
+ [squiggles release]; // release the squiggles NSMutableDictionary
+ [finishedSquiggles release]; // release finishedSquiggles
+ [color release]; // release the color UIColor
+ [super dealloc];
+} // end method dealloc
+
+
+@end
398 MainView.xib
@@ -0,0 +1,398 @@
+<?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">782</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">107</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="34"/>
+ </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="815241450">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIView" id="883825266">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBUIButton" id="558454645">
+ <reference key="NSNextResponder" ref="883825266"/>
+ <int key="NSvFlags">265</int>
+ <string key="NSFrame">{{282, 421}, {18, 19}}</string>
+ <reference key="NSSuperview" ref="883825266"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <object class="NSFont" key="IBUIFont">
+ <string key="NSName">Helvetica-Bold</string>
+ <double key="NSSize">15</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <int key="IBUIButtonType">3</int>
+ <bool key="IBUIShowsTouchWhenHighlighted">YES</bool>
+ <object class="NSColor" key="IBUIHighlightedTitleColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDEAA</bytes>
+ </object>
+ <object class="NSColor" key="IBUINormalTitleColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+ </object>
+ <object class="NSColor" key="IBUINormalTitleShadowColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MAA</bytes>
+ </object>
+ </object>
+ </object>
+ <string key="NSFrameSize">{320, 460}</string>
+ <reference key="NSSuperview"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC4yNQA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace">
+ <int key="NSID">2</int>
+ </object>
+ </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="883825266"/>
+ </object>
+ <int key="connectionID">35</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">showInfo:</string>
+ <reference key="source" ref="558454645"/>
+ <reference key="destination" ref="372490531"/>
+ <int key="IBEventType">7</int>
+ </object>
+ <int key="connectionID">38</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="815241450"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">34</int>
+ <reference key="object" ref="883825266"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="558454645"/>
+ </object>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">36</int>
+ <reference key="object" ref="558454645"/>
+ <reference key="parent" ref="883825266"/>
+ </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>34.IBEditorWindowLastContentRect</string>
+ <string>34.IBPluginDependency</string>
+ <string>36.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>MainViewController</string>
+ <string>UIResponder</string>
+ <string>{{341, 376}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</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">38</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">MainViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <string key="NS.key.0">showInfo:</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/MainViewController.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="990327596">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIButton</string>
+ <string key="superclassName">UIControl</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIButton.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIControl</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIControl.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIResponder</string>
+ <string key="superclassName">NSObject</string>
+ <reference key="sourceIdentifier" ref="990327596"/>
+ </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>
+ </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">Painter.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">107</string>
+ </data>
+</archive>
460 MainWindow.xib
@@ -0,0 +1,460 @@
+<?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="2"/>
+ <integer value="22"/>
+ </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="71653367">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUICustomObject" id="664661524">
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIWindow" id="380026005">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">1316</int>
+ <object class="NSPSMatrix" key="NSFrameMatrix"/>
+ <string key="NSFrameSize">{320, 480}</string>
+ <reference key="NSSuperview"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MCAwIDAAA</bytes>
+ </object>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <bool key="IBUIMultipleTouchEnabled">YES</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIResizesToFullScreen">YES</bool>
+ </object>
+ <object class="IBUIViewController" id="919822394">
+ <string key="IBUINibName">MainView</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>
+ <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">window</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="380026005"/>
+ </object>
+ <int key="connectionID">5</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">mainViewController</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="919822394"/>
+ </object>
+ <int key="connectionID">24</int>
+ </object>
+ <object class="IBConnectionRecord