Skip to content
Browse files

iOS6 Update

1. Change UI
2. Add to image for retina 4inch (iOS6 update)
3. Change screenshot
  • Loading branch information...
1 parent 5451359 commit 936a8da1fd06b6203a5e5eeedfca2755e79a9ee0 @qnibus committed Sep 19, 2012
View
BIN .DS_Store
Binary file not shown.
View
BIN Default-568h@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN Screenshot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
6 TKContactPicker.xcodeproj/project.pbxproj
@@ -8,6 +8,7 @@
/* Begin PBXBuildFile section */
7453F2C115F439670096ADE6 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 7453F2C015F439670096ADE6 /* README.md */; };
+ 746A85331608E3300048C9F7 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 746A85321608E3300048C9F7 /* Default-568h@2x.png */; };
74E2F36415F04E4800D21D1A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 74E2F36315F04E4800D21D1A /* UIKit.framework */; };
74E2F36615F04E4800D21D1A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 74E2F36515F04E4800D21D1A /* Foundation.framework */; };
74E2F36815F04E4800D21D1A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 74E2F36715F04E4800D21D1A /* CoreGraphics.framework */; };
@@ -33,6 +34,7 @@
/* Begin PBXFileReference section */
7453F2C015F439670096ADE6 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = "<group>"; };
+ 746A85321608E3300048C9F7 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "../Default-568h@2x.png"; sourceTree = "<group>"; };
74E2F35F15F04E4800D21D1A /* TKContactPicker.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TKContactPicker.app; sourceTree = BUILT_PRODUCTS_DIR; };
74E2F36315F04E4800D21D1A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
74E2F36515F04E4800D21D1A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
@@ -131,9 +133,10 @@
74E2F36A15F04E4800D21D1A /* Supporting Files */ = {
isa = PBXGroup;
children = (
- 74E2F36B15F04E4800D21D1A /* TKContactPicker-Info.plist */,
+ 746A85321608E3300048C9F7 /* Default-568h@2x.png */,
74E2F36C15F04E4800D21D1A /* InfoPlist.strings */,
74E2F36F15F04E4800D21D1A /* main.m */,
+ 74E2F36B15F04E4800D21D1A /* TKContactPicker-Info.plist */,
74E2F37115F04E4800D21D1A /* TKContactPicker-Prefix.pch */,
);
name = "Supporting Files";
@@ -260,6 +263,7 @@
74E2F48D15F099FE00D21D1A /* blank.png in Resources */,
74E2F48E15F099FE00D21D1A /* blank@2x.png in Resources */,
7453F2C115F439670096ADE6 /* README.md in Resources */,
+ 746A85331608E3300048C9F7 /* Default-568h@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
55 TKContactPicker/Controllers/TKContactsMultiPickerController.m
@@ -12,7 +12,7 @@
@interface TKContactsMultiPickerController(PrivateMethod)
-- (IBAction)saveAction:(id)sender;
+- (IBAction)doneAction:(id)sender;
- (IBAction)dismissAction:(id)sender;
@end
@@ -45,10 +45,8 @@ - (void)viewDidLoad
{
[super viewDidLoad];
- [self.navigationItem setTitle:@"Contacts"];
- [self.navigationItem setLeftBarButtonItem:[[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(dismissAction:)] autorelease]];
- [self.navigationItem setRightBarButtonItem:[[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:@selector(saveAction:)] autorelease]];
- [self.navigationItem.rightBarButtonItem setEnabled:NO];
+ [self.navigationItem setTitle:NSLocalizedString(@"Contacts", nil)];
+ [self.navigationItem setRightBarButtonItem:[[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(dismissAction:)] autorelease]];
if (self.savedSearchTerm)
{
@@ -77,25 +75,25 @@ - (void)viewDidLoad
CFStringRef abFullName = ABRecordCopyCompositeName(person);
/*
- Save thumbnail image - performance decreasing
- UIImage *personImage = nil;
- if (person != nil && ABPersonHasImageData(person)) {
- if ( &ABPersonCopyImageDataWithFormat != nil ) {
- // iOS >= 4.1
- CFDataRef contactThumbnailData = ABPersonCopyImageDataWithFormat(person, kABPersonImageFormatThumbnail);
- personImage = [[UIImage imageWithData:(NSData*)contactThumbnailData] thumbnailImage:CGSizeMake(44, 44)];
- CFRelease(contactThumbnailData);
- CFDataRef contactImageData = ABPersonCopyImageDataWithFormat(person, kABPersonImageFormatOriginalSize);
- CFRelease(contactImageData);
-
- } else {
- // iOS < 4.1
- CFDataRef contactImageData = ABPersonCopyImageData(person);
- personImage = [[UIImage imageWithData:(NSData*)contactImageData] thumbnailImage:CGSizeMake(44, 44)];
- CFRelease(contactImageData);
- }
- }
- [addressBook setThumbnail:personImage];
+ Save thumbnail image - performance decreasing
+ UIImage *personImage = nil;
+ if (person != nil && ABPersonHasImageData(person)) {
+ if ( &ABPersonCopyImageDataWithFormat != nil ) {
+ // iOS >= 4.1
+ CFDataRef contactThumbnailData = ABPersonCopyImageDataWithFormat(person, kABPersonImageFormatThumbnail);
+ personImage = [[UIImage imageWithData:(NSData*)contactThumbnailData] thumbnailImage:CGSizeMake(44, 44)];
+ CFRelease(contactThumbnailData);
+ CFDataRef contactImageData = ABPersonCopyImageDataWithFormat(person, kABPersonImageFormatOriginalSize);
+ CFRelease(contactImageData);
+
+ } else {
+ // iOS < 4.1
+ CFDataRef contactImageData = ABPersonCopyImageData(person);
+ personImage = [[UIImage imageWithData:(NSData*)contactImageData] thumbnailImage:CGSizeMake(44, 44)];
+ CFRelease(contactImageData);
+ }
+ }
+ [addressBook setThumbnail:personImage];
*/
NSString *nameString = (NSString *)abName;
@@ -295,8 +293,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
[self tableView:self.tableView accessoryButtonTappedForRowWithIndexPath:indexPath];
[self.tableView deselectRowAtIndexPath:indexPath animated:YES];
}
-
- [self.navigationItem.rightBarButtonItem setEnabled:(_selectedCount > 0)];
}
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
@@ -314,7 +310,10 @@ - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexP
// Enabled rightButtonItem
if (checked) _selectedCount++;
else _selectedCount--;
- [self.navigationItem.rightBarButtonItem setEnabled:(_selectedCount > 0 ? YES : NO)];
+ if (_selectedCount > 0)
+ [self.navigationItem setRightBarButtonItem:[[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(doneAction:)] autorelease]];
+ else
+ [self.navigationItem setRightBarButtonItem:[[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(dismissAction:)] autorelease]];
UITableViewCell *cell =[self.tableView cellForRowAtIndexPath:indexPath];
UIButton *button = (UIButton *)cell.accessoryView;
@@ -342,7 +341,7 @@ - (void)checkButtonTapped:(id)sender event:(id)event
#pragma mark -
#pragma mark Save action
-- (IBAction)saveAction:(id)sender
+- (IBAction)doneAction:(id)sender
{
NSMutableArray *objects = [NSMutableArray new];
for (NSArray *section in _listContent) {
View
3 TKContactPicker/MainViewController.m
@@ -93,7 +93,10 @@ - (void)contactsMultiPickerController:(TKContactsMultiPickerController*)picker d
[nameButton setFrame:nameButtonRect];
[nameButton setAlpha:0.0f];
+ [nameButton.titleLabel setFont:[UIFont systemFontOfSize:11]];
+ [nameButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[nameButton setTitle:ab.name forState:UIControlStateNormal];
+ [nameButton setTitleEdgeInsets:UIEdgeInsetsMake(45, 0, 0, 0)];
[self.scrollView addSubview:nameButton];
[UIView animateWithDuration:0.2 animations:^{
View
4,422 TKContactPicker/Xibs/MainViewController.xib
17 additions, 4,405 deletions not shown because the diff is too large. Please use a local Git client to view these changes.

0 comments on commit 936a8da

Please sign in to comment.
Something went wrong with that request. Please try again.