Further abstracted initial photo model.

This commit is contained in:
Ash Furrow
2013-10-22 20:31:57 -04:00
parent f184e9fa34
commit c5c5d20193
3 changed files with 4 additions and 4 deletions

View File

@@ -48,7 +48,7 @@
[self.pageViewController setViewControllers:@[[self photoViewControllerForIndex:self.viewModel.initialPhotoIndex]] direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil];
// Configure self
self.title = [self.viewModel.initialPhotoModel photoName];
self.title = self.viewModel.initialPhotoName;
@weakify(self);
UIButton *infoButton = [UIButton buttonWithType:UIButtonTypeInfoDark];

View File

@@ -16,7 +16,7 @@
@property (nonatomic, readonly) NSInteger initialPhotoIndex;
-(FRPPhotoModel *)initialPhotoModel;
@property (nonatomic, readonly) NSString *initialPhotoName;
-(FRPPhotoModel *)photoModelAtIndex:(NSInteger)index;
@end

View File

@@ -32,8 +32,8 @@
return self;
}
-(FRPPhotoModel *)initialPhotoModel {
return self.photoArray[self.initialPhotoIndex];
-(NSString *)initialPhotoName {
return [self.photoArray[self.initialPhotoIndex] photoName];
}
-(FRPPhotoModel *)photoModelAtIndex:(NSInteger)index {