mirror of
https://github.com/zhigang1992/FunctionalReactivePixels.git
synced 2026-04-29 04:24:55 +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];
|
[self.pageViewController setViewControllers:@[[self photoViewControllerForIndex:self.viewModel.initialPhotoIndex]] direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil];
|
||||||
|
|
||||||
// Configure self
|
// Configure self
|
||||||
self.title = [self.viewModel.initialPhotoModel photoName];
|
self.title = self.viewModel.initialPhotoName;
|
||||||
|
|
||||||
@weakify(self);
|
@weakify(self);
|
||||||
UIButton *infoButton = [UIButton buttonWithType:UIButtonTypeInfoDark];
|
UIButton *infoButton = [UIButton buttonWithType:UIButtonTypeInfoDark];
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
@property (nonatomic, readonly) NSInteger initialPhotoIndex;
|
@property (nonatomic, readonly) NSInteger initialPhotoIndex;
|
||||||
|
|
||||||
-(FRPPhotoModel *)initialPhotoModel;
|
@property (nonatomic, readonly) NSString *initialPhotoName;
|
||||||
-(FRPPhotoModel *)photoModelAtIndex:(NSInteger)index;
|
-(FRPPhotoModel *)photoModelAtIndex:(NSInteger)index;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -32,8 +32,8 @@
|
|||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
-(FRPPhotoModel *)initialPhotoModel {
|
-(NSString *)initialPhotoName {
|
||||||
return self.photoArray[self.initialPhotoIndex];
|
return [self.photoArray[self.initialPhotoIndex] photoName];
|
||||||
}
|
}
|
||||||
|
|
||||||
-(FRPPhotoModel *)photoModelAtIndex:(NSInteger)index {
|
-(FRPPhotoModel *)photoModelAtIndex:(NSInteger)index {
|
||||||
|
|||||||
Reference in New Issue
Block a user