Start New Discussion Reply to this Discussion Incomplete Implementation
I have been trying to follow along with the tutorial on Apple's developer website: https://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/SecondiOSAppTutorial/Introduction/Introduction.html but cannot figure out why my project will not run. I have one warning: Incomplete implementation in the BirdSightingDataController.m file:
#import "BirdSightingDataController.h"
#import "BirdSighting.h"
@interface BirdSightingDataController ()
- (void)initializeDefaultDataList;
@end
@implementation BirdSightingDataController
@synthesize masterBirdSightingList = _masterBirdSightingList;
- (void) initializeDefaultDataList
{
NSMutableArray *sightingList = [[NSMutableArray alloc] init];
self.masterBirdSightingList = sightingList;
[self addBirdSightingWithName:@"Pigeon" location:@"Everywhere"];
}
- (void)setMasterBirdSightingList:(NSMutableArray *)newList
{
if (_masterBirdSightingList != newList)
{
_masterBirdSightingList = [newList mutableCopy];
}
}
- (id)init
{
if (self = [super init])
{
[self initializeDefaultDataList];
}
return self;
}
- (NSUInteger)countOfList
{
return [self.masterBirdSightingList count];
}
- (BirdSighting *)objectAtIndex:(NSUInteger)theIndex
{
return [self.masterBirdSightingList objectAtIndex:theIndex];
}
- (void)addBirdSightingWithName:(NSString *)inputBirdName location:(NSString *)inputLocation
{
BirdSighting *sighting;
NSDate *today = [NSDate date];
sighting = [[BirdSighting alloc] initWithName:inputBirdName location:inputLocation
date:today];
[self.masterBirdSightingList addObject:sighting];
}
@end
Dane2259
Newbie Poster
22 posts since Feb 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
For some reason it doesn't like the private method initalizeDefaultDataList (on line 33) that was declared in the interface above the implementation declaration.
Dane2259
Newbie Poster
22 posts since Feb 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
© 2013 DaniWeb® LLC
Page rendered in 0.5213 seconds
using 2.65MB