├── CoreData └── CoreDataTest │ ├── .DS_Store │ ├── City.h │ ├── City.m │ ├── Classes │ ├── CitiesTableViewController.h │ ├── CitiesTableViewController.m │ ├── CitiesTableViewController.xib │ ├── CoreDataTestAppDelegate.h │ ├── CoreDataTestAppDelegate.m │ ├── CountriesTableViewController.h │ ├── CountriesTableViewController.m │ ├── DataRepository.h │ ├── DataRepository.m │ ├── FetchedResultsTableViewController.h │ └── FetchedResultsTableViewController.m │ ├── CoreDataTest-Info.plist │ ├── CoreDataTest.xcodeproj │ ├── project.pbxproj │ ├── stefan.pbxuser │ └── stefan.perspectivev3 │ ├── CoreDataTest_Prefix.pch │ ├── Countries.plist │ ├── Countries.xcdatamodel │ ├── elements │ └── layout │ ├── CountriesTableViewController.xib │ ├── Country.h │ ├── Country.m │ ├── MainWindow.xib │ └── main.m ├── Miscellaneous ├── AllKindsOfLayers │ ├── Basic-Info.plist │ ├── Basic.xcodeproj │ │ ├── project.pbxproj │ │ └── stefan.mode1v3 │ ├── BasicViewController.xib │ ├── Basic_Prefix.pch │ ├── Classes │ │ ├── BasicAppDelegate.h │ │ ├── BasicAppDelegate.m │ │ ├── BasicViewController.h │ │ └── BasicViewController.m │ ├── Images │ │ ├── Agonizer.png │ │ ├── Clipboard.png │ │ ├── Communicator (Gamma).png │ │ ├── Desktop Terminal.png │ │ ├── Operating Instrument.png │ │ ├── Secure File.png │ │ ├── Space Coffee.png │ │ └── Table of Comets.png │ ├── MainWindow.xib │ └── main.m ├── ColorPalette │ ├── Classes │ │ ├── ColorPaletteAppDelegate.h │ │ ├── ColorPaletteAppDelegate.m │ │ ├── ColorPaletteViewController.h │ │ ├── ColorPaletteViewController.m │ │ ├── PaletteView.h │ │ └── PaletteView.m │ ├── ColorPalette-Info.plist │ ├── ColorPalette.xcodeproj │ │ ├── project.pbxproj │ │ └── stefan.mode1v3 │ ├── ColorPaletteViewController.xib │ ├── ColorPalette_Prefix.pch │ ├── MainWindow.xib │ └── main.m ├── Flicker │ ├── .DS_Store │ ├── Classes │ │ ├── FlickerAppDelegate.h │ │ ├── FlickerAppDelegate.m │ │ ├── FlickerViewController.h │ │ └── FlickerViewController.m │ ├── Flicker-Info.plist │ ├── Flicker.xcodeproj │ │ ├── project.pbxproj │ │ ├── stefan.pbxuser │ │ └── stefan.perspectivev3 │ ├── FlickerViewController.xib │ ├── Flicker_Prefix.pch │ ├── MainWindow.xib │ ├── main.m │ └── wallpaper.jpg ├── PixelAccess │ ├── .DS_Store │ ├── Classes │ │ ├── PixelAccessAppDelegate.h │ │ ├── PixelAccessAppDelegate.m │ │ ├── PixelAccessViewController.h │ │ ├── PixelAccessViewController.m │ │ └── PixelAccessViewController.mm │ ├── DutchFlag.png │ ├── MainWindow.xib │ ├── PixelAccess-Info.plist │ ├── PixelAccess.xcodeproj │ │ ├── project.pbxproj │ │ ├── stefan.pbxuser │ │ └── stefan.perspectivev3 │ ├── PixelAccessViewController.xib │ ├── PixelAccess_Prefix.pch │ └── main.m ├── ResizingTextField │ └── Test │ │ ├── Classes │ │ ├── TestAppDelegate.h │ │ ├── TestAppDelegate.m │ │ ├── TestViewController.h │ │ └── TestViewController.m │ │ ├── MainWindow.xib │ │ ├── Test-Info.plist │ │ ├── Test.xcodeproj │ │ ├── project.pbxproj │ │ ├── stefan.pbxuser │ │ └── stefan.perspectivev3 │ │ ├── TestViewController.xib │ │ ├── Test_Prefix.pch │ │ ├── build │ │ ├── Debug-iphonesimulator │ │ │ ├── Test.app.dSYM │ │ │ │ └── Contents │ │ │ │ │ ├── Info.plist │ │ │ │ │ └── Resources │ │ │ │ │ └── DWARF │ │ │ │ │ └── Test │ │ │ └── Test.app │ │ │ │ ├── Info.plist │ │ │ │ ├── MainWindow.nib │ │ │ │ ├── PkgInfo │ │ │ │ ├── Test │ │ │ │ └── TestViewController.nib │ │ └── Test.build │ │ │ ├── Debug-iphonesimulator │ │ │ └── Test.build │ │ │ │ ├── Objects-normal │ │ │ │ └── i386 │ │ │ │ │ ├── Test.LinkFileList │ │ │ │ │ ├── TestAppDelegate.o │ │ │ │ │ ├── TestViewController.o │ │ │ │ │ ├── TestViewController.o~$ │ │ │ │ │ ├── TestViewController.o~> │ │ │ │ │ └── main.o │ │ │ │ ├── Test-all-target-headers.hmap │ │ │ │ ├── Test-generated-files.hmap │ │ │ │ ├── Test-own-target-headers.hmap │ │ │ │ ├── Test-project-headers.hmap │ │ │ │ ├── Test.dep │ │ │ │ ├── Test.hmap │ │ │ │ ├── Test~.dep │ │ │ │ ├── build-state.dat │ │ │ │ └── build-state~.dat │ │ │ └── Test.pbxindex │ │ │ ├── categories.pbxbtree │ │ │ ├── cdecls.pbxbtree │ │ │ ├── decls.pbxbtree │ │ │ ├── files.pbxbtree │ │ │ ├── imports.pbxbtree │ │ │ ├── pbxindex.header │ │ │ ├── protocols.pbxbtree │ │ │ ├── refs.pbxbtree │ │ │ ├── strings.pbxstrings │ │ │ ├── control │ │ │ └── strings │ │ │ ├── subclasses.pbxbtree │ │ │ └── symbols0.pbxsymbols │ │ └── main.m ├── RotatingLayer │ ├── Classes │ │ ├── TestAppDelegate.h │ │ ├── TestAppDelegate.m │ │ ├── TestViewController.h │ │ └── TestViewController.m │ ├── MainWindow.xib │ ├── Test-Info.plist │ ├── Test.xcodeproj │ │ ├── project.pbxproj │ │ ├── stefan.pbxuser │ │ └── stefan.perspectivev3 │ ├── TestViewController.xib │ ├── Test_Prefix.pch │ └── main.m └── ScrollViewScreenShot │ ├── Classes │ ├── ScreenShotAppDelegate.h │ ├── ScreenShotAppDelegate.m │ ├── ScreenShotViewController.h │ └── ScreenShotViewController.m │ ├── ImageA.png │ ├── ImageB.png │ ├── ImageC.png │ ├── MainWindow.xib │ ├── ScreenShot-Info.plist │ ├── ScreenShot.xcodeproj │ └── project.pbxproj │ ├── ScreenShotViewController.xib │ ├── ScreenShot_Prefix.pch │ └── main.m └── README /CoreData/CoreDataTest/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/CoreData/CoreDataTest/.DS_Store -------------------------------------------------------------------------------- /CoreData/CoreDataTest/City.h: -------------------------------------------------------------------------------- 1 | // City.h 2 | 3 | #import 4 | 5 | @class Country; 6 | 7 | @interface City : NSManagedObject 8 | { 9 | } 10 | 11 | @property (nonatomic, retain) NSString * name; 12 | @property (nonatomic, retain) Country * country; 13 | 14 | @end -------------------------------------------------------------------------------- /CoreData/CoreDataTest/City.m: -------------------------------------------------------------------------------- 1 | // City.m 2 | 3 | #import "City.h" 4 | 5 | #import "Country.h" 6 | 7 | @implementation City 8 | 9 | @dynamic name; 10 | @dynamic country; 11 | 12 | @end -------------------------------------------------------------------------------- /CoreData/CoreDataTest/Classes/CitiesTableViewController.h: -------------------------------------------------------------------------------- 1 | // CitiesTableViewController.h 2 | 3 | #import 4 | 5 | @interface CitiesTableViewController : UITableViewController { 6 | @private 7 | NSFetchedResultsController* fetchedResultsController_; 8 | NSManagedObject* country_; 9 | } 10 | 11 | - (id) initWithCountry: (NSManagedObject*) country; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /CoreData/CoreDataTest/Classes/CitiesTableViewController.m: -------------------------------------------------------------------------------- 1 | // CitiesTableViewController.m 2 | 3 | #import "CitiesTableViewController.h" 4 | #import "DataRepository.h" 5 | 6 | @implementation CitiesTableViewController 7 | 8 | - (id) initWithCountry: (NSManagedObject*) country 9 | { 10 | if ((self = [super initWithNibName: @"CitiesTableViewController" bundle: nil]) != nil) { 11 | country_ = [country retain]; 12 | } 13 | return self; 14 | } 15 | 16 | - (void) dealloc 17 | { 18 | [country_ release]; 19 | [super dealloc]; 20 | } 21 | 22 | #pragma mark - 23 | 24 | - (void) viewDidLoad 25 | { 26 | self.title = [country_ valueForKey: @"name"]; 27 | 28 | // Set up the fetched results controller. 29 | 30 | [[DataRepository sharedInstance] open]; 31 | 32 | NSManagedObjectContext* managedObjectContext = [[DataRepository sharedInstance] managedObjectContext]; 33 | 34 | NSFetchRequest *fetchRequest = [[[NSFetchRequest alloc] init] autorelease]; 35 | if (fetchRequest != nil) 36 | { 37 | NSEntityDescription *entityDescription = [NSEntityDescription entityForName: @"City" inManagedObjectContext: managedObjectContext]; 38 | if (entityDescription != nil) 39 | { 40 | [fetchRequest setEntity: entityDescription]; 41 | //[fetchRequest setFetchBatchSize: 20]; 42 | 43 | // Works fine 44 | //[fetchRequest setPredicate: [NSPredicate predicateWithFormat: @"country.name == %@", [country_ valueForKey: @"name"]]]; 45 | 46 | // Does not work - But should! 47 | [fetchRequest setPredicate: [NSPredicate predicateWithFormat: @"(country == %@)", country_]]; 48 | 49 | // NSPredicate *predicate = [NSComparisonPredicate predicateWithLeftExpression: 50 | // [NSExpression expressionForKeyPath: @"country"] 51 | // rightExpression: [NSExpression expressionForConstantValue: country_] 52 | // modifier: NSDirectPredicateModifier type: NSEqualToPredicateOperatorType options: 0]; 53 | // [fetchRequest setPredicate: predicate]; 54 | 55 | // NSPredicate *predicate = [NSComparisonPredicate predicateWithLeftExpression: 56 | // [NSExpression expressionForKeyPath: @"country"] 57 | // rightExpression: [NSExpression expressionForConstantValue: [NSArray arrayWithObject: country_]] 58 | // modifier: NSDirectPredicateModifier type: NSInPredicateOperatorType options: 0]; 59 | // [fetchRequest setPredicate: predicate]; 60 | 61 | // Edit the sort key as appropriate. 62 | NSSortDescriptor *sortDescriptor = [[[NSSortDescriptor alloc] initWithKey: @"name" ascending: YES] autorelease]; 63 | if (sortDescriptor != nil) 64 | { 65 | NSArray *sortDescriptors = [NSArray arrayWithObject: sortDescriptor]; 66 | if (sortDescriptors != nil) 67 | { 68 | [fetchRequest setSortDescriptors: sortDescriptors]; 69 | 70 | fetchedResultsController_ = [[NSFetchedResultsController alloc] initWithFetchRequest: fetchRequest 71 | managedObjectContext: managedObjectContext sectionNameKeyPath:nil cacheName: @"Woot"]; 72 | } 73 | } 74 | } 75 | } 76 | 77 | NSError *error = nil; 78 | if ([fetchedResultsController_ performFetch: &error] == NO) { 79 | NSLog(@"Unresolved error %@, %@", error, [error userInfo]); 80 | abort(); 81 | } 82 | } 83 | 84 | - (void)viewDidUnload 85 | { 86 | [super viewDidUnload]; 87 | [fetchedResultsController_ release]; 88 | } 89 | 90 | #pragma mark Table view methods 91 | 92 | - (NSInteger) numberOfSectionsInTableView: (UITableView*) tableView 93 | { 94 | return [[fetchedResultsController_ sections] count]; 95 | } 96 | 97 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 98 | { 99 | id sectionInfo = [[fetchedResultsController_ sections] objectAtIndex: section]; 100 | return [sectionInfo numberOfObjects]; 101 | } 102 | 103 | - (UITableViewCell*) tableView: (UITableView*) tableView cellForRowAtIndexPath: (NSIndexPath*) indexPath 104 | { 105 | static NSString *CellIdentifier = @"CityCell"; 106 | 107 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier: CellIdentifier]; 108 | if (cell == nil) { 109 | cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; 110 | } 111 | 112 | NSManagedObject* managedObject = [fetchedResultsController_ objectAtIndexPath: indexPath]; 113 | cell.textLabel.text = [[managedObject valueForKey: @"name"] description]; 114 | 115 | return cell; 116 | } 117 | 118 | @end -------------------------------------------------------------------------------- /CoreData/CoreDataTest/Classes/CitiesTableViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 784 5 | 10A394 6 | 732 7 | 1027.1 8 | 430.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 60 12 | 13 | 14 | YES 15 | 16 | 17 | 18 | YES 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | YES 23 | 24 | YES 25 | 26 | 27 | YES 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | 35 | 36 | IBFirstResponder 37 | 38 | 39 | 40 | 292 41 | {320, 460} 42 | 43 | 44 | 3 45 | MQA 46 | 47 | NO 48 | YES 49 | NO 50 | 51 | NO 52 | 1 53 | 0 54 | YES 55 | 44 56 | 22 57 | 22 58 | 59 | 60 | 61 | 62 | YES 63 | 64 | 65 | view 66 | 67 | 68 | 69 | 5 70 | 71 | 72 | 73 | dataSource 74 | 75 | 76 | 77 | 6 78 | 79 | 80 | 81 | delegate 82 | 83 | 84 | 85 | 7 86 | 87 | 88 | 89 | 90 | YES 91 | 92 | 0 93 | 94 | 95 | 96 | 97 | 98 | -1 99 | 100 | 101 | File's Owner 102 | 103 | 104 | -2 105 | 106 | 107 | 108 | 109 | 4 110 | 111 | 112 | 113 | 114 | 115 | 116 | YES 117 | 118 | YES 119 | -1.CustomClassName 120 | -2.CustomClassName 121 | 4.IBEditorWindowLastContentRect 122 | 4.IBPluginDependency 123 | 124 | 125 | YES 126 | CitiesTableViewController 127 | UIResponder 128 | {{329, 504}, {320, 480}} 129 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 130 | 131 | 132 | 133 | YES 134 | 135 | 136 | YES 137 | 138 | 139 | 140 | 141 | YES 142 | 143 | 144 | YES 145 | 146 | 147 | 148 | 7 149 | 150 | 151 | 152 | YES 153 | 154 | CitiesTableViewController 155 | UIViewController 156 | 157 | IBProjectSource 158 | CitiesTableViewController.h 159 | 160 | 161 | 162 | 163 | 0 164 | 165 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 166 | 167 | 168 | YES 169 | 170 | 3 171 | 3.1 172 | 173 | 174 | -------------------------------------------------------------------------------- /CoreData/CoreDataTest/Classes/CoreDataTestAppDelegate.h: -------------------------------------------------------------------------------- 1 | // CoreDataTestAppDelegate.h 2 | 3 | @interface CoreDataTestAppDelegate : NSObject { 4 | @private 5 | UIWindow *window; 6 | UINavigationController *navigationController; 7 | } 8 | 9 | @property (nonatomic, retain) IBOutlet UIWindow *window; 10 | @property (nonatomic, retain) IBOutlet UINavigationController *navigationController; 11 | 12 | @end -------------------------------------------------------------------------------- /CoreData/CoreDataTest/Classes/CoreDataTestAppDelegate.m: -------------------------------------------------------------------------------- 1 | // CoreDataTestAppDelegate.m 2 | 3 | #import "CoreDataTestAppDelegate.h" 4 | #import "DataRepository.h" 5 | #import "CountriesTableViewController.h" 6 | 7 | @implementation CoreDataTestAppDelegate 8 | 9 | @synthesize window; 10 | @synthesize navigationController; 11 | 12 | - (void) applicationDidFinishLaunching: (UIApplication*) application 13 | { 14 | [[DataRepository sharedInstance] open]; 15 | [[DataRepository sharedInstance] populate]; 16 | 17 | [window addSubview: [navigationController view]]; 18 | [window makeKeyAndVisible]; 19 | } 20 | 21 | - (void) applicationWillTerminate: (UIApplication*) application 22 | { 23 | [[DataRepository sharedInstance] close]; 24 | } 25 | 26 | - (void) dealloc 27 | { 28 | [navigationController release]; 29 | [window release]; 30 | [super dealloc]; 31 | } 32 | 33 | @end -------------------------------------------------------------------------------- /CoreData/CoreDataTest/Classes/CountriesTableViewController.h: -------------------------------------------------------------------------------- 1 | // CountriesTableViewController.h 2 | 3 | @interface CountriesTableViewController : UITableViewController { 4 | @private 5 | NSFetchedResultsController* fetchedResultsController_; 6 | } 7 | 8 | @end -------------------------------------------------------------------------------- /CoreData/CoreDataTest/Classes/CountriesTableViewController.m: -------------------------------------------------------------------------------- 1 | // CountriesTableViewController.m 2 | 3 | #import "CountriesTableViewController.h" 4 | #import "DataRepository.h" 5 | #import "CitiesTableViewController.h" 6 | 7 | @implementation CountriesTableViewController 8 | 9 | #pragma mark - 10 | #pragma mark Memory Management 11 | 12 | - (id) initWithCoder: (NSCoder*) coder 13 | { 14 | if ((self = [super initWithCoder: coder]) != nil) 15 | { 16 | } 17 | 18 | return self; 19 | } 20 | 21 | - (void) dealloc 22 | { 23 | [super dealloc]; 24 | } 25 | 26 | #pragma mark - 27 | #pragma mark View lifecycle 28 | 29 | 30 | - (void) viewDidLoad 31 | { 32 | self.title = @"Countries"; 33 | 34 | // Set up the fetched results controller. 35 | 36 | [[DataRepository sharedInstance] open]; 37 | 38 | NSManagedObjectContext* managedObjectContext = [[DataRepository sharedInstance] managedObjectContext]; 39 | 40 | NSFetchRequest *fetchRequest = [[[NSFetchRequest alloc] init] autorelease]; 41 | if (fetchRequest != nil) 42 | { 43 | NSEntityDescription *entityDescription = [NSEntityDescription entityForName: @"Country" inManagedObjectContext: managedObjectContext]; 44 | if (entityDescription != nil) 45 | { 46 | [fetchRequest setEntity: entityDescription]; 47 | [fetchRequest setFetchBatchSize: 20]; 48 | 49 | // Edit the sort key as appropriate. 50 | NSSortDescriptor *sortDescriptor = [[[NSSortDescriptor alloc] initWithKey: @"name" ascending: YES] autorelease]; 51 | if (sortDescriptor != nil) 52 | { 53 | NSArray *sortDescriptors = [NSArray arrayWithObject: sortDescriptor]; 54 | if (sortDescriptors != nil) 55 | { 56 | [fetchRequest setSortDescriptors: sortDescriptors]; 57 | fetchedResultsController_ = [[NSFetchedResultsController alloc] initWithFetchRequest: fetchRequest 58 | managedObjectContext: managedObjectContext sectionNameKeyPath:nil cacheName:@"Root"]; 59 | } 60 | } 61 | } 62 | } 63 | 64 | NSError *error = nil; 65 | if ([fetchedResultsController_ performFetch: &error] == NO) { 66 | NSLog(@"Unresolved error %@, %@", error, [error userInfo]); 67 | abort(); 68 | } 69 | } 70 | 71 | - (void)viewDidUnload 72 | { 73 | [super viewDidUnload]; 74 | [fetchedResultsController_ release]; 75 | } 76 | 77 | #pragma mark - 78 | #pragma mark Table view methods 79 | 80 | - (NSInteger) numberOfSectionsInTableView: (UITableView*) tableView 81 | { 82 | return [[fetchedResultsController_ sections] count]; 83 | } 84 | 85 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 86 | { 87 | id sectionInfo = [[fetchedResultsController_ sections] objectAtIndex: section]; 88 | return [sectionInfo numberOfObjects]; 89 | } 90 | 91 | - (UITableViewCell*) tableView: (UITableView*) tableView cellForRowAtIndexPath: (NSIndexPath*) indexPath 92 | { 93 | static NSString *CellIdentifier = @"CountryCell"; 94 | 95 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier: CellIdentifier]; 96 | if (cell == nil) { 97 | cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; 98 | cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; 99 | } 100 | 101 | NSManagedObject* managedObject = [fetchedResultsController_ objectAtIndexPath: indexPath]; 102 | cell.textLabel.text = [[managedObject valueForKey: @"name"] description]; 103 | 104 | return cell; 105 | } 106 | 107 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 108 | { 109 | NSManagedObject* country = [fetchedResultsController_ objectAtIndexPath: indexPath]; 110 | if (country != nil) 111 | { 112 | CitiesTableViewController* viewController = [[CitiesTableViewController alloc] initWithCountry: country]; 113 | if (viewController != nil) { 114 | [self.navigationController pushViewController: viewController animated: YES]; 115 | [viewController release]; 116 | } 117 | } 118 | } 119 | 120 | @end -------------------------------------------------------------------------------- /CoreData/CoreDataTest/Classes/DataRepository.h: -------------------------------------------------------------------------------- 1 | // DataRepository.h 2 | 3 | #import 4 | 5 | #import "Country.h" 6 | #import "City.h" 7 | 8 | @interface DataRepository : NSObject { 9 | @private 10 | NSManagedObjectModel* managedObjectModel_; 11 | NSManagedObjectContext* managedObjectContext_; 12 | NSPersistentStoreCoordinator* persistentStoreCoordinator_; 13 | } 14 | 15 | @property (nonatomic, readonly) NSManagedObjectModel* managedObjectModel; 16 | @property (nonatomic, readonly) NSManagedObjectContext* managedObjectContext; 17 | @property (nonatomic, readonly) NSPersistentStoreCoordinator* persistentStoreCoordinator; 18 | 19 | + (id) sharedInstance; 20 | 21 | - (void) open; 22 | - (void) close; 23 | 24 | - (void) populate; 25 | 26 | @end -------------------------------------------------------------------------------- /CoreData/CoreDataTest/Classes/DataRepository.m: -------------------------------------------------------------------------------- 1 | // DataRepository.m 2 | 3 | #import "DataRepository.h" 4 | 5 | static DataRepository* gSharedDataRepository = nil; 6 | 7 | @implementation DataRepository 8 | 9 | @synthesize managedObjectModel = managedObjectModel_; 10 | @synthesize managedObjectContext = managedObjectContext_; 11 | @synthesize persistentStoreCoordinator = persistentStoreCoordinator_; 12 | 13 | + (id) sharedInstance 14 | { 15 | @synchronized (self) { 16 | if (gSharedDataRepository == nil) { 17 | gSharedDataRepository = [DataRepository new]; 18 | } 19 | } 20 | return gSharedDataRepository; 21 | } 22 | 23 | - (id) init 24 | { 25 | if ((self = [super init]) != nil) { 26 | } 27 | return self; 28 | } 29 | 30 | - (void) dealloc 31 | { 32 | [super dealloc]; 33 | } 34 | 35 | #pragma mark - 36 | 37 | - (void) open 38 | { 39 | // Setup the managed object model 40 | 41 | managedObjectModel_ = [[NSManagedObjectModel mergedModelFromBundles: nil] retain]; 42 | 43 | // Setup the persistent store coordinator 44 | 45 | NSString* applicationDocumentsDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; 46 | NSURL* url = [NSURL fileURLWithPath: [applicationDocumentsDirectory stringByAppendingPathComponent: @"Countries2.sqlite"]]; 47 | 48 | NSError *error = nil; 49 | persistentStoreCoordinator_ = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel: managedObjectModel_]; 50 | if (![persistentStoreCoordinator_ addPersistentStoreWithType: NSSQLiteStoreType configuration: nil URL: url options:nil error: &error]) { 51 | NSLog(@"Unresolved error %@, %@", error, [error userInfo]); 52 | abort(); 53 | } 54 | 55 | // Setup the managed object context 56 | 57 | managedObjectContext_ = [[NSManagedObjectContext alloc] init]; 58 | if (managedObjectModel_ != nil) { 59 | [managedObjectContext_ setPersistentStoreCoordinator: persistentStoreCoordinator_]; 60 | } 61 | } 62 | 63 | - (void) close 64 | { 65 | NSError *error = nil; 66 | if (managedObjectContext_ != nil) { 67 | if ([managedObjectContext_ hasChanges] && ![managedObjectContext_ save: &error]) { 68 | NSLog(@"Unresolved error %@, %@", error, [error userInfo]); 69 | abort(); 70 | } 71 | } 72 | } 73 | 74 | #pragma mark - 75 | 76 | - (void) fetchCitiesForCountry: (Country*) country 77 | { 78 | NSFetchRequest* fetchRequest = [[NSFetchRequest new] autorelease]; 79 | if (fetchRequest != nil) 80 | { 81 | NSEntityDescription *entity = [NSEntityDescription entityForName: @"City" inManagedObjectContext: managedObjectContext_]; 82 | [fetchRequest setEntity: entity]; 83 | [fetchRequest setPredicate: [NSPredicate predicateWithFormat: @"country == %@", country]]; 84 | 85 | NSError* error = nil; 86 | NSArray* fetchedObjects = [managedObjectContext_ executeFetchRequest: fetchRequest error:&error]; 87 | 88 | if (fetchedObjects != nil) 89 | { 90 | for (City* city in fetchedObjects) 91 | { 92 | NSLog(@" City = %@",city.name); 93 | } 94 | } 95 | } 96 | } 97 | 98 | 99 | - (void) populate 100 | { 101 | // Create a fetch request to find out if the database is empty 102 | 103 | NSFetchRequest *fetchRequest = [[[NSFetchRequest alloc] init] autorelease]; 104 | if (fetchRequest != nil) 105 | { 106 | NSEntityDescription *entityDescription = [NSEntityDescription entityForName: @"City" inManagedObjectContext: managedObjectContext_]; 107 | if (entityDescription != nil) 108 | { 109 | [fetchRequest setEntity: entityDescription]; 110 | 111 | NSError* error = nil; 112 | NSArray* fetchedObjects = [managedObjectContext_ executeFetchRequest: fetchRequest error:&error]; 113 | 114 | if (fetchedObjects != nil && [fetchedObjects count] == 0) 115 | { 116 | NSDictionary* data = [NSDictionary dictionaryWithContentsOfFile: [[NSBundle mainBundle] pathForResource: @"Countries" ofType: @"plist"]]; 117 | for (NSString* countryName in [data allKeys]) 118 | { 119 | Country* country = [NSEntityDescription insertNewObjectForEntityForName: @"Country" inManagedObjectContext: managedObjectContext_]; 120 | if (country != nil) 121 | { 122 | country.name = countryName; 123 | 124 | for (NSString* cityName in [data objectForKey: countryName]) 125 | { 126 | City* city = [NSEntityDescription insertNewObjectForEntityForName: @"City" inManagedObjectContext: managedObjectContext_]; 127 | city.name = cityName; 128 | 129 | [country addCitiesObject: city]; // TODO: Why is cities not mutable? 130 | } 131 | } 132 | } 133 | 134 | NSError *error = nil; 135 | if (![managedObjectContext_ save:&error]) { 136 | NSLog(@"Unresolved error %@, %@", error, [error userInfo]); 137 | abort(); 138 | } 139 | } 140 | } 141 | } 142 | 143 | // Just to test predicates 144 | 145 | if (1) 146 | { 147 | NSFetchRequest* fetchRequest = [[NSFetchRequest new] autorelease]; 148 | if (fetchRequest != nil) 149 | { 150 | NSEntityDescription *entity = [NSEntityDescription entityForName: @"Country" inManagedObjectContext: managedObjectContext_]; 151 | [fetchRequest setEntity: entity]; 152 | 153 | NSError* error = nil; 154 | NSArray* fetchedObjects = [managedObjectContext_ executeFetchRequest: fetchRequest error:&error]; 155 | 156 | if (fetchedObjects != nil) 157 | { 158 | for (Country* country in fetchedObjects) 159 | { 160 | NSLog(@"Country = %@", country.name); 161 | [self fetchCitiesForCountry: country]; 162 | } 163 | } 164 | } 165 | } 166 | } 167 | 168 | @end -------------------------------------------------------------------------------- /CoreData/CoreDataTest/Classes/FetchedResultsTableViewController.h: -------------------------------------------------------------------------------- 1 | // FetchedResultsTableViewController.h 2 | 3 | #import 4 | 5 | @interface FetchedResultsTableViewController : UITableViewController { 6 | } 7 | 8 | @end -------------------------------------------------------------------------------- /CoreData/CoreDataTest/Classes/FetchedResultsTableViewController.m: -------------------------------------------------------------------------------- 1 | // FetchedResultsTableViewController.m 2 | 3 | #import "FetchedResultsTableViewController.h" 4 | 5 | /* 6 | 7 | Typical usage of this class: 8 | 9 | Subclass and implement: 10 | 11 | - (void) created 12 | 13 | Then create and push on a navigation controller: 14 | 15 | MyFetchedResultsTableViewController* viewController = [[MyFetchedResultsTableViewController new] autorelease]; 16 | if (viewController != nil) { 17 | [self.navigationController pushViewController: viewController animated: YES]; 18 | } 19 | 20 | */ 21 | 22 | @implementation FetchedResultsTableViewController 23 | 24 | #pragma mark - 25 | #pragma mark Memory Management 26 | 27 | - (id) init 28 | { 29 | if ((self = [super initWithNibName: [[self class] name] bundle: nil]) != nil) { 30 | } 31 | return self; 32 | } 33 | 34 | - (id) initWithCoder: (NSCoder*) coder 35 | { 36 | if ((self = [super initWithCoder: coder]) != nil) 37 | { 38 | } 39 | 40 | return self; 41 | } 42 | 43 | - (void) dealloc 44 | { 45 | [super dealloc]; 46 | } 47 | 48 | #pragma mark - 49 | #pragma mark View lifecycle 50 | 51 | 52 | - (void) viewDidLoad 53 | { 54 | // Make sure we have a data repository 55 | 56 | NSAssert(dataRepository_ != nil, @"FetchedResultsTableViewController requires a DataRepository"); 57 | 58 | // Set up the fetched results controller. 59 | 60 | [[DataRepository sharedInstance] open]; 61 | 62 | NSManagedObjectContext* managedObjectContext = [[DataRepository sharedInstance] managedObjectContext]; 63 | 64 | NSFetchRequest *fetchRequest = [[[NSFetchRequest alloc] init] autorelease]; 65 | if (fetchRequest != nil) 66 | { 67 | NSEntityDescription *entityDescription = [NSEntityDescription entityForName: @"Country" inManagedObjectContext: managedObjectContext]; 68 | if (entityDescription != nil) 69 | { 70 | [fetchRequest setEntity: entityDescription]; 71 | [fetchRequest setFetchBatchSize: 20]; 72 | 73 | // Edit the sort key as appropriate. 74 | NSSortDescriptor *sortDescriptor = [[[NSSortDescriptor alloc] initWithKey: @"name" ascending: YES] autorelease]; 75 | if (sortDescriptor != nil) 76 | { 77 | NSArray *sortDescriptors = [NSArray arrayWithObject: sortDescriptor]; 78 | if (sortDescriptors != nil) 79 | { 80 | [fetchRequest setSortDescriptors: sortDescriptors]; 81 | fetchedResultsController_ = [[NSFetchedResultsController alloc] initWithFetchRequest: fetchRequest 82 | managedObjectContext: managedObjectContext sectionNameKeyPath:nil cacheName:@"Root"]; 83 | } 84 | } 85 | } 86 | } 87 | 88 | NSError *error = nil; 89 | if ([fetchedResultsController_ performFetch: &error] == NO) { 90 | NSLog(@"Unresolved error %@, %@", error, [error userInfo]); 91 | abort(); 92 | } 93 | } 94 | 95 | - (void)viewDidUnload 96 | { 97 | [super viewDidUnload]; 98 | [fetchedResultsController_ release]; 99 | } 100 | 101 | #pragma mark - 102 | #pragma mark Table view methods 103 | 104 | - (NSInteger) numberOfSectionsInTableView: (UITableView*) tableView 105 | { 106 | return [[fetchedResultsController_ sections] count]; 107 | } 108 | 109 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 110 | { 111 | id sectionInfo = [[fetchedResultsController_ sections] objectAtIndex: section]; 112 | return [sectionInfo numberOfObjects]; 113 | } 114 | 115 | - (UITableViewCell*) tableView: (UITableView*) tableView cellForRowAtIndexPath: (NSIndexPath*) indexPath 116 | { 117 | static NSString *CellIdentifier = @"CountryCell"; 118 | 119 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier: CellIdentifier]; 120 | if (cell == nil) { 121 | cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; 122 | cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; 123 | } 124 | 125 | NSManagedObject* managedObject = [fetchedResultsController_ objectAtIndexPath: indexPath]; 126 | cell.textLabel.text = [[managedObject valueForKey: @"name"] description]; 127 | 128 | return cell; 129 | } 130 | 131 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 132 | { 133 | NSManagedObject* country = [fetchedResultsController_ objectAtIndexPath: indexPath]; 134 | if (country != nil) 135 | { 136 | CitiesTableViewController* viewController = [[CitiesTableViewController alloc] initWithCountry: country]; 137 | if (viewController != nil) { 138 | [self.navigationController pushViewController: viewController animated: YES]; 139 | [viewController release]; 140 | } 141 | } 142 | } 143 | 144 | @end -------------------------------------------------------------------------------- /CoreData/CoreDataTest/CoreDataTest-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | ca.arentz.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | 30 | 31 | -------------------------------------------------------------------------------- /CoreData/CoreDataTest/CoreDataTest_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'CoreDataTest' target in the 'CoreDataTest' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_3_0 8 | #warning "This project uses features only available in iPhone SDK 3.0 and later." 9 | #endif 10 | 11 | 12 | #ifdef __OBJC__ 13 | #import 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /CoreData/CoreDataTest/Countries.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Canada 6 | 7 | Toronto 8 | Montréal 9 | Ottawa 10 | 11 | Holland 12 | 13 | Amsterdam 14 | Den Haag 15 | Rotterdam 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /CoreData/CoreDataTest/Countries.xcdatamodel/elements: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/CoreData/CoreDataTest/Countries.xcdatamodel/elements -------------------------------------------------------------------------------- /CoreData/CoreDataTest/Countries.xcdatamodel/layout: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/CoreData/CoreDataTest/Countries.xcdatamodel/layout -------------------------------------------------------------------------------- /CoreData/CoreDataTest/Country.h: -------------------------------------------------------------------------------- 1 | // Country.h 2 | 3 | #import 4 | 5 | @interface Country : NSManagedObject 6 | { 7 | } 8 | 9 | @property (nonatomic, retain) NSString * name; 10 | @property (nonatomic, retain) NSSet* cities; 11 | 12 | @end 13 | 14 | 15 | @interface Country (CoreDataGeneratedAccessors) 16 | - (void)addCitiesObject:(NSManagedObject *)value; 17 | - (void)removeCitiesObject:(NSManagedObject *)value; 18 | - (void)addCities:(NSSet *)value; 19 | - (void)removeCities:(NSSet *)value; 20 | 21 | @end -------------------------------------------------------------------------------- /CoreData/CoreDataTest/Country.m: -------------------------------------------------------------------------------- 1 | // Country.m 2 | 3 | #import "Country.h" 4 | 5 | @implementation Country 6 | 7 | @dynamic name; 8 | @dynamic cities; 9 | 10 | @end -------------------------------------------------------------------------------- /CoreData/CoreDataTest/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // CoreDataTest 4 | // 5 | // Created by Stefan Arentz on 10-01-20. 6 | // Copyright Arentz Consulting 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | 13 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | [pool release]; 16 | return retVal; 17 | } 18 | -------------------------------------------------------------------------------- /Miscellaneous/AllKindsOfLayers/Basic-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationPortraitUpsideDown 33 | UIInterfaceOrientationLandscapeLeft 34 | UIInterfaceOrientationLandscapeRight 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /Miscellaneous/AllKindsOfLayers/Basic_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Basic' target in the 'Basic' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /Miscellaneous/AllKindsOfLayers/Classes/BasicAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // BasicAppDelegate.h 3 | // Basic 4 | // 5 | // Created by Stefan Arentz on 10-09-09. 6 | // Copyright Arentz Consulting 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class BasicViewController; 12 | 13 | @interface BasicAppDelegate : NSObject { 14 | UIWindow *window; 15 | BasicViewController *viewController; 16 | } 17 | 18 | @property (nonatomic, retain) IBOutlet UIWindow *window; 19 | @property (nonatomic, retain) IBOutlet BasicViewController *viewController; 20 | 21 | @end 22 | 23 | -------------------------------------------------------------------------------- /Miscellaneous/AllKindsOfLayers/Classes/BasicAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // BasicAppDelegate.m 3 | // Basic 4 | // 5 | // Created by Stefan Arentz on 10-09-09. 6 | // Copyright Arentz Consulting 2010. All rights reserved. 7 | // 8 | 9 | #import "BasicAppDelegate.h" 10 | #import "BasicViewController.h" 11 | 12 | @implementation BasicAppDelegate 13 | 14 | @synthesize window; 15 | @synthesize viewController; 16 | 17 | 18 | #pragma mark - 19 | #pragma mark Application lifecycle 20 | 21 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 22 | 23 | [[UIApplication sharedApplication] setStatusBarHidden: YES]; 24 | 25 | // Override point for customization after app launch. 26 | [window addSubview:viewController.view]; 27 | [window makeKeyAndVisible]; 28 | 29 | return YES; 30 | } 31 | 32 | 33 | - (void)applicationWillResignActive:(UIApplication *)application { 34 | /* 35 | 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. 36 | 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. 37 | */ 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | /* 43 | 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. 44 | */ 45 | } 46 | 47 | 48 | - (void)applicationWillTerminate:(UIApplication *)application { 49 | /* 50 | Called when the application is about to terminate. 51 | See also applicationDidEnterBackground:. 52 | */ 53 | } 54 | 55 | 56 | #pragma mark - 57 | #pragma mark Memory management 58 | 59 | - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { 60 | /* 61 | Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. 62 | */ 63 | } 64 | 65 | 66 | - (void)dealloc { 67 | [viewController release]; 68 | [window release]; 69 | [super dealloc]; 70 | } 71 | 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /Miscellaneous/AllKindsOfLayers/Classes/BasicViewController.h: -------------------------------------------------------------------------------- 1 | // BasicViewController.h 2 | 3 | #import 4 | 5 | @interface BasicViewController : UIViewController { 6 | @private 7 | NSMutableArray* _iconLayers; 8 | } 9 | 10 | @end -------------------------------------------------------------------------------- /Miscellaneous/AllKindsOfLayers/Classes/BasicViewController.m: -------------------------------------------------------------------------------- 1 | // BasicViewController.m 2 | 3 | #import 4 | #import "BasicViewController.h" 5 | 6 | @implementation BasicViewController 7 | 8 | - (CGPoint) randomPosition 9 | { 10 | return CGPointMake( 11 | 64 + (random() % (int) (self.view.frame.size.width - 128)), 12 | 64 + (random() % (int) (self.view.frame.size.height - 128)) 13 | ); 14 | } 15 | 16 | - (void) animationDidStop: (CAAnimation*) animation finished: (BOOL) flag 17 | { 18 | CALayer* layer = [animation valueForKey: @"layer"]; 19 | 20 | CGPoint position = layer.position; 21 | layer.position = [self randomPosition]; 22 | 23 | { 24 | CABasicAnimation* animation = [CABasicAnimation animationWithKeyPath: @"position"]; 25 | animation.timingFunction = [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionEaseInEaseOut]; 26 | animation.fromValue = [NSValue valueWithCGPoint: position]; 27 | animation.toValue = [NSValue valueWithCGPoint: layer.position]; 28 | animation.duration = 1.0 + (random() % 3); 29 | animation.delegate = self; 30 | 31 | [animation setValue: layer forKey: @"layer"]; 32 | 33 | [layer addAnimation: animation forKey: @"position"]; 34 | } 35 | } 36 | 37 | - (void) viewDidLoad 38 | { 39 | // Add a gradient background layer 40 | 41 | CAGradientLayer* gradientLayer = [CAGradientLayer layer]; 42 | gradientLayer.colors = [NSArray arrayWithObjects: [UIColor grayColor].CGColor, [UIColor whiteColor].CGColor, [UIColor grayColor].CGColor, nil]; 43 | gradientLayer.bounds = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height); 44 | gradientLayer.position = CGPointMake(self.view.frame.size.width / 2, self.view.frame.size.height / 2); 45 | 46 | [self.view.layer addSublayer: gradientLayer]; 47 | 48 | // Make the text appear 49 | 50 | CATextLayer* textLayer = [CATextLayer layer]; 51 | textLayer.string = @"Icons from the Star Trek TOS icon set\nAvailable from http://theiconfactory.com"; 52 | textLayer.fontSize = 24.0; 53 | textLayer.alignmentMode = kCAAlignmentCenter; 54 | textLayer.bounds = CGRectMake(0, 0, 600, 200); 55 | textLayer.position = CGPointMake(self.view.frame.size.width / 2, self.view.frame.size.height / 2); 56 | textLayer.foregroundColor = [UIColor blackColor].CGColor; 57 | [self.view.layer addSublayer: textLayer]; 58 | 59 | CGFloat savedOpacity = textLayer.opacity; 60 | textLayer.opacity = 0.05; 61 | 62 | CABasicAnimation* textAnimation = [CABasicAnimation animationWithKeyPath: @"opacity"]; 63 | textAnimation.timingFunction = [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionEaseInEaseOut]; 64 | textAnimation.fromValue = [NSNumber numberWithFloat: savedOpacity]; 65 | textAnimation.toValue = [NSNumber numberWithFloat: textLayer.opacity]; 66 | textAnimation.repeatCount = HUGE_VALF; 67 | textAnimation.autoreverses = YES; 68 | textAnimation.duration = 2.0; 69 | [textLayer addAnimation: textAnimation forKey: @"opacity"]; 70 | 71 | // Create layers and set their initial position 72 | 73 | NSArray* imagePaths = [[NSBundle mainBundle] pathsForResourcesOfType: @"png" inDirectory: nil]; 74 | 75 | srandom(time(NULL)); 76 | 77 | _iconLayers = [NSMutableArray new]; 78 | 79 | for (NSString* imagePath in imagePaths) 80 | { 81 | UIImage* image = [UIImage imageWithContentsOfFile: imagePath]; 82 | 83 | CALayer* layer = [CALayer layer]; 84 | layer.contents = (id) image.CGImage; 85 | layer.bounds = CGRectMake(0, 0, 128, 128); 86 | layer.position = [self randomPosition]; 87 | [self.view.layer addSublayer: layer]; 88 | 89 | [_iconLayers addObject: layer]; 90 | } 91 | } 92 | 93 | - (void) viewDidAppear:(BOOL)animated 94 | { 95 | // Move them to new places 96 | 97 | for (CALayer* layer in _iconLayers) 98 | { 99 | CGPoint position = layer.position; 100 | layer.position = [self randomPosition]; 101 | 102 | CABasicAnimation* animation = [CABasicAnimation animationWithKeyPath: @"position"]; 103 | animation.timingFunction = [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionEaseInEaseOut]; 104 | animation.fromValue = [NSValue valueWithCGPoint: position]; 105 | animation.toValue = [NSValue valueWithCGPoint: layer.position]; 106 | animation.duration = 1.0 + (random() % 3); 107 | animation.delegate = self; 108 | 109 | [animation setValue: layer forKey: @"layer"]; 110 | 111 | [layer addAnimation: animation forKey: @"position"]; 112 | } 113 | } 114 | 115 | @end 116 | -------------------------------------------------------------------------------- /Miscellaneous/AllKindsOfLayers/Images/Agonizer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/AllKindsOfLayers/Images/Agonizer.png -------------------------------------------------------------------------------- /Miscellaneous/AllKindsOfLayers/Images/Clipboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/AllKindsOfLayers/Images/Clipboard.png -------------------------------------------------------------------------------- /Miscellaneous/AllKindsOfLayers/Images/Communicator (Gamma).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/AllKindsOfLayers/Images/Communicator (Gamma).png -------------------------------------------------------------------------------- /Miscellaneous/AllKindsOfLayers/Images/Desktop Terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/AllKindsOfLayers/Images/Desktop Terminal.png -------------------------------------------------------------------------------- /Miscellaneous/AllKindsOfLayers/Images/Operating Instrument.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/AllKindsOfLayers/Images/Operating Instrument.png -------------------------------------------------------------------------------- /Miscellaneous/AllKindsOfLayers/Images/Secure File.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/AllKindsOfLayers/Images/Secure File.png -------------------------------------------------------------------------------- /Miscellaneous/AllKindsOfLayers/Images/Space Coffee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/AllKindsOfLayers/Images/Space Coffee.png -------------------------------------------------------------------------------- /Miscellaneous/AllKindsOfLayers/Images/Table of Comets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/AllKindsOfLayers/Images/Table of Comets.png -------------------------------------------------------------------------------- /Miscellaneous/AllKindsOfLayers/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Basic 4 | // 5 | // Created by Stefan Arentz on 10-09-09. 6 | // Copyright Arentz Consulting 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | 13 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | [pool release]; 16 | return retVal; 17 | } 18 | -------------------------------------------------------------------------------- /Miscellaneous/ColorPalette/Classes/ColorPaletteAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ColorPaletteAppDelegate.h 3 | // ColorPalette 4 | // 5 | // Created by Stefan Arentz on 10-09-08. 6 | // Copyright Arentz Consulting 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class ColorPaletteViewController; 12 | 13 | @interface ColorPaletteAppDelegate : NSObject { 14 | UIWindow *window; 15 | ColorPaletteViewController *viewController; 16 | } 17 | 18 | @property (nonatomic, retain) IBOutlet UIWindow *window; 19 | @property (nonatomic, retain) IBOutlet ColorPaletteViewController *viewController; 20 | 21 | @end 22 | 23 | -------------------------------------------------------------------------------- /Miscellaneous/ColorPalette/Classes/ColorPaletteAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // ColorPaletteAppDelegate.m 3 | // ColorPalette 4 | // 5 | // Created by Stefan Arentz on 10-09-08. 6 | // Copyright Arentz Consulting 2010. All rights reserved. 7 | // 8 | 9 | #import "ColorPaletteAppDelegate.h" 10 | #import "ColorPaletteViewController.h" 11 | 12 | @implementation ColorPaletteAppDelegate 13 | 14 | @synthesize window; 15 | @synthesize viewController; 16 | 17 | 18 | #pragma mark - 19 | #pragma mark Application lifecycle 20 | 21 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 22 | 23 | // Override point for customization after application launch. 24 | 25 | // Add the view controller's view to the window and display. 26 | [window addSubview:viewController.view]; 27 | [window makeKeyAndVisible]; 28 | 29 | return YES; 30 | } 31 | 32 | 33 | - (void)applicationWillResignActive:(UIApplication *)application { 34 | /* 35 | 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. 36 | 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. 37 | */ 38 | } 39 | 40 | 41 | - (void)applicationDidEnterBackground:(UIApplication *)application { 42 | /* 43 | 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. 44 | If your application supports background execution, called instead of applicationWillTerminate: when the user quits. 45 | */ 46 | } 47 | 48 | 49 | - (void)applicationWillEnterForeground:(UIApplication *)application { 50 | /* 51 | 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. 52 | */ 53 | } 54 | 55 | 56 | - (void)applicationDidBecomeActive:(UIApplication *)application { 57 | /* 58 | 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. 59 | */ 60 | } 61 | 62 | 63 | - (void)applicationWillTerminate:(UIApplication *)application { 64 | /* 65 | Called when the application is about to terminate. 66 | See also applicationDidEnterBackground:. 67 | */ 68 | } 69 | 70 | 71 | #pragma mark - 72 | #pragma mark Memory management 73 | 74 | - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { 75 | /* 76 | Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. 77 | */ 78 | } 79 | 80 | 81 | - (void)dealloc { 82 | [viewController release]; 83 | [window release]; 84 | [super dealloc]; 85 | } 86 | 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /Miscellaneous/ColorPalette/Classes/ColorPaletteViewController.h: -------------------------------------------------------------------------------- 1 | // ColorPaletteViewController.h 2 | 3 | #import 4 | #import "PaletteView.h" 5 | 6 | @interface ColorPaletteViewController : UIViewController { 7 | @private 8 | UIView* _currentColorView; 9 | } 10 | 11 | @property (nonatomic,assign) IBOutlet UIView* currentColorView; 12 | 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /Miscellaneous/ColorPalette/Classes/ColorPaletteViewController.m: -------------------------------------------------------------------------------- 1 | // ColorPaletteViewController.m 2 | 3 | #import "ColorPaletteViewController.h" 4 | 5 | @implementation ColorPaletteViewController 6 | 7 | @synthesize currentColorView = _currentColorView; 8 | 9 | - (void) paletteView: (PaletteView*) paletteView didSelectColor: (UIColor*) color 10 | { 11 | _currentColorView.backgroundColor = color; 12 | } 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Miscellaneous/ColorPalette/Classes/PaletteView.h: -------------------------------------------------------------------------------- 1 | // PaletteView.h 2 | 3 | #import 4 | 5 | @class PaletteView; 6 | 7 | @protocol PaletteViewDelegate 8 | - (void) paletteView: (PaletteView*) paletteView didSelectColor: (UIColor*) color; 9 | @end 10 | 11 | @interface PaletteView : UIView { 12 | @private 13 | id _delegate; 14 | @private 15 | UIView* _lastView; 16 | } 17 | 18 | @property (nonatomic,assign) IBOutlet id delegate; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Miscellaneous/ColorPalette/Classes/PaletteView.m: -------------------------------------------------------------------------------- 1 | // PaletteView.m 2 | 3 | #import "PaletteView.h" 4 | 5 | @implementation PaletteView 6 | 7 | @synthesize delegate = _delegate; 8 | 9 | - (void) updateColor: (UIView*) view 10 | { 11 | if (_lastView != view) { 12 | _lastView = view; 13 | [_delegate paletteView: self didSelectColor: view.backgroundColor]; 14 | } 15 | } 16 | 17 | - (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 18 | { 19 | UIView* view = [self hitTest: [[touches anyObject] locationInView: self] withEvent: nil]; 20 | if (view != nil && view != self) { 21 | [self updateColor: view]; 22 | } 23 | } 24 | 25 | - (void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event 26 | { 27 | UIView* view = [self hitTest: [[touches anyObject] locationInView: self] withEvent: nil]; 28 | if (view != nil && view != self) { 29 | [self updateColor: view]; 30 | } 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Miscellaneous/ColorPalette/ColorPalette-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | 30 | 31 | -------------------------------------------------------------------------------- /Miscellaneous/ColorPalette/ColorPalette.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 45; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1D3623260D0F684500981E51 /* ColorPaletteAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* ColorPaletteAppDelegate.m */; }; 11 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 12 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 13 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 14 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; 15 | 2899E5220DE3E06400AC0155 /* ColorPaletteViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* ColorPaletteViewController.xib */; }; 16 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; 17 | 28D7ACF80DDB3853001CB0EB /* ColorPaletteViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* ColorPaletteViewController.m */; }; 18 | F81E4428123820200018CFA4 /* PaletteView.m in Sources */ = {isa = PBXBuildFile; fileRef = F81E4427123820200018CFA4 /* PaletteView.m */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXFileReference section */ 22 | 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 23 | 1D3623240D0F684500981E51 /* ColorPaletteAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorPaletteAppDelegate.h; sourceTree = ""; }; 24 | 1D3623250D0F684500981E51 /* ColorPaletteAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ColorPaletteAppDelegate.m; sourceTree = ""; }; 25 | 1D6058910D05DD3D006BFB54 /* ColorPalette.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ColorPalette.app; sourceTree = BUILT_PRODUCTS_DIR; }; 26 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 27 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 28 | 2899E5210DE3E06400AC0155 /* ColorPaletteViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ColorPaletteViewController.xib; sourceTree = ""; }; 29 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; 30 | 28D7ACF60DDB3853001CB0EB /* ColorPaletteViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorPaletteViewController.h; sourceTree = ""; }; 31 | 28D7ACF70DDB3853001CB0EB /* ColorPaletteViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ColorPaletteViewController.m; sourceTree = ""; }; 32 | 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 33 | 32CA4F630368D1EE00C91783 /* ColorPalette_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorPalette_Prefix.pch; sourceTree = ""; }; 34 | 8D1107310486CEB800E47090 /* ColorPalette-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "ColorPalette-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; 35 | F81E4426123820200018CFA4 /* PaletteView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PaletteView.h; sourceTree = ""; }; 36 | F81E4427123820200018CFA4 /* PaletteView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PaletteView.m; sourceTree = ""; }; 37 | /* End PBXFileReference section */ 38 | 39 | /* Begin PBXFrameworksBuildPhase section */ 40 | 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { 41 | isa = PBXFrameworksBuildPhase; 42 | buildActionMask = 2147483647; 43 | files = ( 44 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 45 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 46 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, 47 | ); 48 | runOnlyForDeploymentPostprocessing = 0; 49 | }; 50 | /* End PBXFrameworksBuildPhase section */ 51 | 52 | /* Begin PBXGroup section */ 53 | 080E96DDFE201D6D7F000001 /* Classes */ = { 54 | isa = PBXGroup; 55 | children = ( 56 | 1D3623240D0F684500981E51 /* ColorPaletteAppDelegate.h */, 57 | 1D3623250D0F684500981E51 /* ColorPaletteAppDelegate.m */, 58 | 28D7ACF60DDB3853001CB0EB /* ColorPaletteViewController.h */, 59 | 28D7ACF70DDB3853001CB0EB /* ColorPaletteViewController.m */, 60 | F81E4426123820200018CFA4 /* PaletteView.h */, 61 | F81E4427123820200018CFA4 /* PaletteView.m */, 62 | ); 63 | path = Classes; 64 | sourceTree = ""; 65 | }; 66 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 67 | isa = PBXGroup; 68 | children = ( 69 | 1D6058910D05DD3D006BFB54 /* ColorPalette.app */, 70 | ); 71 | name = Products; 72 | sourceTree = ""; 73 | }; 74 | 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 080E96DDFE201D6D7F000001 /* Classes */, 78 | 29B97315FDCFA39411CA2CEA /* Other Sources */, 79 | 29B97317FDCFA39411CA2CEA /* Resources */, 80 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 81 | 19C28FACFE9D520D11CA2CBB /* Products */, 82 | ); 83 | name = CustomTemplate; 84 | sourceTree = ""; 85 | }; 86 | 29B97315FDCFA39411CA2CEA /* Other Sources */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 32CA4F630368D1EE00C91783 /* ColorPalette_Prefix.pch */, 90 | 29B97316FDCFA39411CA2CEA /* main.m */, 91 | ); 92 | name = "Other Sources"; 93 | sourceTree = ""; 94 | }; 95 | 29B97317FDCFA39411CA2CEA /* Resources */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | 2899E5210DE3E06400AC0155 /* ColorPaletteViewController.xib */, 99 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */, 100 | 8D1107310486CEB800E47090 /* ColorPalette-Info.plist */, 101 | ); 102 | name = Resources; 103 | sourceTree = ""; 104 | }; 105 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 109 | 1D30AB110D05D00D00671497 /* Foundation.framework */, 110 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */, 111 | ); 112 | name = Frameworks; 113 | sourceTree = ""; 114 | }; 115 | /* End PBXGroup section */ 116 | 117 | /* Begin PBXNativeTarget section */ 118 | 1D6058900D05DD3D006BFB54 /* ColorPalette */ = { 119 | isa = PBXNativeTarget; 120 | buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "ColorPalette" */; 121 | buildPhases = ( 122 | 1D60588D0D05DD3D006BFB54 /* Resources */, 123 | 1D60588E0D05DD3D006BFB54 /* Sources */, 124 | 1D60588F0D05DD3D006BFB54 /* Frameworks */, 125 | ); 126 | buildRules = ( 127 | ); 128 | dependencies = ( 129 | ); 130 | name = ColorPalette; 131 | productName = ColorPalette; 132 | productReference = 1D6058910D05DD3D006BFB54 /* ColorPalette.app */; 133 | productType = "com.apple.product-type.application"; 134 | }; 135 | /* End PBXNativeTarget section */ 136 | 137 | /* Begin PBXProject section */ 138 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 139 | isa = PBXProject; 140 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ColorPalette" */; 141 | compatibilityVersion = "Xcode 3.1"; 142 | hasScannedForEncodings = 1; 143 | mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; 144 | projectDirPath = ""; 145 | projectRoot = ""; 146 | targets = ( 147 | 1D6058900D05DD3D006BFB54 /* ColorPalette */, 148 | ); 149 | }; 150 | /* End PBXProject section */ 151 | 152 | /* Begin PBXResourcesBuildPhase section */ 153 | 1D60588D0D05DD3D006BFB54 /* Resources */ = { 154 | isa = PBXResourcesBuildPhase; 155 | buildActionMask = 2147483647; 156 | files = ( 157 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, 158 | 2899E5220DE3E06400AC0155 /* ColorPaletteViewController.xib in Resources */, 159 | ); 160 | runOnlyForDeploymentPostprocessing = 0; 161 | }; 162 | /* End PBXResourcesBuildPhase section */ 163 | 164 | /* Begin PBXSourcesBuildPhase section */ 165 | 1D60588E0D05DD3D006BFB54 /* Sources */ = { 166 | isa = PBXSourcesBuildPhase; 167 | buildActionMask = 2147483647; 168 | files = ( 169 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 170 | 1D3623260D0F684500981E51 /* ColorPaletteAppDelegate.m in Sources */, 171 | 28D7ACF80DDB3853001CB0EB /* ColorPaletteViewController.m in Sources */, 172 | F81E4428123820200018CFA4 /* PaletteView.m in Sources */, 173 | ); 174 | runOnlyForDeploymentPostprocessing = 0; 175 | }; 176 | /* End PBXSourcesBuildPhase section */ 177 | 178 | /* Begin XCBuildConfiguration section */ 179 | 1D6058940D05DD3E006BFB54 /* Debug */ = { 180 | isa = XCBuildConfiguration; 181 | buildSettings = { 182 | ALWAYS_SEARCH_USER_PATHS = NO; 183 | COPY_PHASE_STRIP = NO; 184 | GCC_DYNAMIC_NO_PIC = NO; 185 | GCC_OPTIMIZATION_LEVEL = 0; 186 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 187 | GCC_PREFIX_HEADER = ColorPalette_Prefix.pch; 188 | INFOPLIST_FILE = "ColorPalette-Info.plist"; 189 | PRODUCT_NAME = ColorPalette; 190 | }; 191 | name = Debug; 192 | }; 193 | 1D6058950D05DD3E006BFB54 /* Release */ = { 194 | isa = XCBuildConfiguration; 195 | buildSettings = { 196 | ALWAYS_SEARCH_USER_PATHS = NO; 197 | COPY_PHASE_STRIP = YES; 198 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 199 | GCC_PREFIX_HEADER = ColorPalette_Prefix.pch; 200 | INFOPLIST_FILE = "ColorPalette-Info.plist"; 201 | PRODUCT_NAME = ColorPalette; 202 | VALIDATE_PRODUCT = YES; 203 | }; 204 | name = Release; 205 | }; 206 | C01FCF4F08A954540054247B /* Debug */ = { 207 | isa = XCBuildConfiguration; 208 | buildSettings = { 209 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 210 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 211 | GCC_C_LANGUAGE_STANDARD = c99; 212 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 213 | GCC_WARN_UNUSED_VARIABLE = YES; 214 | PREBINDING = NO; 215 | SDKROOT = iphoneos4.0; 216 | }; 217 | name = Debug; 218 | }; 219 | C01FCF5008A954540054247B /* Release */ = { 220 | isa = XCBuildConfiguration; 221 | buildSettings = { 222 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 223 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 224 | GCC_C_LANGUAGE_STANDARD = c99; 225 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 226 | GCC_WARN_UNUSED_VARIABLE = YES; 227 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 228 | PREBINDING = NO; 229 | SDKROOT = iphoneos4.0; 230 | }; 231 | name = Release; 232 | }; 233 | /* End XCBuildConfiguration section */ 234 | 235 | /* Begin XCConfigurationList section */ 236 | 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "ColorPalette" */ = { 237 | isa = XCConfigurationList; 238 | buildConfigurations = ( 239 | 1D6058940D05DD3E006BFB54 /* Debug */, 240 | 1D6058950D05DD3E006BFB54 /* Release */, 241 | ); 242 | defaultConfigurationIsVisible = 0; 243 | defaultConfigurationName = Release; 244 | }; 245 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ColorPalette" */ = { 246 | isa = XCConfigurationList; 247 | buildConfigurations = ( 248 | C01FCF4F08A954540054247B /* Debug */, 249 | C01FCF5008A954540054247B /* Release */, 250 | ); 251 | defaultConfigurationIsVisible = 0; 252 | defaultConfigurationName = Release; 253 | }; 254 | /* End XCConfigurationList section */ 255 | }; 256 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 257 | } 258 | -------------------------------------------------------------------------------- /Miscellaneous/ColorPalette/ColorPalette_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'ColorPalette' target in the 'ColorPalette' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /Miscellaneous/ColorPalette/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ColorPalette 4 | // 5 | // Created by Stefan Arentz on 10-09-08. 6 | // Copyright Arentz Consulting 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | 13 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | [pool release]; 16 | return retVal; 17 | } 18 | -------------------------------------------------------------------------------- /Miscellaneous/Flicker/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/Flicker/.DS_Store -------------------------------------------------------------------------------- /Miscellaneous/Flicker/Classes/FlickerAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // FlickerAppDelegate.h 3 | // Flicker 4 | // 5 | // Created by Stefan Arentz on 10-01-23. 6 | // Copyright Arentz Consulting 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class FlickerViewController; 12 | 13 | @interface FlickerAppDelegate : NSObject { 14 | UIWindow *window; 15 | FlickerViewController *viewController; 16 | } 17 | 18 | @property (nonatomic, retain) IBOutlet UIWindow *window; 19 | @property (nonatomic, retain) IBOutlet FlickerViewController *viewController; 20 | 21 | @end 22 | 23 | -------------------------------------------------------------------------------- /Miscellaneous/Flicker/Classes/FlickerAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // FlickerAppDelegate.m 3 | // Flicker 4 | // 5 | // Created by Stefan Arentz on 10-01-23. 6 | // Copyright Arentz Consulting 2010. All rights reserved. 7 | // 8 | 9 | #import "FlickerAppDelegate.h" 10 | #import "FlickerViewController.h" 11 | 12 | @implementation FlickerAppDelegate 13 | 14 | @synthesize window; 15 | @synthesize viewController; 16 | 17 | 18 | - (void)applicationDidFinishLaunching:(UIApplication *)application { 19 | 20 | // Override point for customization after app launch 21 | [window addSubview:viewController.view]; 22 | [window makeKeyAndVisible]; 23 | } 24 | 25 | 26 | - (void)dealloc { 27 | [viewController release]; 28 | [window release]; 29 | [super dealloc]; 30 | } 31 | 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Miscellaneous/Flicker/Classes/FlickerViewController.h: -------------------------------------------------------------------------------- 1 | // FlickerViewController.h 2 | 3 | #import 4 | 5 | @interface FlickerViewController : UIViewController { 6 | @private 7 | UIImageView* imageView_; 8 | NSTimer* timer_; 9 | } 10 | 11 | @property (nonatomic,assign) IBOutlet UIImageView* imageView; 12 | 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /Miscellaneous/Flicker/Classes/FlickerViewController.m: -------------------------------------------------------------------------------- 1 | // FlickerViewController.m 2 | 3 | #import "FlickerViewController.h" 4 | 5 | @implementation FlickerViewController 6 | 7 | @synthesize imageView = imageView_; 8 | 9 | - (void) flicker 10 | { 11 | if ((random() % 10) > 5) { 12 | imageView_.alpha = (imageView_.alpha == 0.0) ? 1.0 : 0.0; 13 | } 14 | } 15 | 16 | - (void) viewDidAppear:(BOOL)animated 17 | { 18 | timer_ = [[NSTimer scheduledTimerWithTimeInterval: 1.0 / 30.0 target: self selector: @selector(flicker) userInfo: nil repeats: YES] retain]; 19 | } 20 | 21 | - (void) viewDidDisappear:(BOOL)animated 22 | { 23 | [timer_ invalidate]; 24 | [timer_ release]; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Miscellaneous/Flicker/Flicker-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | 30 | 31 | -------------------------------------------------------------------------------- /Miscellaneous/Flicker/Flicker.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 45; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1D3623260D0F684500981E51 /* FlickerAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* FlickerAppDelegate.m */; }; 11 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 12 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 13 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 14 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; 15 | 2899E5220DE3E06400AC0155 /* FlickerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* FlickerViewController.xib */; }; 16 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; 17 | 28D7ACF80DDB3853001CB0EB /* FlickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* FlickerViewController.m */; }; 18 | F844A945110C00E9006C2515 /* wallpaper.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F844A944110C00E9006C2515 /* wallpaper.jpg */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXFileReference section */ 22 | 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 23 | 1D3623240D0F684500981E51 /* FlickerAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FlickerAppDelegate.h; sourceTree = ""; }; 24 | 1D3623250D0F684500981E51 /* FlickerAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FlickerAppDelegate.m; sourceTree = ""; }; 25 | 1D6058910D05DD3D006BFB54 /* Flicker.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Flicker.app; sourceTree = BUILT_PRODUCTS_DIR; }; 26 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 27 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 28 | 2899E5210DE3E06400AC0155 /* FlickerViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = FlickerViewController.xib; path = ../FlickerViewController.xib; sourceTree = ""; }; 29 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; 30 | 28D7ACF60DDB3853001CB0EB /* FlickerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FlickerViewController.h; sourceTree = ""; }; 31 | 28D7ACF70DDB3853001CB0EB /* FlickerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FlickerViewController.m; sourceTree = ""; }; 32 | 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 33 | 32CA4F630368D1EE00C91783 /* Flicker_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Flicker_Prefix.pch; sourceTree = ""; }; 34 | 8D1107310486CEB800E47090 /* Flicker-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Flicker-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; 35 | F844A944110C00E9006C2515 /* wallpaper.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = wallpaper.jpg; sourceTree = ""; }; 36 | /* End PBXFileReference section */ 37 | 38 | /* Begin PBXFrameworksBuildPhase section */ 39 | 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { 40 | isa = PBXFrameworksBuildPhase; 41 | buildActionMask = 2147483647; 42 | files = ( 43 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 44 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 45 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, 46 | ); 47 | runOnlyForDeploymentPostprocessing = 0; 48 | }; 49 | /* End PBXFrameworksBuildPhase section */ 50 | 51 | /* Begin PBXGroup section */ 52 | 080E96DDFE201D6D7F000001 /* Classes */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | 1D3623240D0F684500981E51 /* FlickerAppDelegate.h */, 56 | 1D3623250D0F684500981E51 /* FlickerAppDelegate.m */, 57 | 28D7ACF60DDB3853001CB0EB /* FlickerViewController.h */, 58 | 28D7ACF70DDB3853001CB0EB /* FlickerViewController.m */, 59 | 2899E5210DE3E06400AC0155 /* FlickerViewController.xib */, 60 | ); 61 | path = Classes; 62 | sourceTree = ""; 63 | }; 64 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | 1D6058910D05DD3D006BFB54 /* Flicker.app */, 68 | ); 69 | name = Products; 70 | sourceTree = ""; 71 | }; 72 | 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | 080E96DDFE201D6D7F000001 /* Classes */, 76 | 29B97315FDCFA39411CA2CEA /* Other Sources */, 77 | 29B97317FDCFA39411CA2CEA /* Resources */, 78 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 79 | 19C28FACFE9D520D11CA2CBB /* Products */, 80 | ); 81 | name = CustomTemplate; 82 | sourceTree = ""; 83 | }; 84 | 29B97315FDCFA39411CA2CEA /* Other Sources */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | 32CA4F630368D1EE00C91783 /* Flicker_Prefix.pch */, 88 | 29B97316FDCFA39411CA2CEA /* main.m */, 89 | ); 90 | name = "Other Sources"; 91 | sourceTree = ""; 92 | }; 93 | 29B97317FDCFA39411CA2CEA /* Resources */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | F844A944110C00E9006C2515 /* wallpaper.jpg */, 97 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */, 98 | 8D1107310486CEB800E47090 /* Flicker-Info.plist */, 99 | ); 100 | name = Resources; 101 | sourceTree = ""; 102 | }; 103 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 107 | 1D30AB110D05D00D00671497 /* Foundation.framework */, 108 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */, 109 | ); 110 | name = Frameworks; 111 | sourceTree = ""; 112 | }; 113 | /* End PBXGroup section */ 114 | 115 | /* Begin PBXNativeTarget section */ 116 | 1D6058900D05DD3D006BFB54 /* Flicker */ = { 117 | isa = PBXNativeTarget; 118 | buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Flicker" */; 119 | buildPhases = ( 120 | 1D60588D0D05DD3D006BFB54 /* Resources */, 121 | 1D60588E0D05DD3D006BFB54 /* Sources */, 122 | 1D60588F0D05DD3D006BFB54 /* Frameworks */, 123 | ); 124 | buildRules = ( 125 | ); 126 | dependencies = ( 127 | ); 128 | name = Flicker; 129 | productName = Flicker; 130 | productReference = 1D6058910D05DD3D006BFB54 /* Flicker.app */; 131 | productType = "com.apple.product-type.application"; 132 | }; 133 | /* End PBXNativeTarget section */ 134 | 135 | /* Begin PBXProject section */ 136 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 137 | isa = PBXProject; 138 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Flicker" */; 139 | compatibilityVersion = "Xcode 3.1"; 140 | hasScannedForEncodings = 1; 141 | mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; 142 | projectDirPath = ""; 143 | projectRoot = ""; 144 | targets = ( 145 | 1D6058900D05DD3D006BFB54 /* Flicker */, 146 | ); 147 | }; 148 | /* End PBXProject section */ 149 | 150 | /* Begin PBXResourcesBuildPhase section */ 151 | 1D60588D0D05DD3D006BFB54 /* Resources */ = { 152 | isa = PBXResourcesBuildPhase; 153 | buildActionMask = 2147483647; 154 | files = ( 155 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, 156 | 2899E5220DE3E06400AC0155 /* FlickerViewController.xib in Resources */, 157 | F844A945110C00E9006C2515 /* wallpaper.jpg in Resources */, 158 | ); 159 | runOnlyForDeploymentPostprocessing = 0; 160 | }; 161 | /* End PBXResourcesBuildPhase section */ 162 | 163 | /* Begin PBXSourcesBuildPhase section */ 164 | 1D60588E0D05DD3D006BFB54 /* Sources */ = { 165 | isa = PBXSourcesBuildPhase; 166 | buildActionMask = 2147483647; 167 | files = ( 168 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 169 | 1D3623260D0F684500981E51 /* FlickerAppDelegate.m in Sources */, 170 | 28D7ACF80DDB3853001CB0EB /* FlickerViewController.m in Sources */, 171 | ); 172 | runOnlyForDeploymentPostprocessing = 0; 173 | }; 174 | /* End PBXSourcesBuildPhase section */ 175 | 176 | /* Begin XCBuildConfiguration section */ 177 | 1D6058940D05DD3E006BFB54 /* Debug */ = { 178 | isa = XCBuildConfiguration; 179 | buildSettings = { 180 | ALWAYS_SEARCH_USER_PATHS = NO; 181 | COPY_PHASE_STRIP = NO; 182 | GCC_DYNAMIC_NO_PIC = NO; 183 | GCC_OPTIMIZATION_LEVEL = 0; 184 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 185 | GCC_PREFIX_HEADER = Flicker_Prefix.pch; 186 | INFOPLIST_FILE = "Flicker-Info.plist"; 187 | PRODUCT_NAME = Flicker; 188 | }; 189 | name = Debug; 190 | }; 191 | 1D6058950D05DD3E006BFB54 /* Release */ = { 192 | isa = XCBuildConfiguration; 193 | buildSettings = { 194 | ALWAYS_SEARCH_USER_PATHS = NO; 195 | COPY_PHASE_STRIP = YES; 196 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 197 | GCC_PREFIX_HEADER = Flicker_Prefix.pch; 198 | INFOPLIST_FILE = "Flicker-Info.plist"; 199 | PRODUCT_NAME = Flicker; 200 | }; 201 | name = Release; 202 | }; 203 | C01FCF4F08A954540054247B /* Debug */ = { 204 | isa = XCBuildConfiguration; 205 | buildSettings = { 206 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 207 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 208 | GCC_C_LANGUAGE_STANDARD = c99; 209 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 210 | GCC_WARN_UNUSED_VARIABLE = YES; 211 | PREBINDING = NO; 212 | SDKROOT = iphoneos3.1.2; 213 | }; 214 | name = Debug; 215 | }; 216 | C01FCF5008A954540054247B /* Release */ = { 217 | isa = XCBuildConfiguration; 218 | buildSettings = { 219 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 220 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 221 | GCC_C_LANGUAGE_STANDARD = c99; 222 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 223 | GCC_WARN_UNUSED_VARIABLE = YES; 224 | PREBINDING = NO; 225 | SDKROOT = iphoneos3.1.2; 226 | }; 227 | name = Release; 228 | }; 229 | /* End XCBuildConfiguration section */ 230 | 231 | /* Begin XCConfigurationList section */ 232 | 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Flicker" */ = { 233 | isa = XCConfigurationList; 234 | buildConfigurations = ( 235 | 1D6058940D05DD3E006BFB54 /* Debug */, 236 | 1D6058950D05DD3E006BFB54 /* Release */, 237 | ); 238 | defaultConfigurationIsVisible = 0; 239 | defaultConfigurationName = Release; 240 | }; 241 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Flicker" */ = { 242 | isa = XCConfigurationList; 243 | buildConfigurations = ( 244 | C01FCF4F08A954540054247B /* Debug */, 245 | C01FCF5008A954540054247B /* Release */, 246 | ); 247 | defaultConfigurationIsVisible = 0; 248 | defaultConfigurationName = Release; 249 | }; 250 | /* End XCConfigurationList section */ 251 | }; 252 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 253 | } 254 | -------------------------------------------------------------------------------- /Miscellaneous/Flicker/Flicker.xcodeproj/stefan.pbxuser: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | 1D6058900D05DD3D006BFB54 /* Flicker */ = { 4 | activeExec = 0; 5 | executables = ( 6 | F844A92F110C0002006C2515 /* Flicker */, 7 | ); 8 | }; 9 | 28D7ACF60DDB3853001CB0EB /* FlickerViewController.h */ = { 10 | uiCtxt = { 11 | sepNavIntBoundsRect = "{{0, 0}, {766, 491}}"; 12 | sepNavSelRange = "{118, 0}"; 13 | sepNavVisRange = "{0, 235}"; 14 | }; 15 | }; 16 | 28D7ACF70DDB3853001CB0EB /* FlickerViewController.m */ = { 17 | uiCtxt = { 18 | sepNavIntBoundsRect = "{{0, 0}, {1020, 491}}"; 19 | sepNavSelRange = "{355, 0}"; 20 | sepNavVisRange = "{0, 530}"; 21 | }; 22 | }; 23 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 24 | activeBuildConfigurationName = Debug; 25 | activeExecutable = F844A92F110C0002006C2515 /* Flicker */; 26 | activeSDKPreference = iphonesimulator3.1.2; 27 | activeTarget = 1D6058900D05DD3D006BFB54 /* Flicker */; 28 | addToTargets = ( 29 | 1D6058900D05DD3D006BFB54 /* Flicker */, 30 | ); 31 | codeSenseManager = F844A941110C0003006C2515 /* Code sense */; 32 | executables = ( 33 | F844A92F110C0002006C2515 /* Flicker */, 34 | ); 35 | perUserDictionary = { 36 | PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { 37 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 38 | PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; 39 | PBXFileTableDataSourceColumnWidthsKey = ( 40 | 20, 41 | 364, 42 | 20, 43 | 48.16259765625, 44 | 43, 45 | 43, 46 | 20, 47 | ); 48 | PBXFileTableDataSourceColumnsKey = ( 49 | PBXFileDataSource_FiletypeID, 50 | PBXFileDataSource_Filename_ColumnID, 51 | PBXFileDataSource_Built_ColumnID, 52 | PBXFileDataSource_ObjectSize_ColumnID, 53 | PBXFileDataSource_Errors_ColumnID, 54 | PBXFileDataSource_Warnings_ColumnID, 55 | PBXFileDataSource_Target_ColumnID, 56 | ); 57 | }; 58 | PBXPerProjectTemplateStateSaveDate = 285999106; 59 | PBXWorkspaceStateSaveDate = 285999106; 60 | }; 61 | perUserProjectItems = { 62 | F844A953110C01F7006C2515 /* PBXBookmark */ = F844A953110C01F7006C2515 /* PBXBookmark */; 63 | F844A954110C01F7006C2515 /* PBXTextBookmark */ = F844A954110C01F7006C2515 /* PBXTextBookmark */; 64 | F844A969110C0225006C2515 /* PBXTextBookmark */ = F844A969110C0225006C2515 /* PBXTextBookmark */; 65 | F844A96E110C023A006C2515 /* PBXTextBookmark */ = F844A96E110C023A006C2515 /* PBXTextBookmark */; 66 | }; 67 | sourceControlManager = F844A940110C0003006C2515 /* Source Control */; 68 | userBuildSettings = { 69 | }; 70 | }; 71 | F844A92F110C0002006C2515 /* Flicker */ = { 72 | isa = PBXExecutable; 73 | activeArgIndices = ( 74 | ); 75 | argumentStrings = ( 76 | ); 77 | autoAttachOnCrash = 1; 78 | breakpointsEnabled = 0; 79 | configStateDict = { 80 | }; 81 | customDataFormattersEnabled = 1; 82 | dataTipCustomDataFormattersEnabled = 1; 83 | dataTipShowTypeColumn = 1; 84 | dataTipSortType = 0; 85 | debuggerPlugin = GDBDebugging; 86 | disassemblyDisplayState = 0; 87 | dylibVariantSuffix = ""; 88 | enableDebugStr = 1; 89 | environmentEntries = ( 90 | ); 91 | executableSystemSymbolLevel = 0; 92 | executableUserSymbolLevel = 0; 93 | libgmallocEnabled = 0; 94 | name = Flicker; 95 | showTypeColumn = 0; 96 | sourceDirectories = ( 97 | ); 98 | }; 99 | F844A940110C0003006C2515 /* Source Control */ = { 100 | isa = PBXSourceControlManager; 101 | fallbackIsa = XCSourceControlManager; 102 | isSCMEnabled = 0; 103 | scmConfiguration = { 104 | repositoryNamesForRoots = { 105 | "" = ""; 106 | }; 107 | }; 108 | }; 109 | F844A941110C0003006C2515 /* Code sense */ = { 110 | isa = PBXCodeSenseManager; 111 | indexTemplatePath = ""; 112 | }; 113 | F844A953110C01F7006C2515 /* PBXBookmark */ = { 114 | isa = PBXBookmark; 115 | fRef = F844A944110C00E9006C2515 /* wallpaper.jpg */; 116 | }; 117 | F844A954110C01F7006C2515 /* PBXTextBookmark */ = { 118 | isa = PBXTextBookmark; 119 | fRef = 28D7ACF60DDB3853001CB0EB /* FlickerViewController.h */; 120 | name = "FlickerViewController.h: 6"; 121 | rLen = 0; 122 | rLoc = 118; 123 | rType = 0; 124 | vrLen = 235; 125 | vrLoc = 0; 126 | }; 127 | F844A969110C0225006C2515 /* PBXTextBookmark */ = { 128 | isa = PBXTextBookmark; 129 | fRef = 28D7ACF70DDB3853001CB0EB /* FlickerViewController.m */; 130 | name = "FlickerViewController.m: 18"; 131 | rLen = 0; 132 | rLoc = 352; 133 | rType = 0; 134 | vrLen = 528; 135 | vrLoc = 0; 136 | }; 137 | F844A96E110C023A006C2515 /* PBXTextBookmark */ = { 138 | isa = PBXTextBookmark; 139 | fRef = 28D7ACF70DDB3853001CB0EB /* FlickerViewController.m */; 140 | name = "FlickerViewController.m: 18"; 141 | rLen = 0; 142 | rLoc = 355; 143 | rType = 0; 144 | vrLen = 530; 145 | vrLoc = 0; 146 | }; 147 | } 148 | -------------------------------------------------------------------------------- /Miscellaneous/Flicker/Flicker_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Flicker' target in the 'Flicker' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /Miscellaneous/Flicker/MainWindow.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 784 5 | 10A394 6 | 732 7 | 1027.1 8 | 430.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 60 12 | 13 | 14 | YES 15 | 16 | 17 | 18 | YES 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | YES 23 | 24 | YES 25 | 26 | 27 | YES 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | 35 | 36 | IBFirstResponder 37 | 38 | 39 | 40 | FlickerViewController 41 | 42 | 43 | 44 | 45 | 292 46 | {320, 480} 47 | 48 | 1 49 | MSAxIDEAA 50 | 51 | NO 52 | NO 53 | 54 | 55 | 56 | 57 | 58 | YES 59 | 60 | 61 | delegate 62 | 63 | 64 | 65 | 4 66 | 67 | 68 | 69 | viewController 70 | 71 | 72 | 73 | 11 74 | 75 | 76 | 77 | window 78 | 79 | 80 | 81 | 14 82 | 83 | 84 | 85 | 86 | YES 87 | 88 | 0 89 | 90 | 91 | 92 | 93 | 94 | -1 95 | 96 | 97 | File's Owner 98 | 99 | 100 | 3 101 | 102 | 103 | Flicker App Delegate 104 | 105 | 106 | -2 107 | 108 | 109 | 110 | 111 | 10 112 | 113 | 114 | 115 | 116 | 12 117 | 118 | 119 | 120 | 121 | 122 | 123 | YES 124 | 125 | YES 126 | -1.CustomClassName 127 | -2.CustomClassName 128 | 10.CustomClassName 129 | 10.IBEditorWindowLastContentRect 130 | 10.IBPluginDependency 131 | 12.IBEditorWindowLastContentRect 132 | 12.IBPluginDependency 133 | 3.CustomClassName 134 | 3.IBPluginDependency 135 | 136 | 137 | YES 138 | UIApplication 139 | UIResponder 140 | FlickerViewController 141 | {{512, 351}, {320, 480}} 142 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 143 | {{525, 346}, {320, 480}} 144 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 145 | FlickerAppDelegate 146 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 147 | 148 | 149 | 150 | YES 151 | 152 | 153 | YES 154 | 155 | 156 | 157 | 158 | YES 159 | 160 | 161 | YES 162 | 163 | 164 | 165 | 14 166 | 167 | 168 | 169 | YES 170 | 171 | FlickerAppDelegate 172 | NSObject 173 | 174 | YES 175 | 176 | YES 177 | viewController 178 | window 179 | 180 | 181 | YES 182 | FlickerViewController 183 | UIWindow 184 | 185 | 186 | 187 | IBProjectSource 188 | Classes/FlickerAppDelegate.h 189 | 190 | 191 | 192 | FlickerAppDelegate 193 | NSObject 194 | 195 | IBUserSource 196 | 197 | 198 | 199 | 200 | FlickerViewController 201 | UIViewController 202 | 203 | IBProjectSource 204 | Classes/FlickerViewController.h 205 | 206 | 207 | 208 | 209 | 0 210 | 211 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 212 | 213 | 214 | YES 215 | Flicker.xcodeproj 216 | 3 217 | 3.1 218 | 219 | 220 | -------------------------------------------------------------------------------- /Miscellaneous/Flicker/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Flicker 4 | // 5 | // Created by Stefan Arentz on 10-01-23. 6 | // Copyright Arentz Consulting 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | 13 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | [pool release]; 16 | return retVal; 17 | } 18 | -------------------------------------------------------------------------------- /Miscellaneous/Flicker/wallpaper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/Flicker/wallpaper.jpg -------------------------------------------------------------------------------- /Miscellaneous/PixelAccess/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/PixelAccess/.DS_Store -------------------------------------------------------------------------------- /Miscellaneous/PixelAccess/Classes/PixelAccessAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // PixelAccessAppDelegate.h 3 | // PixelAccess 4 | // 5 | // Created by Stefan Arentz on 10-02-26. 6 | // Copyright Apple Inc 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class PixelAccessViewController; 12 | 13 | @interface PixelAccessAppDelegate : NSObject { 14 | UIWindow *window; 15 | PixelAccessViewController *viewController; 16 | } 17 | 18 | @property (nonatomic, retain) IBOutlet UIWindow *window; 19 | @property (nonatomic, retain) IBOutlet PixelAccessViewController *viewController; 20 | 21 | @end 22 | 23 | -------------------------------------------------------------------------------- /Miscellaneous/PixelAccess/Classes/PixelAccessAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // PixelAccessAppDelegate.m 3 | // PixelAccess 4 | // 5 | // Created by Stefan Arentz on 10-02-26. 6 | // Copyright Apple Inc 2010. All rights reserved. 7 | // 8 | 9 | #import "PixelAccessAppDelegate.h" 10 | #import "PixelAccessViewController.h" 11 | 12 | @implementation PixelAccessAppDelegate 13 | 14 | @synthesize window; 15 | @synthesize viewController; 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | 20 | // Override point for customization after app launch 21 | [window addSubview:viewController.view]; 22 | [window makeKeyAndVisible]; 23 | 24 | return YES; 25 | } 26 | 27 | 28 | - (void)dealloc { 29 | [viewController release]; 30 | [window release]; 31 | [super dealloc]; 32 | } 33 | 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Miscellaneous/PixelAccess/Classes/PixelAccessViewController.h: -------------------------------------------------------------------------------- 1 | // PixelAccessViewController.h 2 | 3 | #import 4 | 5 | @interface PixelAccessViewController : UIViewController { 6 | UILabel* label_; 7 | } 8 | 9 | @property (nonatomic,assign) IBOutlet UILabel* label; 10 | 11 | - (IBAction) processImage; 12 | 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /Miscellaneous/PixelAccess/Classes/PixelAccessViewController.m: -------------------------------------------------------------------------------- 1 | // PixelAccessViewController.mm 2 | 3 | #import "PixelAccessViewController.h" 4 | 5 | @implementation PixelAccessViewController 6 | 7 | @synthesize label = label_; 8 | 9 | /** 10 | * Structure to keep one pixel in RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA format 11 | */ 12 | 13 | struct pixel { 14 | unsigned char r, g, b, a; 15 | }; 16 | 17 | /** 18 | * Process the image and return the number of pure red pixels in it. 19 | */ 20 | 21 | - (NSUInteger) processImage: (UIImage*) image 22 | { 23 | NSUInteger numberOfRedPixels = 0; 24 | 25 | // Allocate a buffer big enough to hold all the pixels 26 | 27 | struct pixel* pixels = (struct pixel*) calloc(1, image.size.width * image.size.height * sizeof(struct pixel)); 28 | if (pixels != nil) 29 | { 30 | // Create a new bitmap 31 | 32 | CGContextRef context = CGBitmapContextCreate( 33 | (void*) pixels, 34 | image.size.width, 35 | image.size.height, 36 | 8, 37 | image.size.width * 4, 38 | CGImageGetColorSpace(image.CGImage), 39 | kCGImageAlphaPremultipliedLast 40 | ); 41 | 42 | if (context != NULL) 43 | { 44 | // Draw the image in the bitmap 45 | 46 | CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, image.size.width, image.size.height), image.CGImage); 47 | 48 | // Now that we have the image drawn in our own buffer, we can loop over the pixels to 49 | // process it. This simple case simply counts all pixels that have a pure red component. 50 | 51 | // There are probably more efficient and interesting ways to do this. But the important 52 | // part is that the pixels buffer can be read directly. 53 | 54 | NSUInteger numberOfPixels = image.size.width * image.size.height; 55 | 56 | while (numberOfPixels > 0) { 57 | if (pixels->r == 255) { 58 | numberOfRedPixels++; 59 | } 60 | pixels++; 61 | numberOfPixels--; 62 | } 63 | 64 | CGContextRelease(context); 65 | } 66 | 67 | free(pixels); 68 | } 69 | 70 | return numberOfRedPixels; 71 | } 72 | 73 | - (IBAction) processImage 74 | { 75 | NSUInteger numberOfRedPixels = [self processImage: [UIImage imageNamed: @"DutchFlag.png"]]; 76 | label_.text = [NSString stringWithFormat: @"There are %d red pixels in the image", numberOfRedPixels]; 77 | } 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /Miscellaneous/PixelAccess/Classes/PixelAccessViewController.mm: -------------------------------------------------------------------------------- 1 | // PixelAccessViewController.m 2 | 3 | #import "PixelAccessViewController.h" 4 | 5 | @implementation PixelAccessViewController 6 | 7 | @synthesize label = label_; 8 | 9 | /** 10 | * Structure to keep one pixel in RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA format 11 | */ 12 | 13 | struct pixel { 14 | unsigned char r, g, b, a; 15 | }; 16 | 17 | /** 18 | * Process the image and return the number of pure red pixels in it. 19 | */ 20 | 21 | - (NSUInteger) processImage: (UIImage*) image 22 | { 23 | NSUInteger numberOfRedPixels = 0; 24 | 25 | // Allocate a buffer big enough to hold all the pixels 26 | 27 | pixel* pixels = (pixel*) calloc(1, image.size.width * image.size.height * sizeof(pixel)); 28 | if (pixels != nil) 29 | { 30 | // Create a new bitmap 31 | 32 | CGContextRef context = CGBitmapContextCreate( 33 | (void*) pixels, 34 | image.size.width, 35 | image.size.height, 36 | 8, 37 | image.size.width * 4, 38 | CGImageGetColorSpace(image.CGImage), 39 | kCGImageAlphaPremultipliedLast 40 | ); 41 | 42 | if (context != NULL) 43 | { 44 | // Draw the image in the bitmap 45 | 46 | CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, image.size.width, image.size.height), image.CGImage); 47 | 48 | // Now that we have the image drawn in our own buffer, we can loop over the pixels to 49 | // process it. This simple case simply counts all pixels that have a pure red component. 50 | 51 | // There are probably more efficient and interesting ways to do this. But the important 52 | // part is that the pixels buffer can be read directly. 53 | 54 | NSUInteger numberOfPixels = image.size.width * image.size.height; 55 | 56 | while (numberOfPixels > 0) { 57 | if (pixels->r == 255) { 58 | numberOfRedPixels++; 59 | } 60 | pixels++; 61 | numberOfPixels--; 62 | } 63 | 64 | CGContextRelease(context); 65 | } 66 | 67 | free(pixels); 68 | } 69 | 70 | return numberOfRedPixels; 71 | } 72 | 73 | - (IBAction) processImage 74 | { 75 | NSUInteger numberOfRedPixels = [self processImage: [UIImage imageNamed: @"DutchFlag.png"]]; 76 | label_.text = [NSString stringWithFormat: @"There are %d red pixels in the image", numberOfRedPixels]; 77 | } 78 | 79 | @end -------------------------------------------------------------------------------- /Miscellaneous/PixelAccess/DutchFlag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/PixelAccess/DutchFlag.png -------------------------------------------------------------------------------- /Miscellaneous/PixelAccess/MainWindow.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 800 5 | 10D540 6 | 760 7 | 1038.29 8 | 460.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 81 12 | 13 | 14 | YES 15 | 16 | 17 | 18 | YES 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | YES 23 | 24 | YES 25 | 26 | 27 | YES 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | IBCocoaTouchFramework 35 | 36 | 37 | IBFirstResponder 38 | IBCocoaTouchFramework 39 | 40 | 41 | IBCocoaTouchFramework 42 | 43 | 44 | PixelAccessViewController 45 | 46 | IBCocoaTouchFramework 47 | 48 | 49 | 50 | 292 51 | {320, 480} 52 | 53 | 1 54 | MSAxIDEAA 55 | 56 | NO 57 | NO 58 | 59 | IBCocoaTouchFramework 60 | YES 61 | 62 | 63 | 64 | 65 | YES 66 | 67 | 68 | delegate 69 | 70 | 71 | 72 | 4 73 | 74 | 75 | 76 | viewController 77 | 78 | 79 | 80 | 11 81 | 82 | 83 | 84 | window 85 | 86 | 87 | 88 | 14 89 | 90 | 91 | 92 | 93 | YES 94 | 95 | 0 96 | 97 | 98 | 99 | 100 | 101 | -1 102 | 103 | 104 | File's Owner 105 | 106 | 107 | 3 108 | 109 | 110 | PixelAccess App Delegate 111 | 112 | 113 | -2 114 | 115 | 116 | 117 | 118 | 10 119 | 120 | 121 | 122 | 123 | 12 124 | 125 | 126 | 127 | 128 | 129 | 130 | YES 131 | 132 | YES 133 | -1.CustomClassName 134 | -2.CustomClassName 135 | 10.CustomClassName 136 | 10.IBEditorWindowLastContentRect 137 | 10.IBPluginDependency 138 | 12.IBEditorWindowLastContentRect 139 | 12.IBPluginDependency 140 | 3.CustomClassName 141 | 3.IBPluginDependency 142 | 143 | 144 | YES 145 | UIApplication 146 | UIResponder 147 | PixelAccessViewController 148 | {{234, 376}, {320, 480}} 149 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 150 | {{525, 346}, {320, 480}} 151 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 152 | PixelAccessAppDelegate 153 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 154 | 155 | 156 | 157 | YES 158 | 159 | 160 | YES 161 | 162 | 163 | 164 | 165 | YES 166 | 167 | 168 | YES 169 | 170 | 171 | 172 | 14 173 | 174 | 175 | 176 | YES 177 | 178 | PixelAccessAppDelegate 179 | NSObject 180 | 181 | YES 182 | 183 | YES 184 | viewController 185 | window 186 | 187 | 188 | YES 189 | PixelAccessViewController 190 | UIWindow 191 | 192 | 193 | 194 | IBProjectSource 195 | Classes/PixelAccessAppDelegate.h 196 | 197 | 198 | 199 | PixelAccessAppDelegate 200 | NSObject 201 | 202 | IBUserSource 203 | 204 | 205 | 206 | 207 | PixelAccessViewController 208 | UIViewController 209 | 210 | IBProjectSource 211 | Classes/PixelAccessViewController.h 212 | 213 | 214 | 215 | 216 | 0 217 | IBCocoaTouchFramework 218 | 219 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 220 | 221 | 222 | YES 223 | PixelAccess.xcodeproj 224 | 3 225 | 81 226 | 227 | 228 | -------------------------------------------------------------------------------- /Miscellaneous/PixelAccess/PixelAccess-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | 30 | 31 | -------------------------------------------------------------------------------- /Miscellaneous/PixelAccess/PixelAccess.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 45; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1D3623260D0F684500981E51 /* PixelAccessAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* PixelAccessAppDelegate.m */; }; 11 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 12 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 13 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 14 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; 15 | 2899E5220DE3E06400AC0155 /* PixelAccessViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* PixelAccessViewController.xib */; }; 16 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; 17 | 28D7ACF80DDB3853001CB0EB /* PixelAccessViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* PixelAccessViewController.m */; }; 18 | F815272511385741000D0466 /* DutchFlag.png in Resources */ = {isa = PBXBuildFile; fileRef = F815272411385741000D0466 /* DutchFlag.png */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXFileReference section */ 22 | 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 23 | 1D3623240D0F684500981E51 /* PixelAccessAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PixelAccessAppDelegate.h; sourceTree = ""; }; 24 | 1D3623250D0F684500981E51 /* PixelAccessAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PixelAccessAppDelegate.m; sourceTree = ""; }; 25 | 1D6058910D05DD3D006BFB54 /* PixelAccess.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PixelAccess.app; sourceTree = BUILT_PRODUCTS_DIR; }; 26 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 27 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 28 | 2899E5210DE3E06400AC0155 /* PixelAccessViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PixelAccessViewController.xib; sourceTree = ""; }; 29 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; 30 | 28D7ACF60DDB3853001CB0EB /* PixelAccessViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PixelAccessViewController.h; sourceTree = ""; }; 31 | 28D7ACF70DDB3853001CB0EB /* PixelAccessViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PixelAccessViewController.m; sourceTree = ""; }; 32 | 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 33 | 32CA4F630368D1EE00C91783 /* PixelAccess_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PixelAccess_Prefix.pch; sourceTree = ""; }; 34 | 8D1107310486CEB800E47090 /* PixelAccess-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "PixelAccess-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; 35 | F815272411385741000D0466 /* DutchFlag.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = DutchFlag.png; sourceTree = ""; }; 36 | /* End PBXFileReference section */ 37 | 38 | /* Begin PBXFrameworksBuildPhase section */ 39 | 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { 40 | isa = PBXFrameworksBuildPhase; 41 | buildActionMask = 2147483647; 42 | files = ( 43 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 44 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 45 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, 46 | ); 47 | runOnlyForDeploymentPostprocessing = 0; 48 | }; 49 | /* End PBXFrameworksBuildPhase section */ 50 | 51 | /* Begin PBXGroup section */ 52 | 080E96DDFE201D6D7F000001 /* Classes */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | 1D3623240D0F684500981E51 /* PixelAccessAppDelegate.h */, 56 | 1D3623250D0F684500981E51 /* PixelAccessAppDelegate.m */, 57 | 28D7ACF60DDB3853001CB0EB /* PixelAccessViewController.h */, 58 | 28D7ACF70DDB3853001CB0EB /* PixelAccessViewController.m */, 59 | ); 60 | path = Classes; 61 | sourceTree = ""; 62 | }; 63 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 64 | isa = PBXGroup; 65 | children = ( 66 | 1D6058910D05DD3D006BFB54 /* PixelAccess.app */, 67 | ); 68 | name = Products; 69 | sourceTree = ""; 70 | }; 71 | 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | 080E96DDFE201D6D7F000001 /* Classes */, 75 | 29B97315FDCFA39411CA2CEA /* Other Sources */, 76 | 29B97317FDCFA39411CA2CEA /* Resources */, 77 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 78 | 19C28FACFE9D520D11CA2CBB /* Products */, 79 | ); 80 | name = CustomTemplate; 81 | sourceTree = ""; 82 | }; 83 | 29B97315FDCFA39411CA2CEA /* Other Sources */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 32CA4F630368D1EE00C91783 /* PixelAccess_Prefix.pch */, 87 | 29B97316FDCFA39411CA2CEA /* main.m */, 88 | ); 89 | name = "Other Sources"; 90 | sourceTree = ""; 91 | }; 92 | 29B97317FDCFA39411CA2CEA /* Resources */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | F815272411385741000D0466 /* DutchFlag.png */, 96 | 2899E5210DE3E06400AC0155 /* PixelAccessViewController.xib */, 97 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */, 98 | 8D1107310486CEB800E47090 /* PixelAccess-Info.plist */, 99 | ); 100 | name = Resources; 101 | sourceTree = ""; 102 | }; 103 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 107 | 1D30AB110D05D00D00671497 /* Foundation.framework */, 108 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */, 109 | ); 110 | name = Frameworks; 111 | sourceTree = ""; 112 | }; 113 | /* End PBXGroup section */ 114 | 115 | /* Begin PBXNativeTarget section */ 116 | 1D6058900D05DD3D006BFB54 /* PixelAccess */ = { 117 | isa = PBXNativeTarget; 118 | buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "PixelAccess" */; 119 | buildPhases = ( 120 | 1D60588D0D05DD3D006BFB54 /* Resources */, 121 | 1D60588E0D05DD3D006BFB54 /* Sources */, 122 | 1D60588F0D05DD3D006BFB54 /* Frameworks */, 123 | ); 124 | buildRules = ( 125 | ); 126 | dependencies = ( 127 | ); 128 | name = PixelAccess; 129 | productName = PixelAccess; 130 | productReference = 1D6058910D05DD3D006BFB54 /* PixelAccess.app */; 131 | productType = "com.apple.product-type.application"; 132 | }; 133 | /* End PBXNativeTarget section */ 134 | 135 | /* Begin PBXProject section */ 136 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 137 | isa = PBXProject; 138 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "PixelAccess" */; 139 | compatibilityVersion = "Xcode 3.1"; 140 | hasScannedForEncodings = 1; 141 | mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; 142 | projectDirPath = ""; 143 | projectRoot = ""; 144 | targets = ( 145 | 1D6058900D05DD3D006BFB54 /* PixelAccess */, 146 | ); 147 | }; 148 | /* End PBXProject section */ 149 | 150 | /* Begin PBXResourcesBuildPhase section */ 151 | 1D60588D0D05DD3D006BFB54 /* Resources */ = { 152 | isa = PBXResourcesBuildPhase; 153 | buildActionMask = 2147483647; 154 | files = ( 155 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, 156 | 2899E5220DE3E06400AC0155 /* PixelAccessViewController.xib in Resources */, 157 | F815272511385741000D0466 /* DutchFlag.png in Resources */, 158 | ); 159 | runOnlyForDeploymentPostprocessing = 0; 160 | }; 161 | /* End PBXResourcesBuildPhase section */ 162 | 163 | /* Begin PBXSourcesBuildPhase section */ 164 | 1D60588E0D05DD3D006BFB54 /* Sources */ = { 165 | isa = PBXSourcesBuildPhase; 166 | buildActionMask = 2147483647; 167 | files = ( 168 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 169 | 1D3623260D0F684500981E51 /* PixelAccessAppDelegate.m in Sources */, 170 | 28D7ACF80DDB3853001CB0EB /* PixelAccessViewController.m in Sources */, 171 | ); 172 | runOnlyForDeploymentPostprocessing = 0; 173 | }; 174 | /* End PBXSourcesBuildPhase section */ 175 | 176 | /* Begin XCBuildConfiguration section */ 177 | 1D6058940D05DD3E006BFB54 /* Debug */ = { 178 | isa = XCBuildConfiguration; 179 | buildSettings = { 180 | ALWAYS_SEARCH_USER_PATHS = NO; 181 | COPY_PHASE_STRIP = NO; 182 | GCC_DYNAMIC_NO_PIC = NO; 183 | GCC_OPTIMIZATION_LEVEL = 0; 184 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 185 | GCC_PREFIX_HEADER = PixelAccess_Prefix.pch; 186 | INFOPLIST_FILE = "PixelAccess-Info.plist"; 187 | PRODUCT_NAME = PixelAccess; 188 | }; 189 | name = Debug; 190 | }; 191 | 1D6058950D05DD3E006BFB54 /* Release */ = { 192 | isa = XCBuildConfiguration; 193 | buildSettings = { 194 | ALWAYS_SEARCH_USER_PATHS = NO; 195 | COPY_PHASE_STRIP = YES; 196 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 197 | GCC_PREFIX_HEADER = PixelAccess_Prefix.pch; 198 | INFOPLIST_FILE = "PixelAccess-Info.plist"; 199 | PRODUCT_NAME = PixelAccess; 200 | VALIDATE_PRODUCT = YES; 201 | }; 202 | name = Release; 203 | }; 204 | C01FCF4F08A954540054247B /* Debug */ = { 205 | isa = XCBuildConfiguration; 206 | buildSettings = { 207 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 208 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 209 | GCC_C_LANGUAGE_STANDARD = c99; 210 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 211 | GCC_WARN_UNUSED_VARIABLE = YES; 212 | PREBINDING = NO; 213 | SDKROOT = iphoneos3.2; 214 | }; 215 | name = Debug; 216 | }; 217 | C01FCF5008A954540054247B /* Release */ = { 218 | isa = XCBuildConfiguration; 219 | buildSettings = { 220 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 221 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 222 | GCC_C_LANGUAGE_STANDARD = c99; 223 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 224 | GCC_WARN_UNUSED_VARIABLE = YES; 225 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 226 | PREBINDING = NO; 227 | SDKROOT = iphoneos3.2; 228 | }; 229 | name = Release; 230 | }; 231 | /* End XCBuildConfiguration section */ 232 | 233 | /* Begin XCConfigurationList section */ 234 | 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "PixelAccess" */ = { 235 | isa = XCConfigurationList; 236 | buildConfigurations = ( 237 | 1D6058940D05DD3E006BFB54 /* Debug */, 238 | 1D6058950D05DD3E006BFB54 /* Release */, 239 | ); 240 | defaultConfigurationIsVisible = 0; 241 | defaultConfigurationName = Release; 242 | }; 243 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "PixelAccess" */ = { 244 | isa = XCConfigurationList; 245 | buildConfigurations = ( 246 | C01FCF4F08A954540054247B /* Debug */, 247 | C01FCF5008A954540054247B /* Release */, 248 | ); 249 | defaultConfigurationIsVisible = 0; 250 | defaultConfigurationName = Release; 251 | }; 252 | /* End XCConfigurationList section */ 253 | }; 254 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 255 | } 256 | -------------------------------------------------------------------------------- /Miscellaneous/PixelAccess/PixelAccess.xcodeproj/stefan.pbxuser: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | 1D6058900D05DD3D006BFB54 /* PixelAccess */ = { 4 | activeExec = 0; 5 | executables = ( 6 | F815271111385733000D0466 /* PixelAccess */, 7 | ); 8 | }; 9 | 28D7ACF60DDB3853001CB0EB /* PixelAccessViewController.h */ = { 10 | uiCtxt = { 11 | sepNavIntBoundsRect = "{{0, 0}, {904, 893}}"; 12 | sepNavSelRange = "{136, 0}"; 13 | sepNavVisRange = "{0, 226}"; 14 | }; 15 | }; 16 | 28D7ACF70DDB3853001CB0EB /* PixelAccessViewController.m */ = { 17 | uiCtxt = { 18 | sepNavIntBoundsRect = "{{0, 0}, {904, 1053}}"; 19 | sepNavSelRange = "{353, 0}"; 20 | sepNavVisRange = "{0, 1655}"; 21 | }; 22 | }; 23 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 24 | activeBuildConfigurationName = Debug; 25 | activeExecutable = F815271111385733000D0466 /* PixelAccess */; 26 | activeTarget = 1D6058900D05DD3D006BFB54 /* PixelAccess */; 27 | addToTargets = ( 28 | 1D6058900D05DD3D006BFB54 /* PixelAccess */, 29 | ); 30 | codeSenseManager = F815272311385736000D0466 /* Code sense */; 31 | executables = ( 32 | F815271111385733000D0466 /* PixelAccess */, 33 | ); 34 | perUserDictionary = { 35 | PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { 36 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 37 | PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; 38 | PBXFileTableDataSourceColumnWidthsKey = ( 39 | 20, 40 | 726, 41 | 20, 42 | 48.16259765625, 43 | 43, 44 | 43, 45 | 20, 46 | ); 47 | PBXFileTableDataSourceColumnsKey = ( 48 | PBXFileDataSource_FiletypeID, 49 | PBXFileDataSource_Filename_ColumnID, 50 | PBXFileDataSource_Built_ColumnID, 51 | PBXFileDataSource_ObjectSize_ColumnID, 52 | PBXFileDataSource_Errors_ColumnID, 53 | PBXFileDataSource_Warnings_ColumnID, 54 | PBXFileDataSource_Target_ColumnID, 55 | ); 56 | }; 57 | PBXPerProjectTemplateStateSaveDate = 288905011; 58 | PBXWorkspaceStateSaveDate = 288905011; 59 | }; 60 | perUserProjectItems = { 61 | F815273211385831000D0466 /* PBXBookmark */ = F815273211385831000D0466 /* PBXBookmark */; 62 | F815275011385894000D0466 /* PBXTextBookmark */ = F815275011385894000D0466 /* PBXTextBookmark */; 63 | F815275211385894000D0466 /* PBXTextBookmark */ = F815275211385894000D0466 /* PBXTextBookmark */; 64 | F815275311385894000D0466 /* PBXTextBookmark */ = F815275311385894000D0466 /* PBXTextBookmark */; 65 | F8152756113858A5000D0466 /* PBXTextBookmark */ = F8152756113858A5000D0466 /* PBXTextBookmark */; 66 | }; 67 | sourceControlManager = F815272211385736000D0466 /* Source Control */; 68 | userBuildSettings = { 69 | }; 70 | }; 71 | F815271111385733000D0466 /* PixelAccess */ = { 72 | isa = PBXExecutable; 73 | activeArgIndices = ( 74 | ); 75 | argumentStrings = ( 76 | ); 77 | autoAttachOnCrash = 1; 78 | breakpointsEnabled = 0; 79 | configStateDict = { 80 | }; 81 | customDataFormattersEnabled = 1; 82 | dataTipCustomDataFormattersEnabled = 1; 83 | dataTipShowTypeColumn = 1; 84 | dataTipSortType = 0; 85 | debuggerPlugin = GDBDebugging; 86 | disassemblyDisplayState = 0; 87 | dylibVariantSuffix = ""; 88 | enableDebugStr = 1; 89 | environmentEntries = ( 90 | ); 91 | executableSystemSymbolLevel = 0; 92 | executableUserSymbolLevel = 0; 93 | libgmallocEnabled = 0; 94 | name = PixelAccess; 95 | showTypeColumn = 0; 96 | sourceDirectories = ( 97 | ); 98 | }; 99 | F815272211385736000D0466 /* Source Control */ = { 100 | isa = PBXSourceControlManager; 101 | fallbackIsa = XCSourceControlManager; 102 | isSCMEnabled = 0; 103 | scmConfiguration = { 104 | repositoryNamesForRoots = { 105 | "" = ""; 106 | }; 107 | }; 108 | }; 109 | F815272311385736000D0466 /* Code sense */ = { 110 | isa = PBXCodeSenseManager; 111 | indexTemplatePath = ""; 112 | }; 113 | F815273211385831000D0466 /* PBXBookmark */ = { 114 | isa = PBXBookmark; 115 | fRef = F815272411385741000D0466 /* DutchFlag.png */; 116 | }; 117 | F815275011385894000D0466 /* PBXTextBookmark */ = { 118 | isa = PBXTextBookmark; 119 | fRef = F815275111385894000D0466 /* PixelAccessViewController.mm */; 120 | name = "PixelAccessViewController.mm: 13"; 121 | rLen = 0; 122 | rLoc = 237; 123 | rType = 0; 124 | vrLen = 1673; 125 | vrLoc = 221; 126 | }; 127 | F815275111385894000D0466 /* PixelAccessViewController.mm */ = { 128 | isa = PBXFileReference; 129 | name = PixelAccessViewController.mm; 130 | path = /Users/stefan/Desktop/PixelAccess/Classes/PixelAccessViewController.mm; 131 | sourceTree = ""; 132 | uiCtxt = { 133 | sepNavIntBoundsRect = "{{0, 0}, {1233, 1027}}"; 134 | sepNavSelRange = "{1502, 0}"; 135 | sepNavVisRange = "{1248, 384}"; 136 | }; 137 | }; 138 | F815275211385894000D0466 /* PBXTextBookmark */ = { 139 | isa = PBXTextBookmark; 140 | fRef = 28D7ACF60DDB3853001CB0EB /* PixelAccessViewController.h */; 141 | name = "PixelAccessViewController.h: 8"; 142 | rLen = 0; 143 | rLoc = 136; 144 | rType = 0; 145 | vrLen = 226; 146 | vrLoc = 0; 147 | }; 148 | F815275311385894000D0466 /* PBXTextBookmark */ = { 149 | isa = PBXTextBookmark; 150 | fRef = 28D7ACF70DDB3853001CB0EB /* PixelAccessViewController.m */; 151 | name = "PixelAccessViewController.m: 1"; 152 | rLen = 0; 153 | rLoc = 0; 154 | rType = 0; 155 | vrLen = 1655; 156 | vrLoc = 0; 157 | }; 158 | F8152756113858A5000D0466 /* PBXTextBookmark */ = { 159 | isa = PBXTextBookmark; 160 | fRef = 28D7ACF70DDB3853001CB0EB /* PixelAccessViewController.m */; 161 | name = "PixelAccessViewController.m: 19"; 162 | rLen = 0; 163 | rLoc = 353; 164 | rType = 0; 165 | vrLen = 1655; 166 | vrLoc = 0; 167 | }; 168 | } 169 | -------------------------------------------------------------------------------- /Miscellaneous/PixelAccess/PixelAccess_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'PixelAccess' target in the 'PixelAccess' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /Miscellaneous/PixelAccess/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // PixelAccess 4 | // 5 | // Created by Stefan Arentz on 10-02-26. 6 | // Copyright Apple Inc 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | 13 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | [pool release]; 16 | return retVal; 17 | } 18 | -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/Classes/TestAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // TestAppDelegate.h 3 | // Test 4 | // 5 | // Created by Stefan Arentz on 10-09-07. 6 | // Copyright Arentz Consulting 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class TestViewController; 12 | 13 | @interface TestAppDelegate : NSObject { 14 | UIWindow *window; 15 | TestViewController *viewController; 16 | } 17 | 18 | @property (nonatomic, retain) IBOutlet UIWindow *window; 19 | @property (nonatomic, retain) IBOutlet TestViewController *viewController; 20 | 21 | @end 22 | 23 | -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/Classes/TestAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // TestAppDelegate.m 3 | // Test 4 | // 5 | // Created by Stefan Arentz on 10-09-07. 6 | // Copyright Arentz Consulting 2010. All rights reserved. 7 | // 8 | 9 | #import "TestAppDelegate.h" 10 | #import "TestViewController.h" 11 | 12 | @implementation TestAppDelegate 13 | 14 | @synthesize window; 15 | @synthesize viewController; 16 | 17 | 18 | #pragma mark - 19 | #pragma mark Application lifecycle 20 | 21 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 22 | 23 | // Override point for customization after application launch. 24 | 25 | // Add the view controller's view to the window and display. 26 | [window addSubview:viewController.view]; 27 | [window makeKeyAndVisible]; 28 | 29 | return YES; 30 | } 31 | 32 | 33 | - (void)applicationWillResignActive:(UIApplication *)application { 34 | /* 35 | 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. 36 | 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. 37 | */ 38 | } 39 | 40 | 41 | - (void)applicationDidEnterBackground:(UIApplication *)application { 42 | /* 43 | 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. 44 | If your application supports background execution, called instead of applicationWillTerminate: when the user quits. 45 | */ 46 | } 47 | 48 | 49 | - (void)applicationWillEnterForeground:(UIApplication *)application { 50 | /* 51 | 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. 52 | */ 53 | } 54 | 55 | 56 | - (void)applicationDidBecomeActive:(UIApplication *)application { 57 | /* 58 | 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. 59 | */ 60 | } 61 | 62 | 63 | - (void)applicationWillTerminate:(UIApplication *)application { 64 | /* 65 | Called when the application is about to terminate. 66 | See also applicationDidEnterBackground:. 67 | */ 68 | } 69 | 70 | 71 | #pragma mark - 72 | #pragma mark Memory management 73 | 74 | - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { 75 | /* 76 | Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. 77 | */ 78 | } 79 | 80 | 81 | - (void)dealloc { 82 | [viewController release]; 83 | [window release]; 84 | [super dealloc]; 85 | } 86 | 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/Classes/TestViewController.h: -------------------------------------------------------------------------------- 1 | // TestViewController.h 2 | 3 | #import 4 | 5 | @interface TestViewController : UIViewController { 6 | @private 7 | UITextField* _textField; 8 | UILabel* _label; 9 | } 10 | 11 | @property (nonatomic,assign) IBOutlet UITextField* textField; 12 | @property (nonatomic,assign) IBOutlet UILabel* label; 13 | 14 | @end -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/Classes/TestViewController.m: -------------------------------------------------------------------------------- 1 | // TestViewController.m 2 | 3 | #import "TestViewController.h" 4 | 5 | @implementation TestViewController 6 | 7 | @synthesize textField = _textField; 8 | @synthesize label = _label; 9 | 10 | - (BOOL) textFieldShouldBeginEditing:(UITextField *)textField 11 | { 12 | CGRect frame = _textField.frame; 13 | frame.size.width += 80; 14 | frame.origin.x -= 80; 15 | 16 | [UIView beginAnimations: @"GrowTextField" context: nil]; 17 | { 18 | _textField.frame = frame; 19 | [UIView setAnimationDuration: 0.5]; 20 | } 21 | [UIView commitAnimations]; 22 | 23 | return YES; 24 | } 25 | 26 | - (BOOL) textFieldShouldReturn:(UITextField *)textField 27 | { 28 | CGRect frame = _textField.frame; 29 | frame.size.width -= 80; 30 | frame.origin.x += 80; 31 | 32 | [UIView beginAnimations: @"ShrinkTextField" context: nil]; 33 | { 34 | _textField.frame = frame; 35 | [UIView setAnimationDuration: 0.5]; 36 | } 37 | [UIView commitAnimations]; 38 | 39 | [textField resignFirstResponder]; 40 | 41 | _label.text = textField.text; 42 | 43 | return YES; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/Test-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | 30 | 31 | -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/Test.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 45; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1D3623260D0F684500981E51 /* TestAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* TestAppDelegate.m */; }; 11 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 12 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 13 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 14 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; 15 | 2899E5220DE3E06400AC0155 /* TestViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* TestViewController.xib */; }; 16 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; 17 | 28D7ACF80DDB3853001CB0EB /* TestViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* TestViewController.m */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXFileReference section */ 21 | 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 22 | 1D3623240D0F684500981E51 /* TestAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestAppDelegate.h; sourceTree = ""; }; 23 | 1D3623250D0F684500981E51 /* TestAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestAppDelegate.m; sourceTree = ""; }; 24 | 1D6058910D05DD3D006BFB54 /* Test.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Test.app; sourceTree = BUILT_PRODUCTS_DIR; }; 25 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 26 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 27 | 2899E5210DE3E06400AC0155 /* TestViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TestViewController.xib; sourceTree = ""; }; 28 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; 29 | 28D7ACF60DDB3853001CB0EB /* TestViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestViewController.h; sourceTree = ""; }; 30 | 28D7ACF70DDB3853001CB0EB /* TestViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestViewController.m; sourceTree = ""; }; 31 | 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 32 | 32CA4F630368D1EE00C91783 /* Test_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Test_Prefix.pch; sourceTree = ""; }; 33 | 8D1107310486CEB800E47090 /* Test-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Test-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; 34 | /* End PBXFileReference section */ 35 | 36 | /* Begin PBXFrameworksBuildPhase section */ 37 | 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { 38 | isa = PBXFrameworksBuildPhase; 39 | buildActionMask = 2147483647; 40 | files = ( 41 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 42 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 43 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, 44 | ); 45 | runOnlyForDeploymentPostprocessing = 0; 46 | }; 47 | /* End PBXFrameworksBuildPhase section */ 48 | 49 | /* Begin PBXGroup section */ 50 | 080E96DDFE201D6D7F000001 /* Classes */ = { 51 | isa = PBXGroup; 52 | children = ( 53 | 1D3623240D0F684500981E51 /* TestAppDelegate.h */, 54 | 1D3623250D0F684500981E51 /* TestAppDelegate.m */, 55 | 28D7ACF60DDB3853001CB0EB /* TestViewController.h */, 56 | 28D7ACF70DDB3853001CB0EB /* TestViewController.m */, 57 | ); 58 | path = Classes; 59 | sourceTree = ""; 60 | }; 61 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 62 | isa = PBXGroup; 63 | children = ( 64 | 1D6058910D05DD3D006BFB54 /* Test.app */, 65 | ); 66 | name = Products; 67 | sourceTree = ""; 68 | }; 69 | 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { 70 | isa = PBXGroup; 71 | children = ( 72 | 080E96DDFE201D6D7F000001 /* Classes */, 73 | 29B97315FDCFA39411CA2CEA /* Other Sources */, 74 | 29B97317FDCFA39411CA2CEA /* Resources */, 75 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 76 | 19C28FACFE9D520D11CA2CBB /* Products */, 77 | ); 78 | name = CustomTemplate; 79 | sourceTree = ""; 80 | }; 81 | 29B97315FDCFA39411CA2CEA /* Other Sources */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | 32CA4F630368D1EE00C91783 /* Test_Prefix.pch */, 85 | 29B97316FDCFA39411CA2CEA /* main.m */, 86 | ); 87 | name = "Other Sources"; 88 | sourceTree = ""; 89 | }; 90 | 29B97317FDCFA39411CA2CEA /* Resources */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 2899E5210DE3E06400AC0155 /* TestViewController.xib */, 94 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */, 95 | 8D1107310486CEB800E47090 /* Test-Info.plist */, 96 | ); 97 | name = Resources; 98 | sourceTree = ""; 99 | }; 100 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 101 | isa = PBXGroup; 102 | children = ( 103 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 104 | 1D30AB110D05D00D00671497 /* Foundation.framework */, 105 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */, 106 | ); 107 | name = Frameworks; 108 | sourceTree = ""; 109 | }; 110 | /* End PBXGroup section */ 111 | 112 | /* Begin PBXNativeTarget section */ 113 | 1D6058900D05DD3D006BFB54 /* Test */ = { 114 | isa = PBXNativeTarget; 115 | buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Test" */; 116 | buildPhases = ( 117 | 1D60588D0D05DD3D006BFB54 /* Resources */, 118 | 1D60588E0D05DD3D006BFB54 /* Sources */, 119 | 1D60588F0D05DD3D006BFB54 /* Frameworks */, 120 | ); 121 | buildRules = ( 122 | ); 123 | dependencies = ( 124 | ); 125 | name = Test; 126 | productName = Test; 127 | productReference = 1D6058910D05DD3D006BFB54 /* Test.app */; 128 | productType = "com.apple.product-type.application"; 129 | }; 130 | /* End PBXNativeTarget section */ 131 | 132 | /* Begin PBXProject section */ 133 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 134 | isa = PBXProject; 135 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Test" */; 136 | compatibilityVersion = "Xcode 3.1"; 137 | hasScannedForEncodings = 1; 138 | mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; 139 | projectDirPath = ""; 140 | projectRoot = ""; 141 | targets = ( 142 | 1D6058900D05DD3D006BFB54 /* Test */, 143 | ); 144 | }; 145 | /* End PBXProject section */ 146 | 147 | /* Begin PBXResourcesBuildPhase section */ 148 | 1D60588D0D05DD3D006BFB54 /* Resources */ = { 149 | isa = PBXResourcesBuildPhase; 150 | buildActionMask = 2147483647; 151 | files = ( 152 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, 153 | 2899E5220DE3E06400AC0155 /* TestViewController.xib in Resources */, 154 | ); 155 | runOnlyForDeploymentPostprocessing = 0; 156 | }; 157 | /* End PBXResourcesBuildPhase section */ 158 | 159 | /* Begin PBXSourcesBuildPhase section */ 160 | 1D60588E0D05DD3D006BFB54 /* Sources */ = { 161 | isa = PBXSourcesBuildPhase; 162 | buildActionMask = 2147483647; 163 | files = ( 164 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 165 | 1D3623260D0F684500981E51 /* TestAppDelegate.m in Sources */, 166 | 28D7ACF80DDB3853001CB0EB /* TestViewController.m in Sources */, 167 | ); 168 | runOnlyForDeploymentPostprocessing = 0; 169 | }; 170 | /* End PBXSourcesBuildPhase section */ 171 | 172 | /* Begin XCBuildConfiguration section */ 173 | 1D6058940D05DD3E006BFB54 /* Debug */ = { 174 | isa = XCBuildConfiguration; 175 | buildSettings = { 176 | ALWAYS_SEARCH_USER_PATHS = NO; 177 | COPY_PHASE_STRIP = NO; 178 | GCC_DYNAMIC_NO_PIC = NO; 179 | GCC_OPTIMIZATION_LEVEL = 0; 180 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 181 | GCC_PREFIX_HEADER = Test_Prefix.pch; 182 | INFOPLIST_FILE = "Test-Info.plist"; 183 | PRODUCT_NAME = Test; 184 | }; 185 | name = Debug; 186 | }; 187 | 1D6058950D05DD3E006BFB54 /* Release */ = { 188 | isa = XCBuildConfiguration; 189 | buildSettings = { 190 | ALWAYS_SEARCH_USER_PATHS = NO; 191 | COPY_PHASE_STRIP = YES; 192 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 193 | GCC_PREFIX_HEADER = Test_Prefix.pch; 194 | INFOPLIST_FILE = "Test-Info.plist"; 195 | PRODUCT_NAME = Test; 196 | VALIDATE_PRODUCT = YES; 197 | }; 198 | name = Release; 199 | }; 200 | C01FCF4F08A954540054247B /* Debug */ = { 201 | isa = XCBuildConfiguration; 202 | buildSettings = { 203 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 204 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 205 | GCC_C_LANGUAGE_STANDARD = c99; 206 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 207 | GCC_WARN_UNUSED_VARIABLE = YES; 208 | PREBINDING = NO; 209 | SDKROOT = iphoneos4.0; 210 | }; 211 | name = Debug; 212 | }; 213 | C01FCF5008A954540054247B /* Release */ = { 214 | isa = XCBuildConfiguration; 215 | buildSettings = { 216 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 217 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 218 | GCC_C_LANGUAGE_STANDARD = c99; 219 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 220 | GCC_WARN_UNUSED_VARIABLE = YES; 221 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 222 | PREBINDING = NO; 223 | SDKROOT = iphoneos4.0; 224 | }; 225 | name = Release; 226 | }; 227 | /* End XCBuildConfiguration section */ 228 | 229 | /* Begin XCConfigurationList section */ 230 | 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Test" */ = { 231 | isa = XCConfigurationList; 232 | buildConfigurations = ( 233 | 1D6058940D05DD3E006BFB54 /* Debug */, 234 | 1D6058950D05DD3E006BFB54 /* Release */, 235 | ); 236 | defaultConfigurationIsVisible = 0; 237 | defaultConfigurationName = Release; 238 | }; 239 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Test" */ = { 240 | isa = XCConfigurationList; 241 | buildConfigurations = ( 242 | C01FCF4F08A954540054247B /* Debug */, 243 | C01FCF5008A954540054247B /* Release */, 244 | ); 245 | defaultConfigurationIsVisible = 0; 246 | defaultConfigurationName = Release; 247 | }; 248 | /* End XCConfigurationList section */ 249 | }; 250 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 251 | } 252 | -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/Test_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Test' target in the 'Test' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.com.yourcompany.Test 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleVersion 16 | 1.0 17 | 18 | 19 | -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app.dSYM/Contents/Resources/DWARF/Test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app.dSYM/Contents/Resources/DWARF/Test -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app/Info.plist -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app/MainWindow.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app/MainWindow.nib -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app/PkgInfo: -------------------------------------------------------------------------------- 1 | APPL???? -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app/Test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app/Test -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app/TestViewController.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app/TestViewController.nib -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/Test.LinkFileList: -------------------------------------------------------------------------------- 1 | /Users/stefan/Desktop/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/main.o 2 | /Users/stefan/Desktop/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/TestAppDelegate.o 3 | /Users/stefan/Desktop/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/TestViewController.o 4 | -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/TestAppDelegate.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/TestAppDelegate.o -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/TestViewController.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/TestViewController.o -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/TestViewController.o~$: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/TestViewController.o~$ -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/TestViewController.o~>: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/TestViewController.o~> -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/main.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/main.o -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test-all-target-headers.hmap: -------------------------------------------------------------------------------- 1 | pamh@ -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test-generated-files.hmap: -------------------------------------------------------------------------------- 1 | pamhx -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test-own-target-headers.hmap: -------------------------------------------------------------------------------- 1 | pamh@ -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test-project-headers.hmap: -------------------------------------------------------------------------------- 1 | pamh@III^n^TestAppDelegate.h/Users/stefan/Desktop/ResizingTextField/Test/Classes/TestViewController.hTest_Prefix.pch/Users/stefan/Desktop/ResizingTextField/Test/ -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test.dep: -------------------------------------------------------------------------------- 1 | 6ef601853f1fcc7d26e866e2caf6c539 40470ee630092002f4e1ad969bdd10db ffffffffffffffffffffffffffffffff 238 /Users/stefan/Desktop/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app 2 | 000000004c86ac9d000000000000568b 19b3952432939201d1561752727fef94 ffffffffffffffffffffffffffffffff 1670 /Users/stefan/Desktop/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app/TestViewController.nib 3 | 00000000000000000000000000000000 a6d9cafa03d30c7dfe50eab0024b5600 ffffffffffffffffffffffffffffffff 102 /Users/stefan/Desktop/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app.dSYM 4 | f1e8ea9882134b12043df25e7de9395b c22e6dd4c4809ab413297ebcae238e6d ffffffffffffffffffffffffffffffff 17772 /Users/stefan/Desktop/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app/Test 5 | 32fb081946fd3417161bc39de0886aef 3b2db32512d2231b9209db5c7cb14f47 ffffffffffffffffffffffffffffffff 40616 /Users/stefan/Desktop/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/TestViewController.o 6 | 32fb0819467fe80d161bc39de0886bfe ca67b60c9b190d66df03e35bea82c977 ffffffffffffffffffffffffffffffff 47640 /Users/stefan/Desktop/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/TestAppDelegate.o 7 | 32fb08190a7b9d56161bc39de08869c4 3259e7a8017cd8b15f2c09c40a88b69c ffffffffffffffffffffffffffffffff 6316 /Users/stefan/Desktop/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/main.o 8 | 000000004b7f27a30000000000001d1a 32fb081941866338161bc39de0887c7b ffffffffffffffffffffffffffffffff 15232016 /var/folders/q-/q-6xyh7KEDCVx4dqBbrLRk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Test_Prefix-cxtsapkcpuzdatakaaxgnwkvkcdm/Test_Prefix.pch.gch 9 | 000000004c86a9760000000000004e05 448313ed4b1f8a31e0aafd526b438515 ffffffffffffffffffffffffffffffff 1117 /Users/stefan/Desktop/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app/MainWindow.nib 10 | 00000000000000000000000000000000 8baecd830b2294d0220ddf4aa6f0ae14 ffffffffffffffffffffffffffffffff 8 /Users/stefan/Desktop/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app/PkgInfo 11 | 00000000000000000000000000000000 8baecd830b2294d0220ddf4aa6f0ae14 ffffffffffffffffffffffffffffffff 579 /Users/stefan/Desktop/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app/Info.plist 12 | -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test.hmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test.hmap -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test~.dep: -------------------------------------------------------------------------------- 1 | 6ef601853f1fcc4126e866e2caf68f49 40470ee630092002f4e1ad969bdd10db ffffffffffffffffffffffffffffffff 238 /Users/stefan/Desktop/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app 2 | 000000004c86a9760000000000001a39 19b3952432939201d1561752727fef94 ffffffffffffffffffffffffffffffff 795 /Users/stefan/Desktop/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app/TestViewController.nib 3 | 000000004c86a9760000000000004e05 448313ed4b1f8a31e0aafd526b438515 ffffffffffffffffffffffffffffffff 1117 /Users/stefan/Desktop/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app/MainWindow.nib 4 | 00000000000000000000000000000000 8baecd830b2294d0220ddf4aa6f0ae14 ffffffffffffffffffffffffffffffff 8 /Users/stefan/Desktop/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app/PkgInfo 5 | 00000000000000000000000000000000 8baecd830b2294d0220ddf4aa6f0ae14 ffffffffffffffffffffffffffffffff 579 /Users/stefan/Desktop/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app/Info.plist 6 | 00000000000000000000000000000000 a6d9cafa03d30c7dfe50eab0024b5600 ffffffffffffffffffffffffffffffff 102 /Users/stefan/Desktop/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app.dSYM 7 | f1e8ea9882134ec5043df25e7de93f99 c22e6dd4c4809ab413297ebcae238e6d ffffffffffffffffffffffffffffffff 16948 /Users/stefan/Desktop/ResizingTextField/Test/build/Debug-iphonesimulator/Test.app/Test 8 | 32fb081946fd3420161bc39de0886de4 3b2db32512d2231b9209db5c7cb14f47 ffffffffffffffffffffffffffffffff 34344 /Users/stefan/Desktop/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/TestViewController.o 9 | 32fb0819467feded161bc39de0886a37 ca67b60c9b190d66df03e35bea82c977 ffffffffffffffffffffffffffffffff 47572 /Users/stefan/Desktop/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/TestAppDelegate.o 10 | 32fb08190a7b9d56161bc39de08869c4 3259e7a8017cd8b15f2c09c40a88b69c ffffffffffffffffffffffffffffffff 6316 /Users/stefan/Desktop/ResizingTextField/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/main.o 11 | 000000004b7f27a30000000000001d1a 32fb081941866338161bc39de0887c7b ffffffffffffffffffffffffffffffff 15232016 /var/folders/q-/q-6xyh7KEDCVx4dqBbrLRk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Test_Prefix-cxtsapkcpuzdatakaaxgnwkvkcdm/Test_Prefix.pch.gch 12 | -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Test.pbxindex/categories.pbxbtree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ResizingTextField/Test/build/Test.build/Test.pbxindex/categories.pbxbtree -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Test.pbxindex/cdecls.pbxbtree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ResizingTextField/Test/build/Test.build/Test.pbxindex/cdecls.pbxbtree -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Test.pbxindex/decls.pbxbtree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ResizingTextField/Test/build/Test.build/Test.pbxindex/decls.pbxbtree -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Test.pbxindex/files.pbxbtree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ResizingTextField/Test/build/Test.build/Test.pbxindex/files.pbxbtree -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Test.pbxindex/imports.pbxbtree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ResizingTextField/Test/build/Test.build/Test.pbxindex/imports.pbxbtree -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Test.pbxindex/pbxindex.header: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ResizingTextField/Test/build/Test.build/Test.pbxindex/pbxindex.header -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Test.pbxindex/protocols.pbxbtree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ResizingTextField/Test/build/Test.build/Test.pbxindex/protocols.pbxbtree -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Test.pbxindex/refs.pbxbtree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ResizingTextField/Test/build/Test.build/Test.pbxindex/refs.pbxbtree -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Test.pbxindex/strings.pbxstrings/control: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ResizingTextField/Test/build/Test.build/Test.pbxindex/strings.pbxstrings/control -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Test.pbxindex/subclasses.pbxbtree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ResizingTextField/Test/build/Test.build/Test.pbxindex/subclasses.pbxbtree -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/build/Test.build/Test.pbxindex/symbols0.pbxsymbols: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ResizingTextField/Test/build/Test.build/Test.pbxindex/symbols0.pbxsymbols -------------------------------------------------------------------------------- /Miscellaneous/ResizingTextField/Test/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Test 4 | // 5 | // Created by Stefan Arentz on 10-09-07. 6 | // Copyright Arentz Consulting 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | 13 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | [pool release]; 16 | return retVal; 17 | } 18 | -------------------------------------------------------------------------------- /Miscellaneous/RotatingLayer/Classes/TestAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // TestAppDelegate.h 3 | // Test 4 | // 5 | // Created by Stefan Arentz on 10-09-09. 6 | // Copyright Arentz Consulting 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class TestViewController; 12 | 13 | @interface TestAppDelegate : NSObject { 14 | UIWindow *window; 15 | TestViewController *viewController; 16 | } 17 | 18 | @property (nonatomic, retain) IBOutlet UIWindow *window; 19 | @property (nonatomic, retain) IBOutlet TestViewController *viewController; 20 | 21 | @end 22 | 23 | -------------------------------------------------------------------------------- /Miscellaneous/RotatingLayer/Classes/TestAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // TestAppDelegate.m 3 | // Test 4 | // 5 | // Created by Stefan Arentz on 10-09-09. 6 | // Copyright Arentz Consulting 2010. All rights reserved. 7 | // 8 | 9 | #import "TestAppDelegate.h" 10 | #import "TestViewController.h" 11 | 12 | @implementation TestAppDelegate 13 | 14 | @synthesize window; 15 | @synthesize viewController; 16 | 17 | 18 | #pragma mark - 19 | #pragma mark Application lifecycle 20 | 21 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 22 | 23 | // Override point for customization after application launch. 24 | 25 | // Add the view controller's view to the window and display. 26 | [window addSubview:viewController.view]; 27 | [window makeKeyAndVisible]; 28 | 29 | return YES; 30 | } 31 | 32 | 33 | - (void)applicationWillResignActive:(UIApplication *)application { 34 | /* 35 | 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. 36 | 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. 37 | */ 38 | } 39 | 40 | 41 | - (void)applicationDidEnterBackground:(UIApplication *)application { 42 | /* 43 | 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. 44 | If your application supports background execution, called instead of applicationWillTerminate: when the user quits. 45 | */ 46 | } 47 | 48 | 49 | - (void)applicationWillEnterForeground:(UIApplication *)application { 50 | /* 51 | 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. 52 | */ 53 | } 54 | 55 | 56 | - (void)applicationDidBecomeActive:(UIApplication *)application { 57 | /* 58 | 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. 59 | */ 60 | } 61 | 62 | 63 | - (void)applicationWillTerminate:(UIApplication *)application { 64 | /* 65 | Called when the application is about to terminate. 66 | See also applicationDidEnterBackground:. 67 | */ 68 | } 69 | 70 | 71 | #pragma mark - 72 | #pragma mark Memory management 73 | 74 | - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { 75 | /* 76 | Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. 77 | */ 78 | } 79 | 80 | 81 | - (void)dealloc { 82 | [viewController release]; 83 | [window release]; 84 | [super dealloc]; 85 | } 86 | 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /Miscellaneous/RotatingLayer/Classes/TestViewController.h: -------------------------------------------------------------------------------- 1 | // TestViewController.h 2 | 3 | #import 4 | 5 | @interface TestViewController : UIViewController { 6 | CALayer* _layer; 7 | } 8 | 9 | - (IBAction) rotateLeft; 10 | - (IBAction) rotateRight; 11 | 12 | @end -------------------------------------------------------------------------------- /Miscellaneous/RotatingLayer/Classes/TestViewController.m: -------------------------------------------------------------------------------- 1 | // TestViewController.m 2 | 3 | #import 4 | #import "TestViewController.h" 5 | 6 | @implementation TestViewController 7 | 8 | - (void) viewDidAppear:(BOOL)animated 9 | { 10 | _layer = [CALayer layer]; 11 | 12 | //_layer.backgroundColor = [UIColor redColor].CGColor; 13 | _layer.position = CGPointMake(160, 200); 14 | _layer.bounds = CGRectMake(0, 0, 120, 120); 15 | 16 | CGMutablePathRef path = CGPathCreateMutable(); 17 | 18 | CGPathAddArc(path, NULL, 60, 60, 50, 0, 3.14, true); 19 | CGPathAddArc(path, NULL, 60, 60, 50, 3.14, 0, true); 20 | 21 | CAShapeLayer* shapeLayer = [CAShapeLayer layer]; 22 | shapeLayer.bounds = CGRectMake(0, 0, 120, 120); 23 | shapeLayer.position = CGPointMake(60, 60); 24 | shapeLayer.path = path; 25 | shapeLayer.lineWidth = 3.0; 26 | shapeLayer.fillColor = nil; 27 | shapeLayer.strokeColor = [UIColor blackColor].CGColor; 28 | [_layer addSublayer: shapeLayer]; 29 | 30 | CALayer* top = [CALayer layer]; 31 | top.backgroundColor = [UIColor blueColor].CGColor; 32 | top.position = CGPointMake(60, 10); 33 | top.bounds = CGRectMake(0, 0, 20, 20); 34 | [_layer addSublayer: top]; 35 | 36 | CALayer* bottom = [CALayer layer]; 37 | bottom.backgroundColor = [UIColor cyanColor].CGColor; 38 | bottom.position = CGPointMake(60, 110); 39 | bottom.bounds = CGRectMake(0, 0, 20, 20); 40 | [_layer addSublayer: bottom]; 41 | 42 | CALayer* left = [CALayer layer]; 43 | left.backgroundColor = [UIColor greenColor].CGColor; 44 | left.position = CGPointMake(10, 60); 45 | left.bounds = CGRectMake(0, 0, 20, 20); 46 | [_layer addSublayer: left]; 47 | 48 | CALayer* right = [CALayer layer]; 49 | right.backgroundColor = [UIColor yellowColor].CGColor; 50 | right.position = CGPointMake(110,60); 51 | right.bounds = CGRectMake(0, 0, 20, 20); 52 | [_layer addSublayer: right]; 53 | 54 | [self.view.layer addSublayer: _layer]; 55 | 56 | // 57 | 58 | } 59 | 60 | - (IBAction) rotateLeft 61 | { 62 | CATransform3D transform = _layer.transform; 63 | _layer.transform = CATransform3DConcat(transform, CATransform3DMakeRotation(-0.5 * M_PI, 0.0f, 0.0f, 1.0f)); 64 | 65 | CAKeyframeAnimation* rotation = [CAKeyframeAnimation animation]; 66 | 67 | rotation.values = [NSArray arrayWithObjects: 68 | [NSValue valueWithCATransform3D: transform], 69 | [NSValue valueWithCATransform3D: _layer.transform], 70 | nil]; 71 | 72 | rotation.duration = 0.25; 73 | rotation.delegate = self; 74 | 75 | [_layer addAnimation: rotation forKey: @"transform"]; 76 | } 77 | 78 | - (IBAction) rotateRight 79 | { 80 | CATransform3D transform = _layer.transform; 81 | _layer.transform = CATransform3DConcat(transform, CATransform3DMakeRotation(0.5 * M_PI, 0.0f, 0.0f, 1.0f)); 82 | 83 | CAKeyframeAnimation* rotation = [CAKeyframeAnimation animation]; 84 | 85 | rotation.values = [NSArray arrayWithObjects: 86 | [NSValue valueWithCATransform3D: transform], 87 | [NSValue valueWithCATransform3D: _layer.transform], 88 | nil]; 89 | 90 | rotation.duration = 0.25; 91 | rotation.delegate = self; 92 | 93 | [_layer addAnimation: rotation forKey: @"transform"]; 94 | } 95 | 96 | @end 97 | -------------------------------------------------------------------------------- /Miscellaneous/RotatingLayer/Test-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | 30 | 31 | -------------------------------------------------------------------------------- /Miscellaneous/RotatingLayer/Test.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 45; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1D3623260D0F684500981E51 /* TestAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* TestAppDelegate.m */; }; 11 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 12 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 13 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 14 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; 15 | 2899E5220DE3E06400AC0155 /* TestViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* TestViewController.xib */; }; 16 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; 17 | 28D7ACF80DDB3853001CB0EB /* TestViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* TestViewController.m */; }; 18 | F8764AD01239C3B90087E44E /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8764ACF1239C3B90087E44E /* QuartzCore.framework */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXFileReference section */ 22 | 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 23 | 1D3623240D0F684500981E51 /* TestAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestAppDelegate.h; sourceTree = ""; }; 24 | 1D3623250D0F684500981E51 /* TestAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestAppDelegate.m; sourceTree = ""; }; 25 | 1D6058910D05DD3D006BFB54 /* Test.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Test.app; sourceTree = BUILT_PRODUCTS_DIR; }; 26 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 27 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 28 | 2899E5210DE3E06400AC0155 /* TestViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TestViewController.xib; sourceTree = ""; }; 29 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; 30 | 28D7ACF60DDB3853001CB0EB /* TestViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestViewController.h; sourceTree = ""; }; 31 | 28D7ACF70DDB3853001CB0EB /* TestViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestViewController.m; sourceTree = ""; }; 32 | 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 33 | 32CA4F630368D1EE00C91783 /* Test_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Test_Prefix.pch; sourceTree = ""; }; 34 | 8D1107310486CEB800E47090 /* Test-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Test-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; 35 | F8764ACF1239C3B90087E44E /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 36 | /* End PBXFileReference section */ 37 | 38 | /* Begin PBXFrameworksBuildPhase section */ 39 | 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { 40 | isa = PBXFrameworksBuildPhase; 41 | buildActionMask = 2147483647; 42 | files = ( 43 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 44 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 45 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, 46 | F8764AD01239C3B90087E44E /* QuartzCore.framework in Frameworks */, 47 | ); 48 | runOnlyForDeploymentPostprocessing = 0; 49 | }; 50 | /* End PBXFrameworksBuildPhase section */ 51 | 52 | /* Begin PBXGroup section */ 53 | 080E96DDFE201D6D7F000001 /* Classes */ = { 54 | isa = PBXGroup; 55 | children = ( 56 | 1D3623240D0F684500981E51 /* TestAppDelegate.h */, 57 | 1D3623250D0F684500981E51 /* TestAppDelegate.m */, 58 | 28D7ACF60DDB3853001CB0EB /* TestViewController.h */, 59 | 28D7ACF70DDB3853001CB0EB /* TestViewController.m */, 60 | ); 61 | path = Classes; 62 | sourceTree = ""; 63 | }; 64 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | 1D6058910D05DD3D006BFB54 /* Test.app */, 68 | ); 69 | name = Products; 70 | sourceTree = ""; 71 | }; 72 | 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | 080E96DDFE201D6D7F000001 /* Classes */, 76 | 29B97315FDCFA39411CA2CEA /* Other Sources */, 77 | 29B97317FDCFA39411CA2CEA /* Resources */, 78 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 79 | 19C28FACFE9D520D11CA2CBB /* Products */, 80 | F8764ACF1239C3B90087E44E /* QuartzCore.framework */, 81 | ); 82 | name = CustomTemplate; 83 | sourceTree = ""; 84 | }; 85 | 29B97315FDCFA39411CA2CEA /* Other Sources */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | 32CA4F630368D1EE00C91783 /* Test_Prefix.pch */, 89 | 29B97316FDCFA39411CA2CEA /* main.m */, 90 | ); 91 | name = "Other Sources"; 92 | sourceTree = ""; 93 | }; 94 | 29B97317FDCFA39411CA2CEA /* Resources */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 2899E5210DE3E06400AC0155 /* TestViewController.xib */, 98 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */, 99 | 8D1107310486CEB800E47090 /* Test-Info.plist */, 100 | ); 101 | name = Resources; 102 | sourceTree = ""; 103 | }; 104 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 108 | 1D30AB110D05D00D00671497 /* Foundation.framework */, 109 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */, 110 | ); 111 | name = Frameworks; 112 | sourceTree = ""; 113 | }; 114 | /* End PBXGroup section */ 115 | 116 | /* Begin PBXNativeTarget section */ 117 | 1D6058900D05DD3D006BFB54 /* Test */ = { 118 | isa = PBXNativeTarget; 119 | buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Test" */; 120 | buildPhases = ( 121 | 1D60588D0D05DD3D006BFB54 /* Resources */, 122 | 1D60588E0D05DD3D006BFB54 /* Sources */, 123 | 1D60588F0D05DD3D006BFB54 /* Frameworks */, 124 | ); 125 | buildRules = ( 126 | ); 127 | dependencies = ( 128 | ); 129 | name = Test; 130 | productName = Test; 131 | productReference = 1D6058910D05DD3D006BFB54 /* Test.app */; 132 | productType = "com.apple.product-type.application"; 133 | }; 134 | /* End PBXNativeTarget section */ 135 | 136 | /* Begin PBXProject section */ 137 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 138 | isa = PBXProject; 139 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Test" */; 140 | compatibilityVersion = "Xcode 3.1"; 141 | hasScannedForEncodings = 1; 142 | mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; 143 | projectDirPath = ""; 144 | projectRoot = ""; 145 | targets = ( 146 | 1D6058900D05DD3D006BFB54 /* Test */, 147 | ); 148 | }; 149 | /* End PBXProject section */ 150 | 151 | /* Begin PBXResourcesBuildPhase section */ 152 | 1D60588D0D05DD3D006BFB54 /* Resources */ = { 153 | isa = PBXResourcesBuildPhase; 154 | buildActionMask = 2147483647; 155 | files = ( 156 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, 157 | 2899E5220DE3E06400AC0155 /* TestViewController.xib in Resources */, 158 | ); 159 | runOnlyForDeploymentPostprocessing = 0; 160 | }; 161 | /* End PBXResourcesBuildPhase section */ 162 | 163 | /* Begin PBXSourcesBuildPhase section */ 164 | 1D60588E0D05DD3D006BFB54 /* Sources */ = { 165 | isa = PBXSourcesBuildPhase; 166 | buildActionMask = 2147483647; 167 | files = ( 168 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 169 | 1D3623260D0F684500981E51 /* TestAppDelegate.m in Sources */, 170 | 28D7ACF80DDB3853001CB0EB /* TestViewController.m in Sources */, 171 | ); 172 | runOnlyForDeploymentPostprocessing = 0; 173 | }; 174 | /* End PBXSourcesBuildPhase section */ 175 | 176 | /* Begin XCBuildConfiguration section */ 177 | 1D6058940D05DD3E006BFB54 /* Debug */ = { 178 | isa = XCBuildConfiguration; 179 | buildSettings = { 180 | ALWAYS_SEARCH_USER_PATHS = NO; 181 | COPY_PHASE_STRIP = NO; 182 | GCC_DYNAMIC_NO_PIC = NO; 183 | GCC_OPTIMIZATION_LEVEL = 0; 184 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 185 | GCC_PREFIX_HEADER = Test_Prefix.pch; 186 | INFOPLIST_FILE = "Test-Info.plist"; 187 | PRODUCT_NAME = Test; 188 | }; 189 | name = Debug; 190 | }; 191 | 1D6058950D05DD3E006BFB54 /* Release */ = { 192 | isa = XCBuildConfiguration; 193 | buildSettings = { 194 | ALWAYS_SEARCH_USER_PATHS = NO; 195 | COPY_PHASE_STRIP = YES; 196 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 197 | GCC_PREFIX_HEADER = Test_Prefix.pch; 198 | INFOPLIST_FILE = "Test-Info.plist"; 199 | PRODUCT_NAME = Test; 200 | VALIDATE_PRODUCT = YES; 201 | }; 202 | name = Release; 203 | }; 204 | C01FCF4F08A954540054247B /* Debug */ = { 205 | isa = XCBuildConfiguration; 206 | buildSettings = { 207 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 208 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 209 | GCC_C_LANGUAGE_STANDARD = c99; 210 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 211 | GCC_WARN_UNUSED_VARIABLE = YES; 212 | PREBINDING = NO; 213 | SDKROOT = iphoneos4.0; 214 | }; 215 | name = Debug; 216 | }; 217 | C01FCF5008A954540054247B /* Release */ = { 218 | isa = XCBuildConfiguration; 219 | buildSettings = { 220 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 221 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 222 | GCC_C_LANGUAGE_STANDARD = c99; 223 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 224 | GCC_WARN_UNUSED_VARIABLE = YES; 225 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 226 | PREBINDING = NO; 227 | SDKROOT = iphoneos4.0; 228 | }; 229 | name = Release; 230 | }; 231 | /* End XCBuildConfiguration section */ 232 | 233 | /* Begin XCConfigurationList section */ 234 | 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Test" */ = { 235 | isa = XCConfigurationList; 236 | buildConfigurations = ( 237 | 1D6058940D05DD3E006BFB54 /* Debug */, 238 | 1D6058950D05DD3E006BFB54 /* Release */, 239 | ); 240 | defaultConfigurationIsVisible = 0; 241 | defaultConfigurationName = Release; 242 | }; 243 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Test" */ = { 244 | isa = XCConfigurationList; 245 | buildConfigurations = ( 246 | C01FCF4F08A954540054247B /* Debug */, 247 | C01FCF5008A954540054247B /* Release */, 248 | ); 249 | defaultConfigurationIsVisible = 0; 250 | defaultConfigurationName = Release; 251 | }; 252 | /* End XCConfigurationList section */ 253 | }; 254 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 255 | } 256 | -------------------------------------------------------------------------------- /Miscellaneous/RotatingLayer/Test.xcodeproj/stefan.pbxuser: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | 1D6058900D05DD3D006BFB54 /* Test */ = { 4 | activeExec = 0; 5 | executables = ( 6 | F8764AB41239C3310087E44E /* Test */, 7 | ); 8 | }; 9 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 10 | activeBuildConfigurationName = Debug; 11 | activeExecutable = F8764AB41239C3310087E44E /* Test */; 12 | activeTarget = 1D6058900D05DD3D006BFB54 /* Test */; 13 | codeSenseManager = F8764ACE1239C33E0087E44E /* Code sense */; 14 | executables = ( 15 | F8764AB41239C3310087E44E /* Test */, 16 | ); 17 | perUserDictionary = { 18 | PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { 19 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 20 | PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; 21 | PBXFileTableDataSourceColumnWidthsKey = ( 22 | 20, 23 | 584, 24 | 20, 25 | 48.16259765625, 26 | 43, 27 | 43, 28 | 20, 29 | ); 30 | PBXFileTableDataSourceColumnsKey = ( 31 | PBXFileDataSource_FiletypeID, 32 | PBXFileDataSource_Filename_ColumnID, 33 | PBXFileDataSource_Built_ColumnID, 34 | PBXFileDataSource_ObjectSize_ColumnID, 35 | PBXFileDataSource_Errors_ColumnID, 36 | PBXFileDataSource_Warnings_ColumnID, 37 | PBXFileDataSource_Target_ColumnID, 38 | ); 39 | }; 40 | PBXPerProjectTemplateStateSaveDate = 305775410; 41 | PBXWorkspaceStateSaveDate = 305775410; 42 | }; 43 | sourceControlManager = F8764ACD1239C33E0087E44E /* Source Control */; 44 | userBuildSettings = { 45 | }; 46 | }; 47 | F8764AB41239C3310087E44E /* Test */ = { 48 | isa = PBXExecutable; 49 | activeArgIndices = ( 50 | ); 51 | argumentStrings = ( 52 | ); 53 | autoAttachOnCrash = 1; 54 | breakpointsEnabled = 0; 55 | configStateDict = { 56 | }; 57 | customDataFormattersEnabled = 1; 58 | dataTipCustomDataFormattersEnabled = 1; 59 | dataTipShowTypeColumn = 1; 60 | dataTipSortType = 0; 61 | debuggerPlugin = GDBDebugging; 62 | disassemblyDisplayState = 0; 63 | dylibVariantSuffix = ""; 64 | enableDebugStr = 1; 65 | environmentEntries = ( 66 | ); 67 | executableSystemSymbolLevel = 0; 68 | executableUserSymbolLevel = 0; 69 | libgmallocEnabled = 0; 70 | name = Test; 71 | showTypeColumn = 0; 72 | sourceDirectories = ( 73 | ); 74 | }; 75 | F8764ACD1239C33E0087E44E /* Source Control */ = { 76 | isa = PBXSourceControlManager; 77 | fallbackIsa = XCSourceControlManager; 78 | isSCMEnabled = 0; 79 | scmConfiguration = { 80 | repositoryNamesForRoots = { 81 | "" = ""; 82 | }; 83 | }; 84 | }; 85 | F8764ACE1239C33E0087E44E /* Code sense */ = { 86 | isa = PBXCodeSenseManager; 87 | indexTemplatePath = ""; 88 | }; 89 | } 90 | -------------------------------------------------------------------------------- /Miscellaneous/RotatingLayer/Test_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Test' target in the 'Test' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /Miscellaneous/RotatingLayer/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Test 4 | // 5 | // Created by Stefan Arentz on 10-09-09. 6 | // Copyright Arentz Consulting 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | 13 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | [pool release]; 16 | return retVal; 17 | } 18 | -------------------------------------------------------------------------------- /Miscellaneous/ScrollViewScreenShot/Classes/ScreenShotAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ScreenShotAppDelegate.h 3 | // ScreenShot 4 | // 5 | // Created by Stefan Arentz on 10-08-22. 6 | // Copyright Arentz Consulting 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class ScreenShotViewController; 12 | 13 | @interface ScreenShotAppDelegate : NSObject { 14 | UIWindow *window; 15 | ScreenShotViewController *viewController; 16 | } 17 | 18 | @property (nonatomic, retain) IBOutlet UIWindow *window; 19 | @property (nonatomic, retain) IBOutlet ScreenShotViewController *viewController; 20 | 21 | @end 22 | 23 | -------------------------------------------------------------------------------- /Miscellaneous/ScrollViewScreenShot/Classes/ScreenShotAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // ScreenShotAppDelegate.m 3 | // ScreenShot 4 | // 5 | // Created by Stefan Arentz on 10-08-22. 6 | // Copyright Arentz Consulting 2010. All rights reserved. 7 | // 8 | 9 | #import "ScreenShotAppDelegate.h" 10 | #import "ScreenShotViewController.h" 11 | 12 | @implementation ScreenShotAppDelegate 13 | 14 | @synthesize window; 15 | @synthesize viewController; 16 | 17 | 18 | #pragma mark - 19 | #pragma mark Application lifecycle 20 | 21 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 22 | 23 | // Override point for customization after application launch. 24 | 25 | // Add the view controller's view to the window and display. 26 | [window addSubview:viewController.view]; 27 | [window makeKeyAndVisible]; 28 | 29 | return YES; 30 | } 31 | 32 | 33 | - (void)applicationWillResignActive:(UIApplication *)application { 34 | /* 35 | 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. 36 | 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. 37 | */ 38 | } 39 | 40 | 41 | - (void)applicationDidEnterBackground:(UIApplication *)application { 42 | /* 43 | 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. 44 | If your application supports background execution, called instead of applicationWillTerminate: when the user quits. 45 | */ 46 | } 47 | 48 | 49 | - (void)applicationWillEnterForeground:(UIApplication *)application { 50 | /* 51 | 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. 52 | */ 53 | } 54 | 55 | 56 | - (void)applicationDidBecomeActive:(UIApplication *)application { 57 | /* 58 | 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. 59 | */ 60 | } 61 | 62 | 63 | - (void)applicationWillTerminate:(UIApplication *)application { 64 | /* 65 | Called when the application is about to terminate. 66 | See also applicationDidEnterBackground:. 67 | */ 68 | } 69 | 70 | 71 | #pragma mark - 72 | #pragma mark Memory management 73 | 74 | - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { 75 | /* 76 | Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. 77 | */ 78 | } 79 | 80 | 81 | - (void)dealloc { 82 | [viewController release]; 83 | [window release]; 84 | [super dealloc]; 85 | } 86 | 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /Miscellaneous/ScrollViewScreenShot/Classes/ScreenShotViewController.h: -------------------------------------------------------------------------------- 1 | // ScreenShotViewController.h 2 | 3 | #import 4 | 5 | @interface ScreenShotViewController : UIViewController { 6 | UIScrollView* _scrollView; 7 | } 8 | 9 | @property (nonatomic,retain) IBOutlet UIScrollView* scrollView; 10 | 11 | - (IBAction) renderScrollViewToImage; 12 | 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /Miscellaneous/ScrollViewScreenShot/Classes/ScreenShotViewController.m: -------------------------------------------------------------------------------- 1 | // ScreenShotViewController.m 2 | 3 | #import 4 | #import "ScreenShotViewController.h" 5 | 6 | @implementation ScreenShotViewController 7 | 8 | @synthesize scrollView = _scrollView; 9 | 10 | - (void) viewDidLoad 11 | { 12 | UIImageView* imageViewA = [[[UIImageView alloc] initWithImage: [UIImage imageNamed: @"ImageA.png"]] autorelease]; 13 | imageViewA.frame = CGRectMake(0, 0*460, 320, 460); 14 | [_scrollView addSubview: imageViewA]; 15 | 16 | UIImageView* imageViewB = [[[UIImageView alloc] initWithImage: [UIImage imageNamed: @"ImageB.png"]] autorelease]; 17 | imageViewB.frame = CGRectMake(0, 1*460, 320, 460); 18 | [_scrollView addSubview: imageViewB]; 19 | 20 | UIImageView* imageViewC = [[[UIImageView alloc] initWithImage: [UIImage imageNamed: @"ImageC.png"]] autorelease]; 21 | imageViewC.frame = CGRectMake(0, 2*460, 320, 460); 22 | [_scrollView addSubview: imageViewC]; 23 | 24 | _scrollView.contentSize = CGSizeMake(320, 3*460); 25 | } 26 | 27 | - (IBAction) renderScrollViewToImage 28 | { 29 | UIImage* image = nil; 30 | 31 | UIGraphicsBeginImageContext(_scrollView.contentSize); 32 | { 33 | CGPoint savedContentOffset = _scrollView.contentOffset; 34 | CGRect savedFrame = _scrollView.frame; 35 | 36 | _scrollView.contentOffset = CGPointZero; 37 | _scrollView.frame = CGRectMake(0, 0, _scrollView.contentSize.width, _scrollView.contentSize.height); 38 | 39 | [_scrollView.layer renderInContext: UIGraphicsGetCurrentContext()]; 40 | image = UIGraphicsGetImageFromCurrentImageContext(); 41 | 42 | _scrollView.contentOffset = savedContentOffset; 43 | _scrollView.frame = savedFrame; 44 | } 45 | UIGraphicsEndImageContext(); 46 | 47 | if (image != nil) { 48 | [UIImagePNGRepresentation(image) writeToFile: @"/tmp/test.png" atomically: YES]; 49 | system("open /tmp/test.png"); 50 | } 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /Miscellaneous/ScrollViewScreenShot/ImageA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ScrollViewScreenShot/ImageA.png -------------------------------------------------------------------------------- /Miscellaneous/ScrollViewScreenShot/ImageB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ScrollViewScreenShot/ImageB.png -------------------------------------------------------------------------------- /Miscellaneous/ScrollViewScreenShot/ImageC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/Miscellaneous/ScrollViewScreenShot/ImageC.png -------------------------------------------------------------------------------- /Miscellaneous/ScrollViewScreenShot/ScreenShot-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | 30 | 31 | -------------------------------------------------------------------------------- /Miscellaneous/ScrollViewScreenShot/ScreenShot.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 45; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1D3623260D0F684500981E51 /* ScreenShotAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* ScreenShotAppDelegate.m */; }; 11 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 12 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 13 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 14 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; 15 | 2899E5220DE3E06400AC0155 /* ScreenShotViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* ScreenShotViewController.xib */; }; 16 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; 17 | 28D7ACF80DDB3853001CB0EB /* ScreenShotViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* ScreenShotViewController.m */; }; 18 | F8616D0E1221DED300DC785B /* ImageC.png in Resources */ = {isa = PBXBuildFile; fileRef = F8616D0B1221DED300DC785B /* ImageC.png */; }; 19 | F8616D0F1221DED300DC785B /* ImageB.png in Resources */ = {isa = PBXBuildFile; fileRef = F8616D0C1221DED300DC785B /* ImageB.png */; }; 20 | F8616D101221DED300DC785B /* ImageA.png in Resources */ = {isa = PBXBuildFile; fileRef = F8616D0D1221DED300DC785B /* ImageA.png */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXFileReference section */ 24 | 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 25 | 1D3623240D0F684500981E51 /* ScreenShotAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScreenShotAppDelegate.h; sourceTree = ""; }; 26 | 1D3623250D0F684500981E51 /* ScreenShotAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScreenShotAppDelegate.m; sourceTree = ""; }; 27 | 1D6058910D05DD3D006BFB54 /* ScreenShot.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ScreenShot.app; sourceTree = BUILT_PRODUCTS_DIR; }; 28 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 29 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 30 | 2899E5210DE3E06400AC0155 /* ScreenShotViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ScreenShotViewController.xib; sourceTree = ""; }; 31 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; 32 | 28D7ACF60DDB3853001CB0EB /* ScreenShotViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScreenShotViewController.h; sourceTree = ""; }; 33 | 28D7ACF70DDB3853001CB0EB /* ScreenShotViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScreenShotViewController.m; sourceTree = ""; }; 34 | 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 35 | 32CA4F630368D1EE00C91783 /* ScreenShot_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScreenShot_Prefix.pch; sourceTree = ""; }; 36 | 8D1107310486CEB800E47090 /* ScreenShot-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "ScreenShot-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; 37 | F8616D0B1221DED300DC785B /* ImageC.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ImageC.png; sourceTree = ""; }; 38 | F8616D0C1221DED300DC785B /* ImageB.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ImageB.png; sourceTree = ""; }; 39 | F8616D0D1221DED300DC785B /* ImageA.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ImageA.png; sourceTree = ""; }; 40 | /* End PBXFileReference section */ 41 | 42 | /* Begin PBXFrameworksBuildPhase section */ 43 | 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { 44 | isa = PBXFrameworksBuildPhase; 45 | buildActionMask = 2147483647; 46 | files = ( 47 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 48 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 49 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, 50 | ); 51 | runOnlyForDeploymentPostprocessing = 0; 52 | }; 53 | /* End PBXFrameworksBuildPhase section */ 54 | 55 | /* Begin PBXGroup section */ 56 | 080E96DDFE201D6D7F000001 /* Classes */ = { 57 | isa = PBXGroup; 58 | children = ( 59 | 1D3623240D0F684500981E51 /* ScreenShotAppDelegate.h */, 60 | 1D3623250D0F684500981E51 /* ScreenShotAppDelegate.m */, 61 | 28D7ACF60DDB3853001CB0EB /* ScreenShotViewController.h */, 62 | 28D7ACF70DDB3853001CB0EB /* ScreenShotViewController.m */, 63 | ); 64 | path = Classes; 65 | sourceTree = ""; 66 | }; 67 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 68 | isa = PBXGroup; 69 | children = ( 70 | 1D6058910D05DD3D006BFB54 /* ScreenShot.app */, 71 | ); 72 | name = Products; 73 | sourceTree = ""; 74 | }; 75 | 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | 080E96DDFE201D6D7F000001 /* Classes */, 79 | 29B97315FDCFA39411CA2CEA /* Other Sources */, 80 | 29B97317FDCFA39411CA2CEA /* Resources */, 81 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 82 | 19C28FACFE9D520D11CA2CBB /* Products */, 83 | ); 84 | name = CustomTemplate; 85 | sourceTree = ""; 86 | }; 87 | 29B97315FDCFA39411CA2CEA /* Other Sources */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | 32CA4F630368D1EE00C91783 /* ScreenShot_Prefix.pch */, 91 | 29B97316FDCFA39411CA2CEA /* main.m */, 92 | ); 93 | name = "Other Sources"; 94 | sourceTree = ""; 95 | }; 96 | 29B97317FDCFA39411CA2CEA /* Resources */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | F8616D0B1221DED300DC785B /* ImageC.png */, 100 | F8616D0C1221DED300DC785B /* ImageB.png */, 101 | F8616D0D1221DED300DC785B /* ImageA.png */, 102 | 2899E5210DE3E06400AC0155 /* ScreenShotViewController.xib */, 103 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */, 104 | 8D1107310486CEB800E47090 /* ScreenShot-Info.plist */, 105 | ); 106 | name = Resources; 107 | sourceTree = ""; 108 | }; 109 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 113 | 1D30AB110D05D00D00671497 /* Foundation.framework */, 114 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */, 115 | ); 116 | name = Frameworks; 117 | sourceTree = ""; 118 | }; 119 | /* End PBXGroup section */ 120 | 121 | /* Begin PBXNativeTarget section */ 122 | 1D6058900D05DD3D006BFB54 /* ScreenShot */ = { 123 | isa = PBXNativeTarget; 124 | buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "ScreenShot" */; 125 | buildPhases = ( 126 | 1D60588D0D05DD3D006BFB54 /* Resources */, 127 | 1D60588E0D05DD3D006BFB54 /* Sources */, 128 | 1D60588F0D05DD3D006BFB54 /* Frameworks */, 129 | ); 130 | buildRules = ( 131 | ); 132 | dependencies = ( 133 | ); 134 | name = ScreenShot; 135 | productName = ScreenShot; 136 | productReference = 1D6058910D05DD3D006BFB54 /* ScreenShot.app */; 137 | productType = "com.apple.product-type.application"; 138 | }; 139 | /* End PBXNativeTarget section */ 140 | 141 | /* Begin PBXProject section */ 142 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 143 | isa = PBXProject; 144 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ScreenShot" */; 145 | compatibilityVersion = "Xcode 3.1"; 146 | hasScannedForEncodings = 1; 147 | mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; 148 | projectDirPath = ""; 149 | projectRoot = ""; 150 | targets = ( 151 | 1D6058900D05DD3D006BFB54 /* ScreenShot */, 152 | ); 153 | }; 154 | /* End PBXProject section */ 155 | 156 | /* Begin PBXResourcesBuildPhase section */ 157 | 1D60588D0D05DD3D006BFB54 /* Resources */ = { 158 | isa = PBXResourcesBuildPhase; 159 | buildActionMask = 2147483647; 160 | files = ( 161 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, 162 | 2899E5220DE3E06400AC0155 /* ScreenShotViewController.xib in Resources */, 163 | F8616D0E1221DED300DC785B /* ImageC.png in Resources */, 164 | F8616D0F1221DED300DC785B /* ImageB.png in Resources */, 165 | F8616D101221DED300DC785B /* ImageA.png in Resources */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXResourcesBuildPhase section */ 170 | 171 | /* Begin PBXSourcesBuildPhase section */ 172 | 1D60588E0D05DD3D006BFB54 /* Sources */ = { 173 | isa = PBXSourcesBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 177 | 1D3623260D0F684500981E51 /* ScreenShotAppDelegate.m in Sources */, 178 | 28D7ACF80DDB3853001CB0EB /* ScreenShotViewController.m in Sources */, 179 | ); 180 | runOnlyForDeploymentPostprocessing = 0; 181 | }; 182 | /* End PBXSourcesBuildPhase section */ 183 | 184 | /* Begin XCBuildConfiguration section */ 185 | 1D6058940D05DD3E006BFB54 /* Debug */ = { 186 | isa = XCBuildConfiguration; 187 | buildSettings = { 188 | ALWAYS_SEARCH_USER_PATHS = NO; 189 | COPY_PHASE_STRIP = NO; 190 | GCC_DYNAMIC_NO_PIC = NO; 191 | GCC_OPTIMIZATION_LEVEL = 0; 192 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 193 | GCC_PREFIX_HEADER = ScreenShot_Prefix.pch; 194 | INFOPLIST_FILE = "ScreenShot-Info.plist"; 195 | PRODUCT_NAME = ScreenShot; 196 | }; 197 | name = Debug; 198 | }; 199 | 1D6058950D05DD3E006BFB54 /* Release */ = { 200 | isa = XCBuildConfiguration; 201 | buildSettings = { 202 | ALWAYS_SEARCH_USER_PATHS = NO; 203 | COPY_PHASE_STRIP = YES; 204 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 205 | GCC_PREFIX_HEADER = ScreenShot_Prefix.pch; 206 | INFOPLIST_FILE = "ScreenShot-Info.plist"; 207 | PRODUCT_NAME = ScreenShot; 208 | VALIDATE_PRODUCT = YES; 209 | }; 210 | name = Release; 211 | }; 212 | C01FCF4F08A954540054247B /* Debug */ = { 213 | isa = XCBuildConfiguration; 214 | buildSettings = { 215 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 216 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 217 | GCC_C_LANGUAGE_STANDARD = c99; 218 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 219 | GCC_WARN_UNUSED_VARIABLE = YES; 220 | PREBINDING = NO; 221 | SDKROOT = iphoneos4.0; 222 | }; 223 | name = Debug; 224 | }; 225 | C01FCF5008A954540054247B /* Release */ = { 226 | isa = XCBuildConfiguration; 227 | buildSettings = { 228 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 229 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 230 | GCC_C_LANGUAGE_STANDARD = c99; 231 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 232 | GCC_WARN_UNUSED_VARIABLE = YES; 233 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 234 | PREBINDING = NO; 235 | SDKROOT = iphoneos4.0; 236 | }; 237 | name = Release; 238 | }; 239 | /* End XCBuildConfiguration section */ 240 | 241 | /* Begin XCConfigurationList section */ 242 | 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "ScreenShot" */ = { 243 | isa = XCConfigurationList; 244 | buildConfigurations = ( 245 | 1D6058940D05DD3E006BFB54 /* Debug */, 246 | 1D6058950D05DD3E006BFB54 /* Release */, 247 | ); 248 | defaultConfigurationIsVisible = 0; 249 | defaultConfigurationName = Release; 250 | }; 251 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ScreenShot" */ = { 252 | isa = XCConfigurationList; 253 | buildConfigurations = ( 254 | C01FCF4F08A954540054247B /* Debug */, 255 | C01FCF5008A954540054247B /* Release */, 256 | ); 257 | defaultConfigurationIsVisible = 0; 258 | defaultConfigurationName = Release; 259 | }; 260 | /* End XCConfigurationList section */ 261 | }; 262 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 263 | } 264 | -------------------------------------------------------------------------------- /Miscellaneous/ScrollViewScreenShot/ScreenShot_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'ScreenShot' target in the 'ScreenShot' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /Miscellaneous/ScrollViewScreenShot/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ScreenShot 4 | // 5 | // Created by Stefan Arentz on 10-08-22. 6 | // Copyright Arentz Consulting 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | 13 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | [pool release]; 16 | return retVal; 17 | } 18 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/st3fan/iphone-experiments/8030709479d040dcdadd6421e84d994d7e6d28f6/README --------------------------------------------------------------------------------