mirror of
https://github.com/zhigang1992/FunctionalReactivePixels.git
synced 2026-01-12 22:47:31 +08:00
Further abstracted initial photo model.
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
@property (nonatomic, readonly) NSInteger initialPhotoIndex;
|
||||
|
||||
-(FRPPhotoModel *)initialPhotoModel;
|
||||
@property (nonatomic, readonly) NSString *initialPhotoName;
|
||||
-(FRPPhotoModel *)photoModelAtIndex:(NSInteger)index;
|
||||
|
||||
@end
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user