#import "physicianModel.h"
@implementation physicianModel
@synthesize physician;
@synthesize physicianImages;
- (id) init {
self = [super init];
NSMutableArray *tmpPhysicians = [[NSArray alloc] initWithObjects:
@"Name1",
@"Name2",
@"Name3",
nil];
self.physician = tmpPhysicians;
[tmpPhysicians release];
NSMutableArray *tmpImages = [[NSArray alloc] initWithObjects:
@"name1.png", @"name2.png", @"name3.png", nil];
self.physicianImages = tmpImages;
[tmpImages release];
return self;
}
- (int)getNumberOfPhysicians {
return [physician count];
}
- (NSString *)getPhysicianTitleAtIndex:(int)index {
return [physician objectAtIndex:index];
}
- (UIImage *)getPhysicianImageAtIndex:(int)index {
UIImage *physicianImage = [UIImage imageNamed:[physicianImages objectAtIndex:index]];
return physicianImage;
}
- (void) dealloc {
[physician release];
[physicianImages release];
[super dealloc];
}
@end