├── Homepwner ├── en.lproj │ └── InfoPlist.strings ├── BNRItemsViewController.h ├── BNRAppDelegate.h ├── BNRDetailViewController.h ├── main.m ├── Homepwner-Prefix.pch ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── BNRImageStore.h ├── BNRItemStore.h ├── BNRItem.h ├── Homepwner-Info.plist ├── BNRImageStore.m ├── BNRItemStore.m ├── BNRAppDelegate.m ├── BNRItem.m ├── BNRDetailViewController.m ├── HeaderView.xib ├── BNRItemsViewController.m └── BNRDetailViewController.xib ├── HomepwnerTests ├── en.lproj │ └── InfoPlist.strings ├── HomepwnerTests.m └── HomepwnerTests-Info.plist └── Homepwner.xcodeproj ├── project.xcworkspace ├── contents.xcworkspacedata ├── xcuserdata │ └── stepheng.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcshareddata │ └── Homepwner.xccheckout ├── xcuserdata └── stepheng.xcuserdatad │ ├── xcschemes │ ├── xcschememanagement.plist │ └── Homepwner.xcscheme │ └── xcdebugger │ └── Breakpoints_v2.xcbkptlist └── project.pbxproj /Homepwner/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /HomepwnerTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Homepwner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Homepwner.xcodeproj/project.xcworkspace/xcuserdata/stepheng.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StephenGrider/BNRios/master/Homepwner.xcodeproj/project.xcworkspace/xcuserdata/stepheng.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Homepwner/BNRItemsViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // BNRItemsViewController.h 3 | // Homepwner 4 | // 5 | // Created by stephen g on 3/6/14. 6 | // Copyright (c) 2014 stephen g. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BNRItemsViewController : UITableViewController 12 | 13 | 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Homepwner/BNRAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // BNRAppDelegate.h 3 | // Homepwner 4 | // 5 | // Created by stephen g on 3/6/14. 6 | // Copyright (c) 2014 stephen g. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BNRAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Homepwner/BNRDetailViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // BNRDetailViewController.h 3 | // Homepwner 4 | // 5 | // Created by stephen g on 3/10/14. 6 | // Copyright (c) 2014 stephen g. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class BNRItem; 12 | 13 | @interface BNRDetailViewController : UIViewController 14 | 15 | @property (nonatomic, strong) BNRItem *item; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Homepwner/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Homepwner 4 | // 5 | // Created by stephen g on 3/6/14. 6 | // Copyright (c) 2014 stephen g. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "BNRAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([BNRAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Homepwner/Homepwner-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_3_0 10 | #warning "This project uses features only available in iOS SDK 3.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /Homepwner/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Homepwner/BNRImageStore.h: -------------------------------------------------------------------------------- 1 | // 2 | // BNRImageStore.h 3 | // Homepwner 4 | // 5 | // Created by stephen g on 3/11/14. 6 | // Copyright (c) 2014 stephen g. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BNRImageStore : NSObject 12 | 13 | +(instancetype)sharedStore; 14 | 15 | -(void)setImage:(UIImage *)image forKey:(NSString *)key; 16 | -(UIImage *)imageForKey:(NSString *)key; 17 | -(void)deleteImageForKey:(NSString *)key; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Homepwner/BNRItemStore.h: -------------------------------------------------------------------------------- 1 | // 2 | // BNRItemStore.h 3 | // Homepwner 4 | // 5 | // Created by stephen g on 3/6/14. 6 | // Copyright (c) 2014 stephen g. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "BNRItem.h" 11 | 12 | @class BNRItem; 13 | 14 | @interface BNRItemStore : NSObject 15 | 16 | @property (nonatomic, readonly) NSArray *allItems; 17 | 18 | +(instancetype)sharedStore; 19 | -(BNRItem *) createItem; 20 | -(void)removeItem:(BNRItem *)item; 21 | -(void)moveItemAtIndex:(NSUInteger)fromIndex toIndex:(NSUInteger)toIndex; 22 | 23 | 24 | @end 25 | 26 | -------------------------------------------------------------------------------- /Homepwner/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Homepwner.xcodeproj/xcuserdata/stepheng.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Homepwner.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | ECF6F21218C97AC300BC0256 16 | 17 | primary 18 | 19 | 20 | ECF6F22D18C97AC300BC0256 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /HomepwnerTests/HomepwnerTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // HomepwnerTests.m 3 | // HomepwnerTests 4 | // 5 | // Created by stephen g on 3/6/14. 6 | // Copyright (c) 2014 stephen g. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HomepwnerTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation HomepwnerTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /HomepwnerTests/HomepwnerTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.shakezoola.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Homepwner/BNRItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // BNRItem.h 3 | // RandomItems 4 | // 5 | // Created by stephen g on 2/25/14. 6 | // Copyright (c) 2014 stephen g. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BNRItem : NSObject 12 | 13 | +(instancetype)randomItem; 14 | 15 | @property (nonatomic, copy) NSString *itemKey; 16 | @property (copy, nonatomic) NSString *itemName; 17 | @property (copy, nonatomic) NSString *serialNumber; 18 | @property int valueInDollars; 19 | @property (strong, readonly, nonatomic) NSDate *dateCreated; 20 | 21 | //designated initializer 22 | -(instancetype)initWithItemName:(NSString *)name valueInDollars:(int)value serialNumber:(NSString *)sNumber; 23 | -(instancetype)initWithItemName:(NSString *)name; 24 | -(instancetype)initWithItemName:(NSString *)name serialNumber:(NSString *)sNumber; 25 | 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Homepwner/Homepwner-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.shakezoola.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Homepwner/BNRImageStore.m: -------------------------------------------------------------------------------- 1 | // 2 | // BNRImageStore.m 3 | // Homepwner 4 | // 5 | // Created by stephen g on 3/11/14. 6 | // Copyright (c) 2014 stephen g. All rights reserved. 7 | // 8 | 9 | #import "BNRImageStore.h" 10 | 11 | @interface BNRImageStore() 12 | 13 | @property (nonatomic, strong) NSMutableDictionary *dictionary; 14 | 15 | @end 16 | 17 | @implementation BNRImageStore 18 | 19 | +(instancetype)sharedStore{ 20 | static BNRImageStore *sharedStore = nil; 21 | if(!sharedStore){ 22 | sharedStore = [[self alloc] init]; 23 | } 24 | return sharedStore; 25 | } 26 | 27 | -(instancetype)init{ 28 | @throw [NSException exceptionWithName:@"Singleton" reason:@"Use +[BNRImageStore sharedStore]" userInfo:nil]; 29 | return nil; 30 | } 31 | 32 | -(instancetype)initPrivate{ 33 | self = [super init]; 34 | if(self){ 35 | _dictionary = [[NSMutableDictionary alloc] init]; 36 | } 37 | return self; 38 | } 39 | 40 | -(void)setImage:(UIImage *)image forKey:(NSString *)key{ 41 | [self.dictionary setObject:image forKey:key]; 42 | } 43 | 44 | -(UIImage *)imageForKey:(NSString *)key{ 45 | return [self.dictionary objectForKey:key]; 46 | } 47 | 48 | -(void)deleteImageForKey:(NSString *)key{ 49 | if(!key){ 50 | return; 51 | } 52 | [self.dictionary removeObjectForKey:key]; 53 | } 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /Homepwner.xcodeproj/project.xcworkspace/xcshareddata/Homepwner.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 25A1F565-3D67-4D24-A4E4-A8516DA73E06 9 | IDESourceControlProjectName 10 | Homepwner 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 223A4ED7-8287-4AEC-B20B-E9B76DED63DB 14 | ssh://github.com/StephenGrider/BNRios.git 15 | 16 | IDESourceControlProjectPath 17 | Homepwner/Homepwner.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 223A4ED7-8287-4AEC-B20B-E9B76DED63DB 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | ssh://github.com/StephenGrider/BNRios.git 25 | IDESourceControlProjectVersion 26 | 110 27 | IDESourceControlProjectWCCIdentifier 28 | 223A4ED7-8287-4AEC-B20B-E9B76DED63DB 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 223A4ED7-8287-4AEC-B20B-E9B76DED63DB 36 | IDESourceControlWCCName 37 | ios 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Homepwner/BNRItemStore.m: -------------------------------------------------------------------------------- 1 | // 2 | // BNRItemStore.m 3 | // Homepwner 4 | // 5 | // Created by stephen g on 3/6/14. 6 | // Copyright (c) 2014 stephen g. All rights reserved. 7 | // 8 | 9 | #import "BNRItemStore.h" 10 | #import "BNRImageStore.h" 11 | 12 | @interface BNRItemStore() 13 | 14 | @property (nonatomic) NSMutableArray *privateItems; 15 | 16 | @end 17 | 18 | 19 | @implementation BNRItemStore 20 | 21 | -(void)removeItem:(BNRItem *)item{ 22 | NSString *key = item.itemKey; 23 | [[BNRImageStore sharedStore] deleteImageForKey:key]; 24 | [self.privateItems removeObjectIdenticalTo:item]; 25 | } 26 | 27 | +(instancetype)sharedStore{ 28 | static BNRItemStore *sharedStore = nil; 29 | if(!sharedStore){ 30 | sharedStore = [[self alloc] initPrivate]; 31 | } 32 | return sharedStore; 33 | } 34 | 35 | -(instancetype)init{ 36 | @throw [NSException exceptionWithName:@"Singleton" reason:@"Use +[BNRItemStore sharedStore]" userInfo:nil]; 37 | 38 | return nil; 39 | } 40 | 41 | -(instancetype)initPrivate{ 42 | self = [super init]; 43 | if(self){ 44 | _privateItems = [[NSMutableArray alloc] init]; 45 | } 46 | 47 | return self; 48 | } 49 | 50 | -(NSArray *) allItems{ 51 | return self.privateItems; 52 | } 53 | 54 | -(BNRItem *)createItem{ 55 | BNRItem *item = [BNRItem randomItem]; 56 | [self.privateItems addObject:item]; 57 | return item; 58 | } 59 | 60 | -(void)moveItemAtIndex:(NSUInteger)fromIndex toIndex:(NSUInteger)toIndex{ 61 | if(fromIndex == toIndex){ 62 | return; 63 | } 64 | BNRItem *item = self.privateItems[fromIndex]; 65 | 66 | [self.privateItems removeObjectIdenticalTo:item]; 67 | [self.privateItems insertObject:item atIndex:toIndex]; 68 | } 69 | 70 | 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /Homepwner.xcodeproj/xcuserdata/stepheng.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 20 | 21 | 22 | 24 | 30 | 31 | 32 | 34 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /Homepwner/BNRAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // BNRAppDelegate.m 3 | // Homepwner 4 | // 5 | // Created by stephen g on 3/6/14. 6 | // Copyright (c) 2014 stephen g. All rights reserved. 7 | // 8 | 9 | #import "BNRAppDelegate.h" 10 | #import "BNRItemsViewController.h" 11 | 12 | 13 | @implementation BNRAppDelegate 14 | 15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 16 | { 17 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 18 | // Override point for customization after application launch. 19 | 20 | BNRItemsViewController *itemsViewController = [[BNRItemsViewController alloc] init]; 21 | UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:itemsViewController]; 22 | 23 | 24 | self.window.rootViewController = navController; 25 | 26 | 27 | self.window.backgroundColor = [UIColor whiteColor]; 28 | [self.window makeKeyAndVisible]; 29 | return YES; 30 | } 31 | 32 | - (void)applicationWillResignActive:(UIApplication *)application 33 | { 34 | // 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. 35 | // 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. 36 | } 37 | 38 | - (void)applicationDidEnterBackground:(UIApplication *)application 39 | { 40 | // 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. 41 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 42 | } 43 | 44 | - (void)applicationWillEnterForeground:(UIApplication *)application 45 | { 46 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 47 | } 48 | 49 | - (void)applicationDidBecomeActive:(UIApplication *)application 50 | { 51 | // 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. 52 | } 53 | 54 | - (void)applicationWillTerminate:(UIApplication *)application 55 | { 56 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /Homepwner/BNRItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // BNRItem.m 3 | // RandomItems 4 | // 5 | // Created by stephen g on 2/25/14. 6 | // Copyright (c) 2014 stephen g. All rights reserved. 7 | // 8 | 9 | #import "BNRItem.h" 10 | 11 | @implementation BNRItem 12 | 13 | +(instancetype)randomItem{ 14 | 15 | NSArray *randomAdjectiveList = @[@"Fluffy", @"Rusty", @"Shiny"]; 16 | NSArray *randomNounList = @[@"Bear", @"Spork", @"Shiny"]; 17 | 18 | NSInteger adjectiveIndex = arc4random() % randomAdjectiveList.count; 19 | NSInteger nounIndex = arc4random() % randomNounList.count; 20 | 21 | NSString *randomName = [NSString stringWithFormat:@"%@ %@", 22 | randomAdjectiveList[adjectiveIndex], 23 | randomNounList[nounIndex]]; 24 | 25 | int randomValue = arc4random() %100; 26 | 27 | NSString *randomSerialNumber = [NSString stringWithFormat:@"%c%c%c%c%c", 28 | '0'+ arc4random()%10, 29 | 'A'+ arc4random()%26, 30 | '0'+ arc4random()%10, 31 | 'A'+ arc4random()%26, 32 | '0'+ arc4random()%10]; 33 | 34 | BNRItem *item = [[self alloc] initWithItemName:randomName valueInDollars:randomValue serialNumber:randomSerialNumber]; 35 | 36 | return item; 37 | 38 | } 39 | 40 | -(instancetype)initWithItemName:(NSString *)name valueInDollars:(int)value serialNumber:(NSString *)sNumber{ 41 | self = [super init]; 42 | if(self){ 43 | _itemName = name; 44 | _valueInDollars = value; 45 | _serialNumber = sNumber; 46 | _dateCreated = [[NSDate alloc] init]; 47 | 48 | NSUUID *uuid = [[NSUUID alloc] init]; 49 | NSString *key = [uuid UUIDString]; 50 | _itemKey = key; 51 | } 52 | return self; 53 | } 54 | -(instancetype)initWithItemName:(NSString *)name{ 55 | return [self initWithItemName:name valueInDollars:0 serialNumber:@""]; 56 | } 57 | 58 | -(instancetype)initWithItemName:(NSString *)name serialNumber:(NSString *)sNumber{ 59 | return [self initWithItemName:name valueInDollars:0 serialNumber:sNumber]; 60 | }; 61 | 62 | -(instancetype)init{ 63 | return [self initWithItemName:@"Item"]; 64 | } 65 | 66 | -(void)dealloc{ 67 | NSLog(@"Destroyed: %@", self); 68 | } 69 | 70 | 71 | -(NSString *)description{ 72 | NSString *descriptionString = [[NSString alloc] initWithFormat:@"%@ (%@): Worth %d, recorded on %@", 73 | self.itemName, self.serialNumber, self.valueInDollars, self.dateCreated]; 74 | return descriptionString; 75 | } 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /Homepwner/BNRDetailViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // BNRDetailViewController.m 3 | // Homepwner 4 | // 5 | // Created by stephen g on 3/10/14. 6 | // Copyright (c) 2014 stephen g. All rights reserved. 7 | // 8 | 9 | #import "BNRDetailViewController.h" 10 | #import "BNRItem.h" 11 | #import "BNRImageStore.h" 12 | 13 | @interface BNRDetailViewController () 14 | 15 | @property (weak, nonatomic) IBOutlet UITextField *nameField; 16 | @property (weak, nonatomic) IBOutlet UITextField *serialNumberField; 17 | @property (weak, nonatomic) IBOutlet UITextField *valueField; 18 | @property (weak, nonatomic) IBOutlet UILabel *dateLabel; 19 | @property (weak, nonatomic) IBOutlet UIImageView *imageView; 20 | @property (weak, nonatomic) IBOutlet UIToolbar *toolbar; 21 | 22 | 23 | @end 24 | 25 | @implementation BNRDetailViewController 26 | 27 | -(void)viewWillAppear:(BOOL)animated{ 28 | [super viewWillAppear:animated]; 29 | BNRItem *item = self.item; 30 | 31 | self.nameField.text = item.itemName; 32 | self.serialNumberField.text = item.serialNumber; 33 | self.valueField.text = [NSString stringWithFormat:@"%d", item.valueInDollars]; 34 | 35 | static NSDateFormatter *dateFormatter = nil; 36 | if(!dateFormatter){ 37 | dateFormatter = [[NSDateFormatter alloc] init]; 38 | dateFormatter.dateStyle = NSDateFormatterMediumStyle; 39 | dateFormatter.timeStyle = NSDateFormatterNoStyle; 40 | } 41 | self.dateLabel.text = [dateFormatter stringFromDate:item.dateCreated]; 42 | } 43 | 44 | -(void)viewWillDisappear:(BOOL)animated{ 45 | [super viewWillDisappear:animated]; 46 | 47 | [self.view endEditing:YES]; 48 | self.item.itemName = self.nameField.text; 49 | self.item.serialNumber = self.serialNumberField.text; 50 | self.item.valueInDollars = [self.valueField.text intValue]; 51 | } 52 | 53 | -(void)setItem:(BNRItem *)item{ 54 | _item = item; 55 | self.navigationItem.title = item.itemName; 56 | } 57 | 58 | - (IBAction)takePicture:(id)sender { 59 | UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; 60 | 61 | if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]){ 62 | imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera; 63 | } else{ 64 | imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; 65 | } 66 | imagePicker.delegate = self; 67 | 68 | [self presentViewController:imagePicker animated:YES completion:nil]; 69 | 70 | } 71 | 72 | -(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{ 73 | UIImage *image = info[UIImagePickerControllerOriginalImage]; 74 | self.imageView.image = image; 75 | [[BNRImageStore sharedStore] setImage:image forKey:self.item.itemKey]; 76 | 77 | [self dismissViewControllerAnimated:YES completion:nil]; 78 | } 79 | 80 | 81 | 82 | @end 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /Homepwner/HeaderView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 27 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Homepwner.xcodeproj/xcuserdata/stepheng.xcuserdatad/xcschemes/Homepwner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /Homepwner/BNRItemsViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // BNRItemsViewController.m 3 | // Homepwner 4 | // 5 | // Created by stephen g on 3/6/14. 6 | // Copyright (c) 2014 stephen g. All rights reserved. 7 | // 8 | 9 | #import "BNRItemsViewController.h" 10 | #import "BNRItemStore.h" 11 | #import "BNRItem.h" 12 | #import "BNRDetailViewController.h" 13 | #import "BNRImageStore.h" 14 | 15 | @interface BNRItemsViewController() 16 | @property (nonatomic, strong) IBOutlet UIView *headerView; 17 | @end 18 | 19 | @implementation BNRItemsViewController 20 | 21 | -(void)viewDidLoad{ 22 | [super viewDidLoad]; 23 | [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"UITableViewCell"]; 24 | UIView *header = self.headerView; 25 | [self.tableView setTableHeaderView:header]; 26 | } 27 | 28 | -(void)viewWillAppear:(BOOL)animated{ 29 | [super viewWillAppear:animated]; 30 | [self.tableView reloadData]; 31 | } 32 | // 33 | //-(UIView *)headerView{ 34 | // if(!_headerView){ 35 | // [[NSBundle mainBundle] loadNibNamed:@"HeaderView" owner:self options:nil]; 36 | // } 37 | // return _headerView; 38 | //} 39 | 40 | -(instancetype)init{ 41 | self = [super initWithStyle:UITableViewStylePlain]; 42 | if(self){ 43 | [self.navigationItem setTitle:@"Items"]; 44 | UIBarButtonItem *addItemButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(addNewItem:)]; 45 | [self.navigationItem setRightBarButtonItem:addItemButton]; 46 | 47 | self.navigationItem.leftBarButtonItem = self.editButtonItem; 48 | } 49 | return self; 50 | } 51 | 52 | -(instancetype)initWithStyle:(UITableViewStyle)style{ 53 | return [self init]; 54 | } 55 | 56 | 57 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 58 | return [[[BNRItemStore sharedStore] allItems] count]+1; 59 | } 60 | 61 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 62 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"UITableViewCell" forIndexPath:indexPath]; 63 | 64 | if(indexPath.row == [[[BNRItemStore sharedStore] allItems] count]){ 65 | cell.textLabel.text = @"No More Items!"; 66 | return cell; 67 | } 68 | 69 | NSArray *items = [[BNRItemStore sharedStore] allItems]; 70 | BNRItem *item = items[indexPath.row]; 71 | cell.textLabel.text = [item description]; 72 | 73 | return cell; 74 | } 75 | 76 | -(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath{ 77 | 78 | if(indexPath.row == [[[BNRItemStore sharedStore] allItems] count]){ 79 | return; 80 | } 81 | if(editingStyle == UITableViewCellEditingStyleDelete){ 82 | NSArray *items = [[BNRItemStore sharedStore] allItems]; 83 | BNRItem *item = items[indexPath.row]; 84 | [[BNRItemStore sharedStore] removeItem:item]; 85 | 86 | [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; 87 | } 88 | } 89 | 90 | -(NSIndexPath *)tableView:(UITableView *)tableView targetIndexPathForMoveFromRowAtIndexPath:(NSIndexPath *)sourceIndexPath toProposedIndexPath:(NSIndexPath *)proposedDestinationIndexPath{ 91 | 92 | if(sourceIndexPath.row == [[[BNRItemStore sharedStore] allItems] count]){ 93 | return sourceIndexPath; 94 | } if(proposedDestinationIndexPath.row >= [[[BNRItemStore sharedStore] allItems] count]){ 95 | return sourceIndexPath; 96 | } else{ 97 | return proposedDestinationIndexPath; 98 | } 99 | } 100 | 101 | -(void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath{ 102 | if(sourceIndexPath.row == [[[BNRItemStore sharedStore] allItems] count]){ 103 | return; 104 | } 105 | [[BNRItemStore sharedStore] moveItemAtIndex:sourceIndexPath.row toIndex:destinationIndexPath.row]; 106 | } 107 | 108 | -(NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath{ 109 | return @"Remove"; 110 | } 111 | 112 | 113 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 114 | if(indexPath.row == [[[BNRItemStore sharedStore] allItems] count]){ 115 | return; 116 | } 117 | NSArray *items = [[BNRItemStore sharedStore] allItems]; 118 | BNRItem *item = [items objectAtIndex:indexPath.row]; 119 | 120 | BNRDetailViewController *detailViewController = [[BNRDetailViewController alloc] init]; 121 | [detailViewController setItem:item]; 122 | [self.navigationController pushViewController:detailViewController animated:YES]; 123 | } 124 | 125 | 126 | -(IBAction)addNewItem:(id)sender{ 127 | BNRItem *item = [[BNRItemStore sharedStore] createItem]; 128 | NSInteger lastRow = [[[BNRItemStore sharedStore] allItems] indexOfObject:item]; 129 | NSIndexPath *indexPath = [NSIndexPath indexPathForRow:lastRow inSection:0]; 130 | [self.tableView insertRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationTop]; 131 | } 132 | 133 | //-(IBAction)toggleEditingMode:(id)sender{ 134 | // if(self.editing){ 135 | // [sender setTitle:@"Edit" forState:UIControlStateNormal]; 136 | // [self setEditing:NO animated:YES]; 137 | // } else{ 138 | // [sender setTitle:@"Done" forState:UIControlStateNormal]; 139 | // [self setEditing:YES animated:YES]; 140 | // } 141 | // 142 | //} 143 | 144 | 145 | 146 | @end 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | -------------------------------------------------------------------------------- /Homepwner/BNRDetailViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 30 | 37 | 44 | 51 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /Homepwner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | EC5BA1B518CEB06800950044 /* HeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC5BA1B418CEB06800950044 /* HeaderView.xib */; }; 11 | EC5BA1B918CEC30600950044 /* BNRDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EC5BA1B718CEC30600950044 /* BNRDetailViewController.m */; }; 12 | EC5BA1BA18CEC30600950044 /* BNRDetailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC5BA1B818CEC30600950044 /* BNRDetailViewController.xib */; }; 13 | EC5BA1BD18D0037400950044 /* BNRImageStore.m in Sources */ = {isa = PBXBuildFile; fileRef = EC5BA1BC18D0037400950044 /* BNRImageStore.m */; }; 14 | ECF6F21718C97AC300BC0256 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ECF6F21618C97AC300BC0256 /* Foundation.framework */; }; 15 | ECF6F21918C97AC300BC0256 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ECF6F21818C97AC300BC0256 /* CoreGraphics.framework */; }; 16 | ECF6F21B18C97AC300BC0256 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ECF6F21A18C97AC300BC0256 /* UIKit.framework */; }; 17 | ECF6F22118C97AC300BC0256 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = ECF6F21F18C97AC300BC0256 /* InfoPlist.strings */; }; 18 | ECF6F22318C97AC300BC0256 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = ECF6F22218C97AC300BC0256 /* main.m */; }; 19 | ECF6F22718C97AC300BC0256 /* BNRAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = ECF6F22618C97AC300BC0256 /* BNRAppDelegate.m */; }; 20 | ECF6F22918C97AC300BC0256 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = ECF6F22818C97AC300BC0256 /* Images.xcassets */; }; 21 | ECF6F23018C97AC300BC0256 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ECF6F22F18C97AC300BC0256 /* XCTest.framework */; }; 22 | ECF6F23118C97AC300BC0256 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ECF6F21618C97AC300BC0256 /* Foundation.framework */; }; 23 | ECF6F23218C97AC300BC0256 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ECF6F21A18C97AC300BC0256 /* UIKit.framework */; }; 24 | ECF6F23A18C97AC300BC0256 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = ECF6F23818C97AC300BC0256 /* InfoPlist.strings */; }; 25 | ECF6F23C18C97AC300BC0256 /* HomepwnerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = ECF6F23B18C97AC300BC0256 /* HomepwnerTests.m */; }; 26 | ECF6F24718C97C1A00BC0256 /* BNRItemsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = ECF6F24618C97C1A00BC0256 /* BNRItemsViewController.m */; }; 27 | ECF6F24A18C97DEB00BC0256 /* BNRItem.m in Sources */ = {isa = PBXBuildFile; fileRef = ECF6F24918C97DEB00BC0256 /* BNRItem.m */; }; 28 | ECF6F24D18C97E6A00BC0256 /* BNRItemStore.m in Sources */ = {isa = PBXBuildFile; fileRef = ECF6F24C18C97E6A00BC0256 /* BNRItemStore.m */; }; 29 | /* End PBXBuildFile section */ 30 | 31 | /* Begin PBXContainerItemProxy section */ 32 | ECF6F23318C97AC300BC0256 /* PBXContainerItemProxy */ = { 33 | isa = PBXContainerItemProxy; 34 | containerPortal = ECF6F20B18C97AC300BC0256 /* Project object */; 35 | proxyType = 1; 36 | remoteGlobalIDString = ECF6F21218C97AC300BC0256; 37 | remoteInfo = Homepwner; 38 | }; 39 | /* End PBXContainerItemProxy section */ 40 | 41 | /* Begin PBXFileReference section */ 42 | EC5BA1B418CEB06800950044 /* HeaderView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HeaderView.xib; sourceTree = ""; }; 43 | EC5BA1B618CEC30600950044 /* BNRDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNRDetailViewController.h; sourceTree = ""; }; 44 | EC5BA1B718CEC30600950044 /* BNRDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNRDetailViewController.m; sourceTree = ""; }; 45 | EC5BA1B818CEC30600950044 /* BNRDetailViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = BNRDetailViewController.xib; sourceTree = ""; }; 46 | EC5BA1BB18D0037400950044 /* BNRImageStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNRImageStore.h; sourceTree = ""; }; 47 | EC5BA1BC18D0037400950044 /* BNRImageStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNRImageStore.m; sourceTree = ""; }; 48 | ECF6F21318C97AC300BC0256 /* Homepwner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Homepwner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | ECF6F21618C97AC300BC0256 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 50 | ECF6F21818C97AC300BC0256 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 51 | ECF6F21A18C97AC300BC0256 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 52 | ECF6F21E18C97AC300BC0256 /* Homepwner-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Homepwner-Info.plist"; sourceTree = ""; }; 53 | ECF6F22018C97AC300BC0256 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 54 | ECF6F22218C97AC300BC0256 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 55 | ECF6F22418C97AC300BC0256 /* Homepwner-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Homepwner-Prefix.pch"; sourceTree = ""; }; 56 | ECF6F22518C97AC300BC0256 /* BNRAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNRAppDelegate.h; sourceTree = ""; }; 57 | ECF6F22618C97AC300BC0256 /* BNRAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNRAppDelegate.m; sourceTree = ""; }; 58 | ECF6F22818C97AC300BC0256 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 59 | ECF6F22E18C97AC300BC0256 /* HomepwnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HomepwnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 60 | ECF6F22F18C97AC300BC0256 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 61 | ECF6F23718C97AC300BC0256 /* HomepwnerTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "HomepwnerTests-Info.plist"; sourceTree = ""; }; 62 | ECF6F23918C97AC300BC0256 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 63 | ECF6F23B18C97AC300BC0256 /* HomepwnerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomepwnerTests.m; sourceTree = ""; }; 64 | ECF6F24518C97C1A00BC0256 /* BNRItemsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNRItemsViewController.h; sourceTree = ""; }; 65 | ECF6F24618C97C1A00BC0256 /* BNRItemsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNRItemsViewController.m; sourceTree = ""; }; 66 | ECF6F24818C97DEB00BC0256 /* BNRItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNRItem.h; sourceTree = ""; }; 67 | ECF6F24918C97DEB00BC0256 /* BNRItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNRItem.m; sourceTree = ""; }; 68 | ECF6F24B18C97E6A00BC0256 /* BNRItemStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNRItemStore.h; sourceTree = ""; }; 69 | ECF6F24C18C97E6A00BC0256 /* BNRItemStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNRItemStore.m; sourceTree = ""; }; 70 | /* End PBXFileReference section */ 71 | 72 | /* Begin PBXFrameworksBuildPhase section */ 73 | ECF6F21018C97AC300BC0256 /* Frameworks */ = { 74 | isa = PBXFrameworksBuildPhase; 75 | buildActionMask = 2147483647; 76 | files = ( 77 | ECF6F21918C97AC300BC0256 /* CoreGraphics.framework in Frameworks */, 78 | ECF6F21B18C97AC300BC0256 /* UIKit.framework in Frameworks */, 79 | ECF6F21718C97AC300BC0256 /* Foundation.framework in Frameworks */, 80 | ); 81 | runOnlyForDeploymentPostprocessing = 0; 82 | }; 83 | ECF6F22B18C97AC300BC0256 /* Frameworks */ = { 84 | isa = PBXFrameworksBuildPhase; 85 | buildActionMask = 2147483647; 86 | files = ( 87 | ECF6F23018C97AC300BC0256 /* XCTest.framework in Frameworks */, 88 | ECF6F23218C97AC300BC0256 /* UIKit.framework in Frameworks */, 89 | ECF6F23118C97AC300BC0256 /* Foundation.framework in Frameworks */, 90 | ); 91 | runOnlyForDeploymentPostprocessing = 0; 92 | }; 93 | /* End PBXFrameworksBuildPhase section */ 94 | 95 | /* Begin PBXGroup section */ 96 | ECF6F20A18C97AC300BC0256 = { 97 | isa = PBXGroup; 98 | children = ( 99 | ECF6F21C18C97AC300BC0256 /* Homepwner */, 100 | ECF6F23518C97AC300BC0256 /* HomepwnerTests */, 101 | ECF6F21518C97AC300BC0256 /* Frameworks */, 102 | ECF6F21418C97AC300BC0256 /* Products */, 103 | ); 104 | sourceTree = ""; 105 | }; 106 | ECF6F21418C97AC300BC0256 /* Products */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | ECF6F21318C97AC300BC0256 /* Homepwner.app */, 110 | ECF6F22E18C97AC300BC0256 /* HomepwnerTests.xctest */, 111 | ); 112 | name = Products; 113 | sourceTree = ""; 114 | }; 115 | ECF6F21518C97AC300BC0256 /* Frameworks */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | ECF6F21618C97AC300BC0256 /* Foundation.framework */, 119 | ECF6F21818C97AC300BC0256 /* CoreGraphics.framework */, 120 | ECF6F21A18C97AC300BC0256 /* UIKit.framework */, 121 | ECF6F22F18C97AC300BC0256 /* XCTest.framework */, 122 | ); 123 | name = Frameworks; 124 | sourceTree = ""; 125 | }; 126 | ECF6F21C18C97AC300BC0256 /* Homepwner */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | ECF6F22518C97AC300BC0256 /* BNRAppDelegate.h */, 130 | ECF6F22618C97AC300BC0256 /* BNRAppDelegate.m */, 131 | EC5BA1B618CEC30600950044 /* BNRDetailViewController.h */, 132 | EC5BA1B718CEC30600950044 /* BNRDetailViewController.m */, 133 | EC5BA1B818CEC30600950044 /* BNRDetailViewController.xib */, 134 | EC5BA1BB18D0037400950044 /* BNRImageStore.h */, 135 | EC5BA1BC18D0037400950044 /* BNRImageStore.m */, 136 | ECF6F24818C97DEB00BC0256 /* BNRItem.h */, 137 | ECF6F24918C97DEB00BC0256 /* BNRItem.m */, 138 | ECF6F24B18C97E6A00BC0256 /* BNRItemStore.h */, 139 | ECF6F24C18C97E6A00BC0256 /* BNRItemStore.m */, 140 | ECF6F24518C97C1A00BC0256 /* BNRItemsViewController.h */, 141 | ECF6F24618C97C1A00BC0256 /* BNRItemsViewController.m */, 142 | EC5BA1B418CEB06800950044 /* HeaderView.xib */, 143 | ECF6F22818C97AC300BC0256 /* Images.xcassets */, 144 | ECF6F21D18C97AC300BC0256 /* Supporting Files */, 145 | ); 146 | path = Homepwner; 147 | sourceTree = ""; 148 | }; 149 | ECF6F21D18C97AC300BC0256 /* Supporting Files */ = { 150 | isa = PBXGroup; 151 | children = ( 152 | ECF6F21E18C97AC300BC0256 /* Homepwner-Info.plist */, 153 | ECF6F21F18C97AC300BC0256 /* InfoPlist.strings */, 154 | ECF6F22218C97AC300BC0256 /* main.m */, 155 | ECF6F22418C97AC300BC0256 /* Homepwner-Prefix.pch */, 156 | ); 157 | name = "Supporting Files"; 158 | sourceTree = ""; 159 | }; 160 | ECF6F23518C97AC300BC0256 /* HomepwnerTests */ = { 161 | isa = PBXGroup; 162 | children = ( 163 | ECF6F23B18C97AC300BC0256 /* HomepwnerTests.m */, 164 | ECF6F23618C97AC300BC0256 /* Supporting Files */, 165 | ); 166 | path = HomepwnerTests; 167 | sourceTree = ""; 168 | }; 169 | ECF6F23618C97AC300BC0256 /* Supporting Files */ = { 170 | isa = PBXGroup; 171 | children = ( 172 | ECF6F23718C97AC300BC0256 /* HomepwnerTests-Info.plist */, 173 | ECF6F23818C97AC300BC0256 /* InfoPlist.strings */, 174 | ); 175 | name = "Supporting Files"; 176 | sourceTree = ""; 177 | }; 178 | /* End PBXGroup section */ 179 | 180 | /* Begin PBXNativeTarget section */ 181 | ECF6F21218C97AC300BC0256 /* Homepwner */ = { 182 | isa = PBXNativeTarget; 183 | buildConfigurationList = ECF6F23F18C97AC300BC0256 /* Build configuration list for PBXNativeTarget "Homepwner" */; 184 | buildPhases = ( 185 | ECF6F20F18C97AC300BC0256 /* Sources */, 186 | ECF6F21018C97AC300BC0256 /* Frameworks */, 187 | ECF6F21118C97AC300BC0256 /* Resources */, 188 | ); 189 | buildRules = ( 190 | ); 191 | dependencies = ( 192 | ); 193 | name = Homepwner; 194 | productName = Homepwner; 195 | productReference = ECF6F21318C97AC300BC0256 /* Homepwner.app */; 196 | productType = "com.apple.product-type.application"; 197 | }; 198 | ECF6F22D18C97AC300BC0256 /* HomepwnerTests */ = { 199 | isa = PBXNativeTarget; 200 | buildConfigurationList = ECF6F24218C97AC300BC0256 /* Build configuration list for PBXNativeTarget "HomepwnerTests" */; 201 | buildPhases = ( 202 | ECF6F22A18C97AC300BC0256 /* Sources */, 203 | ECF6F22B18C97AC300BC0256 /* Frameworks */, 204 | ECF6F22C18C97AC300BC0256 /* Resources */, 205 | ); 206 | buildRules = ( 207 | ); 208 | dependencies = ( 209 | ECF6F23418C97AC300BC0256 /* PBXTargetDependency */, 210 | ); 211 | name = HomepwnerTests; 212 | productName = HomepwnerTests; 213 | productReference = ECF6F22E18C97AC300BC0256 /* HomepwnerTests.xctest */; 214 | productType = "com.apple.product-type.bundle.unit-test"; 215 | }; 216 | /* End PBXNativeTarget section */ 217 | 218 | /* Begin PBXProject section */ 219 | ECF6F20B18C97AC300BC0256 /* Project object */ = { 220 | isa = PBXProject; 221 | attributes = { 222 | CLASSPREFIX = BNR; 223 | LastUpgradeCheck = 0500; 224 | ORGANIZATIONNAME = "stephen g"; 225 | TargetAttributes = { 226 | ECF6F22D18C97AC300BC0256 = { 227 | TestTargetID = ECF6F21218C97AC300BC0256; 228 | }; 229 | }; 230 | }; 231 | buildConfigurationList = ECF6F20E18C97AC300BC0256 /* Build configuration list for PBXProject "Homepwner" */; 232 | compatibilityVersion = "Xcode 3.2"; 233 | developmentRegion = English; 234 | hasScannedForEncodings = 0; 235 | knownRegions = ( 236 | en, 237 | ); 238 | mainGroup = ECF6F20A18C97AC300BC0256; 239 | productRefGroup = ECF6F21418C97AC300BC0256 /* Products */; 240 | projectDirPath = ""; 241 | projectRoot = ""; 242 | targets = ( 243 | ECF6F21218C97AC300BC0256 /* Homepwner */, 244 | ECF6F22D18C97AC300BC0256 /* HomepwnerTests */, 245 | ); 246 | }; 247 | /* End PBXProject section */ 248 | 249 | /* Begin PBXResourcesBuildPhase section */ 250 | ECF6F21118C97AC300BC0256 /* Resources */ = { 251 | isa = PBXResourcesBuildPhase; 252 | buildActionMask = 2147483647; 253 | files = ( 254 | EC5BA1BA18CEC30600950044 /* BNRDetailViewController.xib in Resources */, 255 | EC5BA1B518CEB06800950044 /* HeaderView.xib in Resources */, 256 | ECF6F22118C97AC300BC0256 /* InfoPlist.strings in Resources */, 257 | ECF6F22918C97AC300BC0256 /* Images.xcassets in Resources */, 258 | ); 259 | runOnlyForDeploymentPostprocessing = 0; 260 | }; 261 | ECF6F22C18C97AC300BC0256 /* Resources */ = { 262 | isa = PBXResourcesBuildPhase; 263 | buildActionMask = 2147483647; 264 | files = ( 265 | ECF6F23A18C97AC300BC0256 /* InfoPlist.strings in Resources */, 266 | ); 267 | runOnlyForDeploymentPostprocessing = 0; 268 | }; 269 | /* End PBXResourcesBuildPhase section */ 270 | 271 | /* Begin PBXSourcesBuildPhase section */ 272 | ECF6F20F18C97AC300BC0256 /* Sources */ = { 273 | isa = PBXSourcesBuildPhase; 274 | buildActionMask = 2147483647; 275 | files = ( 276 | EC5BA1B918CEC30600950044 /* BNRDetailViewController.m in Sources */, 277 | ECF6F24D18C97E6A00BC0256 /* BNRItemStore.m in Sources */, 278 | EC5BA1BD18D0037400950044 /* BNRImageStore.m in Sources */, 279 | ECF6F24718C97C1A00BC0256 /* BNRItemsViewController.m in Sources */, 280 | ECF6F24A18C97DEB00BC0256 /* BNRItem.m in Sources */, 281 | ECF6F22318C97AC300BC0256 /* main.m in Sources */, 282 | ECF6F22718C97AC300BC0256 /* BNRAppDelegate.m in Sources */, 283 | ); 284 | runOnlyForDeploymentPostprocessing = 0; 285 | }; 286 | ECF6F22A18C97AC300BC0256 /* Sources */ = { 287 | isa = PBXSourcesBuildPhase; 288 | buildActionMask = 2147483647; 289 | files = ( 290 | ECF6F23C18C97AC300BC0256 /* HomepwnerTests.m in Sources */, 291 | ); 292 | runOnlyForDeploymentPostprocessing = 0; 293 | }; 294 | /* End PBXSourcesBuildPhase section */ 295 | 296 | /* Begin PBXTargetDependency section */ 297 | ECF6F23418C97AC300BC0256 /* PBXTargetDependency */ = { 298 | isa = PBXTargetDependency; 299 | target = ECF6F21218C97AC300BC0256 /* Homepwner */; 300 | targetProxy = ECF6F23318C97AC300BC0256 /* PBXContainerItemProxy */; 301 | }; 302 | /* End PBXTargetDependency section */ 303 | 304 | /* Begin PBXVariantGroup section */ 305 | ECF6F21F18C97AC300BC0256 /* InfoPlist.strings */ = { 306 | isa = PBXVariantGroup; 307 | children = ( 308 | ECF6F22018C97AC300BC0256 /* en */, 309 | ); 310 | name = InfoPlist.strings; 311 | sourceTree = ""; 312 | }; 313 | ECF6F23818C97AC300BC0256 /* InfoPlist.strings */ = { 314 | isa = PBXVariantGroup; 315 | children = ( 316 | ECF6F23918C97AC300BC0256 /* en */, 317 | ); 318 | name = InfoPlist.strings; 319 | sourceTree = ""; 320 | }; 321 | /* End PBXVariantGroup section */ 322 | 323 | /* Begin XCBuildConfiguration section */ 324 | ECF6F23D18C97AC300BC0256 /* Debug */ = { 325 | isa = XCBuildConfiguration; 326 | buildSettings = { 327 | ALWAYS_SEARCH_USER_PATHS = NO; 328 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 329 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 330 | CLANG_CXX_LIBRARY = "libc++"; 331 | CLANG_ENABLE_MODULES = YES; 332 | CLANG_ENABLE_OBJC_ARC = YES; 333 | CLANG_WARN_BOOL_CONVERSION = YES; 334 | CLANG_WARN_CONSTANT_CONVERSION = YES; 335 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 336 | CLANG_WARN_EMPTY_BODY = YES; 337 | CLANG_WARN_ENUM_CONVERSION = YES; 338 | CLANG_WARN_INT_CONVERSION = YES; 339 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 340 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 341 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 342 | COPY_PHASE_STRIP = NO; 343 | GCC_C_LANGUAGE_STANDARD = gnu99; 344 | GCC_DYNAMIC_NO_PIC = NO; 345 | GCC_OPTIMIZATION_LEVEL = 0; 346 | GCC_PREPROCESSOR_DEFINITIONS = ( 347 | "DEBUG=1", 348 | "$(inherited)", 349 | ); 350 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 351 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 352 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 353 | GCC_WARN_UNDECLARED_SELECTOR = YES; 354 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 355 | GCC_WARN_UNUSED_FUNCTION = YES; 356 | GCC_WARN_UNUSED_VARIABLE = YES; 357 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 358 | ONLY_ACTIVE_ARCH = YES; 359 | SDKROOT = iphoneos; 360 | }; 361 | name = Debug; 362 | }; 363 | ECF6F23E18C97AC300BC0256 /* Release */ = { 364 | isa = XCBuildConfiguration; 365 | buildSettings = { 366 | ALWAYS_SEARCH_USER_PATHS = NO; 367 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 368 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 369 | CLANG_CXX_LIBRARY = "libc++"; 370 | CLANG_ENABLE_MODULES = YES; 371 | CLANG_ENABLE_OBJC_ARC = YES; 372 | CLANG_WARN_BOOL_CONVERSION = YES; 373 | CLANG_WARN_CONSTANT_CONVERSION = YES; 374 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 375 | CLANG_WARN_EMPTY_BODY = YES; 376 | CLANG_WARN_ENUM_CONVERSION = YES; 377 | CLANG_WARN_INT_CONVERSION = YES; 378 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 379 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 380 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 381 | COPY_PHASE_STRIP = YES; 382 | ENABLE_NS_ASSERTIONS = NO; 383 | GCC_C_LANGUAGE_STANDARD = gnu99; 384 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 385 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 386 | GCC_WARN_UNDECLARED_SELECTOR = YES; 387 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 388 | GCC_WARN_UNUSED_FUNCTION = YES; 389 | GCC_WARN_UNUSED_VARIABLE = YES; 390 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 391 | SDKROOT = iphoneos; 392 | VALIDATE_PRODUCT = YES; 393 | }; 394 | name = Release; 395 | }; 396 | ECF6F24018C97AC300BC0256 /* Debug */ = { 397 | isa = XCBuildConfiguration; 398 | buildSettings = { 399 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 400 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 401 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 402 | GCC_PREFIX_HEADER = "Homepwner/Homepwner-Prefix.pch"; 403 | INFOPLIST_FILE = "Homepwner/Homepwner-Info.plist"; 404 | PRODUCT_NAME = "$(TARGET_NAME)"; 405 | WRAPPER_EXTENSION = app; 406 | }; 407 | name = Debug; 408 | }; 409 | ECF6F24118C97AC300BC0256 /* Release */ = { 410 | isa = XCBuildConfiguration; 411 | buildSettings = { 412 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 413 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 414 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 415 | GCC_PREFIX_HEADER = "Homepwner/Homepwner-Prefix.pch"; 416 | INFOPLIST_FILE = "Homepwner/Homepwner-Info.plist"; 417 | PRODUCT_NAME = "$(TARGET_NAME)"; 418 | WRAPPER_EXTENSION = app; 419 | }; 420 | name = Release; 421 | }; 422 | ECF6F24318C97AC300BC0256 /* Debug */ = { 423 | isa = XCBuildConfiguration; 424 | buildSettings = { 425 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 426 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Homepwner.app/Homepwner"; 427 | FRAMEWORK_SEARCH_PATHS = ( 428 | "$(SDKROOT)/Developer/Library/Frameworks", 429 | "$(inherited)", 430 | "$(DEVELOPER_FRAMEWORKS_DIR)", 431 | ); 432 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 433 | GCC_PREFIX_HEADER = "Homepwner/Homepwner-Prefix.pch"; 434 | GCC_PREPROCESSOR_DEFINITIONS = ( 435 | "DEBUG=1", 436 | "$(inherited)", 437 | ); 438 | INFOPLIST_FILE = "HomepwnerTests/HomepwnerTests-Info.plist"; 439 | PRODUCT_NAME = "$(TARGET_NAME)"; 440 | TEST_HOST = "$(BUNDLE_LOADER)"; 441 | WRAPPER_EXTENSION = xctest; 442 | }; 443 | name = Debug; 444 | }; 445 | ECF6F24418C97AC300BC0256 /* Release */ = { 446 | isa = XCBuildConfiguration; 447 | buildSettings = { 448 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 449 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Homepwner.app/Homepwner"; 450 | FRAMEWORK_SEARCH_PATHS = ( 451 | "$(SDKROOT)/Developer/Library/Frameworks", 452 | "$(inherited)", 453 | "$(DEVELOPER_FRAMEWORKS_DIR)", 454 | ); 455 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 456 | GCC_PREFIX_HEADER = "Homepwner/Homepwner-Prefix.pch"; 457 | INFOPLIST_FILE = "HomepwnerTests/HomepwnerTests-Info.plist"; 458 | PRODUCT_NAME = "$(TARGET_NAME)"; 459 | TEST_HOST = "$(BUNDLE_LOADER)"; 460 | WRAPPER_EXTENSION = xctest; 461 | }; 462 | name = Release; 463 | }; 464 | /* End XCBuildConfiguration section */ 465 | 466 | /* Begin XCConfigurationList section */ 467 | ECF6F20E18C97AC300BC0256 /* Build configuration list for PBXProject "Homepwner" */ = { 468 | isa = XCConfigurationList; 469 | buildConfigurations = ( 470 | ECF6F23D18C97AC300BC0256 /* Debug */, 471 | ECF6F23E18C97AC300BC0256 /* Release */, 472 | ); 473 | defaultConfigurationIsVisible = 0; 474 | defaultConfigurationName = Release; 475 | }; 476 | ECF6F23F18C97AC300BC0256 /* Build configuration list for PBXNativeTarget "Homepwner" */ = { 477 | isa = XCConfigurationList; 478 | buildConfigurations = ( 479 | ECF6F24018C97AC300BC0256 /* Debug */, 480 | ECF6F24118C97AC300BC0256 /* Release */, 481 | ); 482 | defaultConfigurationIsVisible = 0; 483 | defaultConfigurationName = Release; 484 | }; 485 | ECF6F24218C97AC300BC0256 /* Build configuration list for PBXNativeTarget "HomepwnerTests" */ = { 486 | isa = XCConfigurationList; 487 | buildConfigurations = ( 488 | ECF6F24318C97AC300BC0256 /* Debug */, 489 | ECF6F24418C97AC300BC0256 /* Release */, 490 | ); 491 | defaultConfigurationIsVisible = 0; 492 | defaultConfigurationName = Release; 493 | }; 494 | /* End XCConfigurationList section */ 495 | }; 496 | rootObject = ECF6F20B18C97AC300BC0256 /* Project object */; 497 | } 498 | --------------------------------------------------------------------------------