├── .gitignore ├── ICBPrettyTableView ├── ICBAppDelegate.h ├── ICBAppDelegate.m ├── ICBTableViewCell.h ├── ICBTableViewCell.m ├── ICBTableViewController.h ├── ICBTableViewController.m ├── ICB_PrettyTableView-Info.plist ├── ICB_PrettyTableView-Prefix.pch ├── en.lproj │ └── InfoPlist.strings └── main.m ├── ICB_PrettyTableView.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata └── README /.gitignore: -------------------------------------------------------------------------------- 1 | # xcode noise 2 | build/* 3 | *.pbxuser 4 | *.mode1v3 5 | xcuserdata 6 | 7 | # auto git version noise 8 | InfoPlist.h 9 | 10 | # old skool 11 | .svn 12 | 13 | # osx noise 14 | .DS_Store 15 | profile 16 | -------------------------------------------------------------------------------- /ICBPrettyTableView/ICBAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ICBAppDelegate.h 3 | // ICBPrettyTableView 4 | // 5 | // Created by James Van Metre on 11/17/11. 6 | // Copyright (c) 2011 ELC Technologies. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class ICBTableViewController; 12 | 13 | @interface ICBAppDelegate : UIResponder 14 | 15 | @property (strong, nonatomic) UIWindow *window; 16 | 17 | @property (strong, nonatomic) ICBTableViewController *viewController; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /ICBPrettyTableView/ICBAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // ICBAppDelegate.m 3 | // ICBPrettyTableView 4 | // 5 | // Created by James Van Metre on 11/17/11. 6 | // Copyright (c) 2011 ELC Technologies. All rights reserved. 7 | // 8 | 9 | #import "ICBAppDelegate.h" 10 | 11 | #import "ICBTableViewController.h" 12 | 13 | @implementation ICBAppDelegate 14 | 15 | @synthesize window = _window; 16 | @synthesize viewController = _viewController; 17 | 18 | - (void)dealloc 19 | { 20 | [_window release]; 21 | [_viewController release]; 22 | [super dealloc]; 23 | } 24 | 25 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 26 | { 27 | self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; 28 | // Override point for customization after application launch. 29 | self.viewController = [[[ICBTableViewController alloc] initWithStyle:UITableViewStylePlain] autorelease]; 30 | self.window.rootViewController = self.viewController; 31 | [self.window makeKeyAndVisible]; 32 | return YES; 33 | } 34 | 35 | - (void)applicationWillResignActive:(UIApplication *)application 36 | { 37 | /* 38 | 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. 39 | 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. 40 | */ 41 | } 42 | 43 | - (void)applicationDidEnterBackground:(UIApplication *)application 44 | { 45 | /* 46 | 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. 47 | If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 48 | */ 49 | } 50 | 51 | - (void)applicationWillEnterForeground:(UIApplication *)application 52 | { 53 | /* 54 | 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. 55 | */ 56 | } 57 | 58 | - (void)applicationDidBecomeActive:(UIApplication *)application 59 | { 60 | /* 61 | 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. 62 | */ 63 | } 64 | 65 | - (void)applicationWillTerminate:(UIApplication *)application 66 | { 67 | /* 68 | Called when the application is about to terminate. 69 | Save data if appropriate. 70 | See also applicationDidEnterBackground:. 71 | */ 72 | } 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /ICBPrettyTableView/ICBTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ICBTableViewCell.h 3 | // ICBPrettyTableView 4 | // 5 | // Created by James Van Metre on 11/17/11. 6 | // Copyright (c) 2011 ELC Technologies. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface ICBTableViewCell : UITableViewCell 13 | 14 | @property (nonatomic, retain) NSString *firstName; 15 | @property (nonatomic, retain) NSString *lastName; 16 | @property (nonatomic, retain) NSString *email; 17 | @property (nonatomic, retain) NSString *phone; 18 | //@property (nonatomic, retain) UIImage *image; 19 | @property (nonatomic, retain) NSString *address; 20 | 21 | - (void)setRecord:(ABRecordRef)record; 22 | - (void)setDictionary:(NSDictionary *)dict; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ICBPrettyTableView/ICBTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // ICBTableViewCell.m 3 | // ICBPrettyTableView 4 | // 5 | // Created by James Van Metre on 11/17/11. 6 | // Copyright (c) 2011 ELC Technologies. All rights reserved. 7 | // 8 | 9 | #import "ICBTableViewCell.h" 10 | 11 | @implementation ICBTableViewCell 12 | 13 | @synthesize firstName = _firstName; 14 | @synthesize lastName = _lastName; 15 | @synthesize email = _email; 16 | @synthesize phone = _phone; 17 | @synthesize address = _address; 18 | 19 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 20 | { 21 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 22 | if (self) { 23 | self.selectionStyle = UITableViewCellSelectionStyleNone; 24 | } 25 | return self; 26 | } 27 | 28 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated 29 | { 30 | [super setSelected:selected animated:animated]; 31 | 32 | // Configure the view for the selected state 33 | } 34 | 35 | - (NSString *)getFirstEmail:(ABRecordRef)record 36 | { 37 | ABMultiValueRef valueRef = ABRecordCopyValue(record, kABPersonEmailProperty); 38 | NSInteger count = ABMultiValueGetCount(valueRef); 39 | if (count > 0) { 40 | NSString *string = (NSString *)ABMultiValueCopyValueAtIndex(valueRef, 0); 41 | CFRelease(valueRef); 42 | return [string autorelease]; 43 | } else { 44 | CFRelease(valueRef); 45 | return nil; 46 | } 47 | } 48 | 49 | - (NSString *)getFirstPhone:(ABRecordRef)record 50 | { 51 | ABMultiValueRef valueRef = ABRecordCopyValue(record, kABPersonPhoneProperty); 52 | NSInteger count = ABMultiValueGetCount(valueRef); 53 | if (count > 0) { 54 | NSString *string = (NSString *)ABMultiValueCopyValueAtIndex(valueRef, 0); 55 | CFRelease(valueRef); 56 | return [string autorelease]; 57 | } else { 58 | CFRelease(valueRef); 59 | return nil; 60 | } 61 | } 62 | 63 | - (void)setRecord:(ABRecordRef)record 64 | { 65 | self.firstName = [(NSString *)ABRecordCopyValue(record, kABPersonFirstNameProperty) autorelease]; 66 | self.lastName = [(NSString *)ABRecordCopyValue(record, kABPersonLastNameProperty) autorelease]; 67 | self.email = [self getFirstEmail:record]; 68 | self.phone = [self getFirstPhone:record]; 69 | [self setNeedsDisplay]; 70 | } 71 | 72 | - (void)setDictionary:(NSDictionary *)dict 73 | { 74 | self.firstName = [dict objectForKey:@"firstName"]; 75 | self.lastName = [dict objectForKey:@"lastName"]; 76 | self.email = [dict objectForKey:@"email"]; 77 | self.phone = [dict objectForKey:@"phone"]; 78 | [self setNeedsDisplay]; 79 | } 80 | 81 | - (void)drawRect:(CGRect)rect 82 | { 83 | CGContextRef ctx = UIGraphicsGetCurrentContext(); 84 | 85 | CGContextClipToRect(ctx, rect); 86 | //If even 87 | if (((self.tag % 2) == 0)) { 88 | CGContextSetFillColorWithColor(ctx, [UIColor colorWithWhite:0.1f alpha:1.f].CGColor); 89 | } else { 90 | CGContextSetFillColorWithColor(ctx, [UIColor colorWithWhite:0.15f alpha:1.f].CGColor); 91 | } 92 | 93 | CGContextFillRect(ctx, rect); 94 | 95 | //Vertically center our text, if no email 96 | BOOL isCentered = (self.email == nil); 97 | 98 | CGRect tempRect; 99 | CGFloat midY = CGRectGetMidY(rect); 100 | [[UIColor whiteColor] set]; 101 | UIFont *defaultFont = [UIFont systemFontOfSize:16]; 102 | CGSize size = [self.firstName sizeWithFont:defaultFont]; 103 | if (isCentered == NO) { 104 | tempRect = CGRectMake(5, 0, size.width, size.height); 105 | } else { 106 | tempRect = CGRectMake(5, midY - size.height/2, size.width, size.height); 107 | } 108 | [self.firstName drawInRect:tempRect withFont:defaultFont]; 109 | 110 | [[UIColor lightGrayColor] set]; 111 | size = [self.lastName sizeWithFont:defaultFont]; 112 | if (isCentered == NO) { 113 | tempRect = CGRectMake(CGRectGetMaxX(tempRect)+5, 0, size.width, size.height); 114 | } else { 115 | tempRect = CGRectMake(CGRectGetMaxX(tempRect)+5, midY - size.height/2, size.width, size.height); 116 | } 117 | [self.lastName drawInRect:tempRect withFont:defaultFont]; 118 | 119 | if (self.phone != nil) { 120 | [[UIColor redColor] set]; 121 | size = [self.phone sizeWithFont:defaultFont]; 122 | CGFloat end = CGRectGetMaxX(tempRect) + size.width; 123 | if (end > rect.size.width) { 124 | size.width = CGRectGetMaxX(rect) - CGRectGetMaxX(tempRect) - 10; //-10 so that we get 5 from the end of last name, and 5 from the end of rect 125 | } 126 | if (isCentered == NO) { 127 | tempRect = CGRectMake(CGRectGetMaxX(rect) - size.width - 5, 0, size.width, size.height); 128 | } else { 129 | tempRect = CGRectMake(CGRectGetMaxX(rect) - size.width - 5, midY - size.height/2, size.width, size.height); 130 | } 131 | [self.phone drawInRect:tempRect withFont:defaultFont lineBreakMode:UILineBreakModeTailTruncation]; 132 | } 133 | 134 | if (self.email != nil) { 135 | [[UIColor blueColor] set]; 136 | size = [self.email sizeWithFont:defaultFont]; 137 | tempRect = CGRectMake(5, midY, size.width, size.height); 138 | [self.email drawInRect:tempRect withFont:defaultFont]; 139 | } 140 | } 141 | 142 | @end 143 | -------------------------------------------------------------------------------- /ICBPrettyTableView/ICBTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ICBViewController.h 3 | // ICBPrettyTableView 4 | // 5 | // Created by James Van Metre on 11/17/11. 6 | // Copyright (c) 2011 ELC Technologies. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface ICBTableViewController : UITableViewController 13 | { 14 | ABAddressBookRef _addressBook; 15 | } 16 | 17 | @property (nonatomic, retain) NSArray *contacts; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /ICBPrettyTableView/ICBTableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ICBViewController.m 3 | // ICBPrettyTableView 4 | // 5 | // Created by James Van Metre on 11/17/11. 6 | // Copyright (c) 2011 ELC Technologies. All rights reserved. 7 | // 8 | 9 | #import "ICBTableViewController.h" 10 | #import "ICBTableViewCell.h" 11 | 12 | @implementation ICBTableViewController 13 | 14 | @synthesize contacts = _contacts; 15 | 16 | - (void)didReceiveMemoryWarning 17 | { 18 | [super didReceiveMemoryWarning]; 19 | // Release any cached data, images, etc that aren't in use. 20 | } 21 | 22 | - (void)dealloc 23 | { 24 | CFRelease(_addressBook); 25 | [_contacts release]; 26 | _contacts = nil; 27 | } 28 | 29 | #pragma mark - View lifecycle 30 | - (void)viewDidLoad 31 | { 32 | [super viewDidLoad]; 33 | self.tableView.backgroundColor = UIColor.blackColor; 34 | self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; 35 | 36 | _addressBook = ABAddressBookCreate(); 37 | NSArray *tempArray = [(NSArray *)ABAddressBookCopyArrayOfAllPeople(_addressBook) autorelease]; 38 | tempArray = [tempArray sortedArrayUsingComparator:^NSComparisonResult(id obj1, id obj2) { 39 | NSString *name1 = (NSString *)ABRecordCopyCompositeName((ABRecordRef)obj1); 40 | NSString *name2 = (NSString *)ABRecordCopyCompositeName((ABRecordRef)obj2); 41 | [name1 autorelease]; 42 | [name2 autorelease]; 43 | return [name1 compare:name2]; 44 | }]; 45 | 46 | if ([tempArray count] > 0) { 47 | self.contacts = tempArray; 48 | } else { 49 | NSMutableArray *tempMutableArray = [NSMutableArray arrayWithCapacity:100]; 50 | for (int i = 0; i < 100; ++i) { 51 | NSMutableDictionary *dict = [NSMutableDictionary dictionary]; 52 | if ((i % 9) != 0) { 53 | [dict setObject:[NSString stringWithFormat:@"FirstName%d", i] forKey:@"firstName"]; 54 | } 55 | if ((i % 3) == 0) { 56 | [dict setObject:[NSString stringWithFormat:@"LastName%d", i] forKey:@"lastName"]; 57 | } 58 | if ((i % 3) == 0 && (i % 2) == 0) { 59 | [dict setObject:[NSString stringWithFormat:@"emailTest%d@test%d.com", i, i] forKey:@"email"]; 60 | } 61 | if ((i % 7) == 0) { 62 | NSString *string = [NSString stringWithFormat:@"%d", i]; 63 | while ([string length] < 10) { 64 | string = [string stringByAppendingFormat:@"%@", string]; 65 | } 66 | [dict setObject:string forKey:@"phone"]; 67 | } 68 | [tempMutableArray addObject:dict]; 69 | } 70 | self.contacts = tempMutableArray; 71 | } 72 | } 73 | 74 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 75 | { 76 | // Return YES for supported orientations 77 | return YES; 78 | } 79 | 80 | #pragma mark - Table view data source 81 | 82 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 83 | { 84 | // Return the number of sections. 85 | return 1; 86 | } 87 | 88 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 89 | { 90 | return [self.contacts count]; 91 | } 92 | 93 | // Customize the appearance of table view cells. 94 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 95 | { 96 | 97 | static NSString *CellIdentifier = @"ICBTableViewCellIdentifier"; 98 | 99 | ICBTableViewCell *cell = (ICBTableViewCell*)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 100 | if (cell == nil) { 101 | cell = [[[ICBTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; 102 | // cell.delegate = self; 103 | cell.textLabel.textColor = UIColor.whiteColor; 104 | } 105 | cell.tag = indexPath.row; 106 | 107 | NSObject *object = [self.contacts objectAtIndex:indexPath.row]; 108 | if ([object isKindOfClass:NSDictionary.class]) { 109 | [cell setDictionary:(NSDictionary *)object]; 110 | } else { 111 | [cell setRecord:(ABRecordRef)object]; 112 | } 113 | 114 | return cell; 115 | } 116 | 117 | @end 118 | -------------------------------------------------------------------------------- /ICBPrettyTableView/ICB_PrettyTableView-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFiles 12 | 13 | CFBundleIdentifier 14 | com.elctech.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 1.0 27 | LSRequiresIPhoneOS 28 | 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | UIInterfaceOrientationPortraitUpsideDown 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ICBPrettyTableView/ICB_PrettyTableView-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'ICBPrettyTableView' target in the 'ICBPrettyTableView' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_4_0 8 | #warning "This project uses features only available in iOS SDK 4.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /ICBPrettyTableView/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /ICBPrettyTableView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ICBPrettyTableView 4 | // 5 | // Created by James Van Metre on 11/17/11. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "ICBAppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([ICBAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ICB_PrettyTableView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1AD37DCD1475936F006E9D1B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AD37DCC1475936F006E9D1B /* UIKit.framework */; }; 11 | 1AD37DCF1475936F006E9D1B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AD37DCE1475936F006E9D1B /* Foundation.framework */; }; 12 | 1AD37DD11475936F006E9D1B /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AD37DD01475936F006E9D1B /* CoreGraphics.framework */; }; 13 | 1AD37DD71475936F006E9D1B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1AD37DD51475936F006E9D1B /* InfoPlist.strings */; }; 14 | 1AD37DD91475936F006E9D1B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AD37DD81475936F006E9D1B /* main.m */; }; 15 | 1AD37DDD1475936F006E9D1B /* ICBAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AD37DDC1475936F006E9D1B /* ICBAppDelegate.m */; }; 16 | 1AD37DE01475936F006E9D1B /* ICBTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AD37DDF1475936F006E9D1B /* ICBTableViewController.m */; }; 17 | 1AD37DEE14759594006E9D1B /* ICBTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AD37DED14759594006E9D1B /* ICBTableViewCell.m */; }; 18 | 1AD37DF51475A4E8006E9D1B /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AD37DF41475A4E8006E9D1B /* AddressBook.framework */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXFileReference section */ 22 | 1AD37DC81475936F006E9D1B /* ICB_PrettyTableView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ICB_PrettyTableView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 23 | 1AD37DCC1475936F006E9D1B /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 24 | 1AD37DCE1475936F006E9D1B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 25 | 1AD37DD01475936F006E9D1B /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 26 | 1AD37DD41475936F006E9D1B /* ICB_PrettyTableView-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ICB_PrettyTableView-Info.plist"; sourceTree = ""; }; 27 | 1AD37DD61475936F006E9D1B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 28 | 1AD37DD81475936F006E9D1B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 29 | 1AD37DDA1475936F006E9D1B /* ICB_PrettyTableView-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ICB_PrettyTableView-Prefix.pch"; sourceTree = ""; }; 30 | 1AD37DDB1475936F006E9D1B /* ICBAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ICBAppDelegate.h; sourceTree = ""; }; 31 | 1AD37DDC1475936F006E9D1B /* ICBAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ICBAppDelegate.m; sourceTree = ""; }; 32 | 1AD37DDE1475936F006E9D1B /* ICBTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ICBTableViewController.h; sourceTree = ""; }; 33 | 1AD37DDF1475936F006E9D1B /* ICBTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ICBTableViewController.m; sourceTree = ""; }; 34 | 1AD37DEC14759594006E9D1B /* ICBTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICBTableViewCell.h; sourceTree = ""; }; 35 | 1AD37DED14759594006E9D1B /* ICBTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ICBTableViewCell.m; sourceTree = ""; }; 36 | 1AD37DF41475A4E8006E9D1B /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; }; 37 | /* End PBXFileReference section */ 38 | 39 | /* Begin PBXFrameworksBuildPhase section */ 40 | 1AD37DC51475936F006E9D1B /* Frameworks */ = { 41 | isa = PBXFrameworksBuildPhase; 42 | buildActionMask = 2147483647; 43 | files = ( 44 | 1AD37DF51475A4E8006E9D1B /* AddressBook.framework in Frameworks */, 45 | 1AD37DCD1475936F006E9D1B /* UIKit.framework in Frameworks */, 46 | 1AD37DCF1475936F006E9D1B /* Foundation.framework in Frameworks */, 47 | 1AD37DD11475936F006E9D1B /* CoreGraphics.framework in Frameworks */, 48 | ); 49 | runOnlyForDeploymentPostprocessing = 0; 50 | }; 51 | /* End PBXFrameworksBuildPhase section */ 52 | 53 | /* Begin PBXGroup section */ 54 | 1AD37DBD1475936F006E9D1B = { 55 | isa = PBXGroup; 56 | children = ( 57 | 1AD37DF41475A4E8006E9D1B /* AddressBook.framework */, 58 | 1AD37DD21475936F006E9D1B /* ICB_PrettyTableView */, 59 | 1AD37DCB1475936F006E9D1B /* Frameworks */, 60 | 1AD37DC91475936F006E9D1B /* Products */, 61 | ); 62 | sourceTree = ""; 63 | }; 64 | 1AD37DC91475936F006E9D1B /* Products */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | 1AD37DC81475936F006E9D1B /* ICB_PrettyTableView.app */, 68 | ); 69 | name = Products; 70 | sourceTree = ""; 71 | }; 72 | 1AD37DCB1475936F006E9D1B /* Frameworks */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | 1AD37DCC1475936F006E9D1B /* UIKit.framework */, 76 | 1AD37DCE1475936F006E9D1B /* Foundation.framework */, 77 | 1AD37DD01475936F006E9D1B /* CoreGraphics.framework */, 78 | ); 79 | name = Frameworks; 80 | sourceTree = ""; 81 | }; 82 | 1AD37DD21475936F006E9D1B /* ICB_PrettyTableView */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | 1AD37DDB1475936F006E9D1B /* ICBAppDelegate.h */, 86 | 1AD37DDC1475936F006E9D1B /* ICBAppDelegate.m */, 87 | 1AD37DDE1475936F006E9D1B /* ICBTableViewController.h */, 88 | 1AD37DDF1475936F006E9D1B /* ICBTableViewController.m */, 89 | 1AD37DEC14759594006E9D1B /* ICBTableViewCell.h */, 90 | 1AD37DED14759594006E9D1B /* ICBTableViewCell.m */, 91 | 1AD37DD31475936F006E9D1B /* Supporting Files */, 92 | ); 93 | name = ICB_PrettyTableView; 94 | path = ICBPrettyTableView; 95 | sourceTree = ""; 96 | }; 97 | 1AD37DD31475936F006E9D1B /* Supporting Files */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 1AD37DD41475936F006E9D1B /* ICB_PrettyTableView-Info.plist */, 101 | 1AD37DD51475936F006E9D1B /* InfoPlist.strings */, 102 | 1AD37DD81475936F006E9D1B /* main.m */, 103 | 1AD37DDA1475936F006E9D1B /* ICB_PrettyTableView-Prefix.pch */, 104 | ); 105 | name = "Supporting Files"; 106 | sourceTree = ""; 107 | }; 108 | /* End PBXGroup section */ 109 | 110 | /* Begin PBXNativeTarget section */ 111 | 1AD37DC71475936F006E9D1B /* ICB_PrettyTableView */ = { 112 | isa = PBXNativeTarget; 113 | buildConfigurationList = 1AD37DE61475936F006E9D1B /* Build configuration list for PBXNativeTarget "ICB_PrettyTableView" */; 114 | buildPhases = ( 115 | 1AD37DC41475936F006E9D1B /* Sources */, 116 | 1AD37DC51475936F006E9D1B /* Frameworks */, 117 | 1AD37DC61475936F006E9D1B /* Resources */, 118 | ); 119 | buildRules = ( 120 | ); 121 | dependencies = ( 122 | ); 123 | name = ICB_PrettyTableView; 124 | productName = ICBPrettyTableView; 125 | productReference = 1AD37DC81475936F006E9D1B /* ICB_PrettyTableView.app */; 126 | productType = "com.apple.product-type.application"; 127 | }; 128 | /* End PBXNativeTarget section */ 129 | 130 | /* Begin PBXProject section */ 131 | 1AD37DBF1475936F006E9D1B /* Project object */ = { 132 | isa = PBXProject; 133 | attributes = { 134 | LastUpgradeCheck = 0420; 135 | }; 136 | buildConfigurationList = 1AD37DC21475936F006E9D1B /* Build configuration list for PBXProject "ICB_PrettyTableView" */; 137 | compatibilityVersion = "Xcode 3.2"; 138 | developmentRegion = English; 139 | hasScannedForEncodings = 0; 140 | knownRegions = ( 141 | en, 142 | ); 143 | mainGroup = 1AD37DBD1475936F006E9D1B; 144 | productRefGroup = 1AD37DC91475936F006E9D1B /* Products */; 145 | projectDirPath = ""; 146 | projectRoot = ""; 147 | targets = ( 148 | 1AD37DC71475936F006E9D1B /* ICB_PrettyTableView */, 149 | ); 150 | }; 151 | /* End PBXProject section */ 152 | 153 | /* Begin PBXResourcesBuildPhase section */ 154 | 1AD37DC61475936F006E9D1B /* Resources */ = { 155 | isa = PBXResourcesBuildPhase; 156 | buildActionMask = 2147483647; 157 | files = ( 158 | 1AD37DD71475936F006E9D1B /* InfoPlist.strings in Resources */, 159 | ); 160 | runOnlyForDeploymentPostprocessing = 0; 161 | }; 162 | /* End PBXResourcesBuildPhase section */ 163 | 164 | /* Begin PBXSourcesBuildPhase section */ 165 | 1AD37DC41475936F006E9D1B /* Sources */ = { 166 | isa = PBXSourcesBuildPhase; 167 | buildActionMask = 2147483647; 168 | files = ( 169 | 1AD37DD91475936F006E9D1B /* main.m in Sources */, 170 | 1AD37DDD1475936F006E9D1B /* ICBAppDelegate.m in Sources */, 171 | 1AD37DE01475936F006E9D1B /* ICBTableViewController.m in Sources */, 172 | 1AD37DEE14759594006E9D1B /* ICBTableViewCell.m in Sources */, 173 | ); 174 | runOnlyForDeploymentPostprocessing = 0; 175 | }; 176 | /* End PBXSourcesBuildPhase section */ 177 | 178 | /* Begin PBXVariantGroup section */ 179 | 1AD37DD51475936F006E9D1B /* InfoPlist.strings */ = { 180 | isa = PBXVariantGroup; 181 | children = ( 182 | 1AD37DD61475936F006E9D1B /* en */, 183 | ); 184 | name = InfoPlist.strings; 185 | sourceTree = ""; 186 | }; 187 | /* End PBXVariantGroup section */ 188 | 189 | /* Begin XCBuildConfiguration section */ 190 | 1AD37DE41475936F006E9D1B /* Debug */ = { 191 | isa = XCBuildConfiguration; 192 | buildSettings = { 193 | ALWAYS_SEARCH_USER_PATHS = NO; 194 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 195 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 196 | COPY_PHASE_STRIP = NO; 197 | GCC_C_LANGUAGE_STANDARD = gnu99; 198 | GCC_DYNAMIC_NO_PIC = NO; 199 | GCC_OPTIMIZATION_LEVEL = 0; 200 | GCC_PREPROCESSOR_DEFINITIONS = ( 201 | "DEBUG=1", 202 | "$(inherited)", 203 | ); 204 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 205 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 206 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 207 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 208 | GCC_WARN_UNUSED_VARIABLE = YES; 209 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 210 | SDKROOT = iphoneos; 211 | }; 212 | name = Debug; 213 | }; 214 | 1AD37DE51475936F006E9D1B /* Release */ = { 215 | isa = XCBuildConfiguration; 216 | buildSettings = { 217 | ALWAYS_SEARCH_USER_PATHS = NO; 218 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 219 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 220 | COPY_PHASE_STRIP = YES; 221 | GCC_C_LANGUAGE_STANDARD = gnu99; 222 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 223 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 224 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 225 | GCC_WARN_UNUSED_VARIABLE = YES; 226 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 227 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 228 | SDKROOT = iphoneos; 229 | VALIDATE_PRODUCT = YES; 230 | }; 231 | name = Release; 232 | }; 233 | 1AD37DE71475936F006E9D1B /* Debug */ = { 234 | isa = XCBuildConfiguration; 235 | buildSettings = { 236 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 237 | GCC_PREFIX_HEADER = "ICBPrettyTableView/ICB_PrettyTableView-Prefix.pch"; 238 | INFOPLIST_FILE = "ICBPrettyTableView/ICB_PrettyTableView-Info.plist"; 239 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 240 | PRODUCT_NAME = "$(TARGET_NAME)"; 241 | WRAPPER_EXTENSION = app; 242 | }; 243 | name = Debug; 244 | }; 245 | 1AD37DE81475936F006E9D1B /* Release */ = { 246 | isa = XCBuildConfiguration; 247 | buildSettings = { 248 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 249 | GCC_PREFIX_HEADER = "ICBPrettyTableView/ICB_PrettyTableView-Prefix.pch"; 250 | INFOPLIST_FILE = "ICBPrettyTableView/ICB_PrettyTableView-Info.plist"; 251 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 252 | PRODUCT_NAME = "$(TARGET_NAME)"; 253 | WRAPPER_EXTENSION = app; 254 | }; 255 | name = Release; 256 | }; 257 | /* End XCBuildConfiguration section */ 258 | 259 | /* Begin XCConfigurationList section */ 260 | 1AD37DC21475936F006E9D1B /* Build configuration list for PBXProject "ICB_PrettyTableView" */ = { 261 | isa = XCConfigurationList; 262 | buildConfigurations = ( 263 | 1AD37DE41475936F006E9D1B /* Debug */, 264 | 1AD37DE51475936F006E9D1B /* Release */, 265 | ); 266 | defaultConfigurationIsVisible = 0; 267 | defaultConfigurationName = Release; 268 | }; 269 | 1AD37DE61475936F006E9D1B /* Build configuration list for PBXNativeTarget "ICB_PrettyTableView" */ = { 270 | isa = XCConfigurationList; 271 | buildConfigurations = ( 272 | 1AD37DE71475936F006E9D1B /* Debug */, 273 | 1AD37DE81475936F006E9D1B /* Release */, 274 | ); 275 | defaultConfigurationIsVisible = 0; 276 | defaultConfigurationName = Release; 277 | }; 278 | /* End XCConfigurationList section */ 279 | }; 280 | rootObject = 1AD37DBF1475936F006E9D1B /* Project object */; 281 | } 282 | -------------------------------------------------------------------------------- /ICB_PrettyTableView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | A small application that uses the contact's on an IOS device to build a simple table view controller, with customized cells. 2 | 3 | The MIT License 4 | 5 | Copyright (c) 2010 ELC Technologies 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | --------------------------------------------------------------------------------