View Single Post
terrychu01

 
Member Since: Mar 09, 2012
Posts: 3
terrychu01 is on a distinguished road

terrychu01 is offline
Hi I just started xcoding 2 weeks time ago and recently I had try to write a simple app which to sorting the entire Address Book database from iPhone.

I facing a little problem where Xcode show as i colour in silver - method in protocol not implement.

that is no error is this problem i just couldn't found where is my error. hope any expert can assist me.


#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}

- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientationUIIn terfaceOrientation)interfaceOrientation
{
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}

- (IBAction)adbookid)sender
{
ABAddressBookRef addressBook = ABAddressBookCreate();
CFArrayRef people = ABAddressBookCopyArrayOfAllPeople(addressBook);
CFMutableArrayRef peopleMutable = CFArrayCreateMutableCopy(kCFAllocatorDefault, CFArrayGetCount(people), people);

CFArraySortValues(peopleMutable,
CFRangeMake(0, CFArrayGetCount(peopleMutable)),
(CFComparatorFunction)ABPersonComparePeopleByName,
(void*)ABPersonGetSortOrdering());

CFRelease(addressBook);
CFRelease(people);
CFRelease(peopleMutable);


}
@end
QUOTE Thanks