From 658aa78a568d0c6437b01080960a23ce8423e585 Mon Sep 17 00:00:00 2001 From: Eric Slosser Date: Tue, 28 Apr 2020 11:28:45 -0400 Subject: [PATCH 1/7] allow delegate to return a nil for `interstitialViewAtIndex`. --- CHANGELOG.md | 6 ++ Example-Swift/ViewController.swift | 2 +- NYTPhotoViewer.podspec | 2 +- NYTPhotoViewer/NYTPhotosViewController.h | 2 +- NYTPhotoViewer/NYTPhotosViewController.m | 71 ++++++++---------------- README.md | 2 + 6 files changed, 33 insertions(+), 52 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3780cd20..56ef3dba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ Changes for users of the library currently on `develop`: +## [5.0.0](https://github.com/nytimes/NYTPhotoViewer/releases/tag/5.0.0) + +Changes for users of the library in 5.0.0: + +- Changed `NYTPhotosViewControllerDelegate` protocol so that `- photosViewController:interstitialViewAtIndex:` can return nil. If it does, that index is skipped and the following (or preceding) photo or interstitial view is displayed. + ## [4.0.1](https://github.com/nytimes/NYTPhotoViewer/releases/tag/4.0.1) Changes for users of the library in 4.0.1: diff --git a/Example-Swift/ViewController.swift b/Example-Swift/ViewController.swift index 816fea8f..4217c97e 100755 --- a/Example-Swift/ViewController.swift +++ b/Example-Swift/ViewController.swift @@ -69,7 +69,7 @@ extension ViewController: NYTPhotosViewControllerDelegate { photoViewerCoordinator = nil } - func photosViewController(_ photosViewController: NYTPhotosViewController, interstitialViewAt index: UInt) -> UIView { + func photosViewController(_ photosViewController: NYTPhotosViewController, interstitialViewAt index: UInt) -> UIView? { let redView = UIView(frame: CGRect(origin: .zero, size: CGSize(width: photosViewController.view.frame.width, height: 200))) redView.backgroundColor = .red redView.autoresizingMask = [.flexibleWidth] diff --git a/NYTPhotoViewer.podspec b/NYTPhotoViewer.podspec index 7c7334ba..809b07eb 100644 --- a/NYTPhotoViewer.podspec +++ b/NYTPhotoViewer.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "NYTPhotoViewer" - s.version = "4.0.1" + s.version = "5.0.0" s.description = <<-DESC NYTPhotoViewer is a slideshow and image viewer that includes double tap to zoom, captions, support for multiple images, interactive flick to dismiss, animated zooming presentation, and more. diff --git a/NYTPhotoViewer/NYTPhotosViewController.h b/NYTPhotoViewer/NYTPhotosViewController.h index 18dd30fd..6ca06a2a 100644 --- a/NYTPhotoViewer/NYTPhotosViewController.h +++ b/NYTPhotoViewer/NYTPhotosViewController.h @@ -317,7 +317,7 @@ extern NSString * const NYTPhotosViewControllerDidDismissNotification; * * @return A `UIView`. */ -- (UIView *)photosViewController:(NYTPhotosViewController *)photosViewController interstitialViewAtIndex:(NSUInteger)index; +- (UIView * _Nullable)photosViewController:(NYTPhotosViewController *)photosViewController interstitialViewAtIndex:(NSUInteger)index; @end diff --git a/NYTPhotoViewer/NYTPhotosViewController.m b/NYTPhotoViewer/NYTPhotosViewController.m index f3555dab..adf42f2b 100644 --- a/NYTPhotoViewer/NYTPhotosViewController.m +++ b/NYTPhotoViewer/NYTPhotosViewController.m @@ -579,63 +579,36 @@ - (NSInteger)totalItemCount { return self.dataSource.numberOfPhotos.integerValue + numberOfInterstitialViews; } -#pragma mark - NYTPhotoViewControllerDelegate +#pragma mark - UIPageViewControllerDelegate -- (void)photoViewController:(NYTPhotoViewController *)photoViewController didLongPressWithGestureRecognizer:(UILongPressGestureRecognizer *)longPressGestureRecognizer { - self.shouldHandleLongPress = NO; - - BOOL clientDidHandle = NO; - if ([self.delegate respondsToSelector:@selector(photosViewController:handleLongPressForPhoto:withGestureRecognizer:)]) { - clientDidHandle = [self.delegate photosViewController:self handleLongPressForPhoto:photoViewController.photo withGestureRecognizer:longPressGestureRecognizer]; - } - - self.shouldHandleLongPress = !clientDidHandle; - - if (self.shouldHandleLongPress) { - UIMenuController *menuController = [UIMenuController sharedMenuController]; - CGRect targetRect = CGRectZero; - targetRect.origin = [longPressGestureRecognizer locationInView:longPressGestureRecognizer.view]; - [menuController setTargetRect:targetRect inView:longPressGestureRecognizer.view]; - [menuController setMenuVisible:YES animated:YES]; - } -} +/// internal helper method for the following two delegate methods -#pragma mark - UIPageViewControllerDataSource +- (UIViewController *)nextViewControllerFromIndex:(NSInteger)startingIndex delta:(NSInteger)delta stopBeforeIndex:(NSInteger)stopBeforeIndex { + NSInteger itemIndex = startingIndex; + while (itemIndex + delta != stopBeforeIndex) { + itemIndex += delta; -- (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController { - NSUInteger itemIndex = viewController.photoViewItemIndex; - if (itemIndex == 0) { - return nil; + BOOL isPhotoAvailableAtIndex = true; + if ([self.dataSource respondsToSelector:@selector(isPhotoAtIndex:)]) { + isPhotoAvailableAtIndex = [self.dataSource isPhotoAtIndex:itemIndex]; + } + if (isPhotoAvailableAtIndex) { + return [self newPhotoViewControllerForPhoto:[self.dataSource photoAtIndex:itemIndex] atIndex:itemIndex]; + } + UIViewController *possibleVC = [self newViewControllerAtIndex:itemIndex]; + if (possibleVC != nil) { + return possibleVC; + } } + return nil; +} - NSUInteger beforeIndex = itemIndex - 1; - BOOL isPhotoAvailableAtIndex = true; - if ([self.dataSource respondsToSelector:@selector(isPhotoAtIndex:)]) { - isPhotoAvailableAtIndex = [self.dataSource isPhotoAtIndex:beforeIndex]; - } - if (isPhotoAvailableAtIndex) { - return [self newPhotoViewControllerForPhoto:[self.dataSource photoAtIndex:beforeIndex] atIndex:beforeIndex]; - } else { - return [self newViewControllerAtIndex:beforeIndex]; - } +- (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController { + return [self nextViewControllerFromIndex:viewController.photoViewItemIndex delta: -1 stopBeforeIndex: -1]; } - (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController { - NSUInteger itemIndex = viewController.photoViewItemIndex; - NSUInteger afterIndex = itemIndex + 1; - if (afterIndex >= [self totalItemCount]) { - return nil; - } - - BOOL isPhotoAvailableAtIndex = true; - if ([self.dataSource respondsToSelector:@selector(isPhotoAtIndex:)]) { - isPhotoAvailableAtIndex = [self.dataSource isPhotoAtIndex:afterIndex]; - } - if (isPhotoAvailableAtIndex) { - return [self newPhotoViewControllerForPhoto:[self.dataSource photoAtIndex:afterIndex] atIndex:afterIndex]; - } else { - return [self newViewControllerAtIndex:afterIndex]; - } + return [self nextViewControllerFromIndex:viewController.photoViewItemIndex delta: 1 stopBeforeIndex: self.totalItemCount]; } #pragma mark - UIPageViewControllerDelegate diff --git a/README.md b/README.md index 06966967..9129555c 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,8 @@ The Example project uses [Carthage](https://github.com/Carthage/Carthage) to int Then, in your checkout of the `NYTPhotoViewer` repo, run `carthage checkout --use-submodules`. +Then run `scripts/bootstrap`. + ## Installation ### Carthage From 1c6fe9f00ad8558c0c22faea2136eec591fb5933 Mon Sep 17 00:00:00 2001 From: Eric Slosser Date: Tue, 28 Apr 2020 14:20:40 -0400 Subject: [PATCH 2/7] change _Nullable to nullable --- NYTPhotoViewer/NYTPhotosViewController.h | 12 ++++++------ NYTPhotoViewer/NYTPhotosViewController.m | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/NYTPhotoViewer/NYTPhotosViewController.h b/NYTPhotoViewer/NYTPhotosViewController.h index 6ca06a2a..11cbca67 100644 --- a/NYTPhotoViewer/NYTPhotosViewController.h +++ b/NYTPhotoViewer/NYTPhotosViewController.h @@ -222,7 +222,7 @@ extern NSString * const NYTPhotosViewControllerDidDismissNotification; * * @return A view to display as the caption for the photo. Return `nil` to show a default view generated from the caption properties on the photo object. */ -- (UIView * _Nullable)photosViewController:(NYTPhotosViewController *)photosViewController captionViewForPhoto:(id )photo; +- (nullable UIView *)photosViewController:(NYTPhotosViewController *)photosViewController captionViewForPhoto:(id )photo; /** * Returns whether the caption view should respect the safe area. @@ -248,7 +248,7 @@ extern NSString * const NYTPhotosViewControllerDidDismissNotification; * * @return The text to display as the navigation-item title for the given photo. Return `nil` to show a default title like "1 of 4" indicating progress in a slideshow, or an empty string to hide this text entirely. */ -- (NSString * _Nullable)photosViewController:(NYTPhotosViewController *)photosViewController titleForPhoto:(id )photo atIndex:(NSInteger)photoIndex totalPhotoCount:(nullable NSNumber *)totalPhotoCount; +- (nullable NSString *)photosViewController:(NYTPhotosViewController *)photosViewController titleForPhoto:(id )photo atIndex:(NSInteger)photoIndex totalPhotoCount:(nullable NSNumber *)totalPhotoCount; /** * Returns a view to display while a photo is loading. Can be any `UIView` object, but is expected to respond to `sizeToFit` appropriately. This view will be sized and centered in the blank area, and hidden when the photo image or its placeholder is loaded. @@ -258,7 +258,7 @@ extern NSString * const NYTPhotosViewControllerDidDismissNotification; * * @return A view to display while the photo is loading. Return `nil` to show a default white `UIActivityIndicatorView`. */ -- (UIView * _Nullable)photosViewController:(NYTPhotosViewController *)photosViewController loadingViewForPhoto:(id )photo; +- (nullable UIView *)photosViewController:(NYTPhotosViewController *)photosViewController loadingViewForPhoto:(id )photo; /** * Returns the view from which to animate for a given object conforming to the `NYTPhoto` protocol. @@ -268,7 +268,7 @@ extern NSString * const NYTPhotosViewControllerDidDismissNotification; * * @return The view to animate out of or into for the given photo. */ -- (UIView * _Nullable)photosViewController:(NYTPhotosViewController *)photosViewController referenceViewForPhoto:(id )photo; +- (nullable UIView *)photosViewController:(NYTPhotosViewController *)photosViewController referenceViewForPhoto:(id )photo; /** * Returns the maximum zoom scale for a given object conforming to the `NYTPhoto` protocol. @@ -307,7 +307,7 @@ extern NSString * const NYTPhotosViewControllerDidDismissNotification; * @param photosViewController The `NYTPhotosViewController` instance that sent the delegate message. * @param activityType The activity type that was successfully shared. */ -- (void)photosViewController:(NYTPhotosViewController *)photosViewController actionCompletedWithActivityType:(NSString * _Nullable)activityType; +- (void)photosViewController:(NYTPhotosViewController *)photosViewController actionCompletedWithActivityType:(nullable NSString *)activityType; /** * called when an `NYTInterstitialViewController` is created but before it is displayed. Returns the view to display as an interstitial view. @@ -317,7 +317,7 @@ extern NSString * const NYTPhotosViewControllerDidDismissNotification; * * @return A `UIView`. */ -- (UIView * _Nullable)photosViewController:(NYTPhotosViewController *)photosViewController interstitialViewAtIndex:(NSUInteger)index; +- (nullable UIView *)photosViewController:(NYTPhotosViewController *)photosViewController interstitialViewAtIndex:(NSUInteger)index; @end diff --git a/NYTPhotoViewer/NYTPhotosViewController.m b/NYTPhotoViewer/NYTPhotosViewController.m index adf42f2b..419f53e1 100644 --- a/NYTPhotoViewer/NYTPhotosViewController.m +++ b/NYTPhotoViewer/NYTPhotosViewController.m @@ -174,7 +174,7 @@ - (instancetype)initWithDataSource:(id )dataSource ini return [self initWithDataSource:dataSource initialPhoto:initialPhoto delegate:delegate]; } -- (instancetype)initWithDataSource:(id )dataSource initialPhoto:(id _Nullable)initialPhoto delegate:(nullable id )delegate { +- (instancetype)initWithDataSource:(id )dataSource initialPhoto:(nullable id )initialPhoto delegate:(nullable id )delegate { self = [super initWithNibName:nil bundle:nil]; if (self) { @@ -184,7 +184,7 @@ - (instancetype)initWithDataSource:(id )dataSource ini return self; } -- (void)commonInitWithDataSource:(id )dataSource initialPhoto:(id _Nullable)initialPhoto delegate:(nullable id )delegate { +- (void)commonInitWithDataSource:(id )dataSource initialPhoto:(nullable id )initialPhoto delegate:(nullable id )delegate { _dataSource = dataSource; _delegate = delegate; _initialPhoto = initialPhoto; From 52b08073fe7ab5e574abe5bf4c27cf795626c47a Mon Sep 17 00:00:00 2001 From: Eric Slosser Date: Tue, 28 Apr 2020 14:21:59 -0400 Subject: [PATCH 3/7] tell folks to use the bootstrap script, otherwise examples don't build. --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 9129555c..5408c52e 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,7 @@ NYTPhotosViewController *photosViewController = [[NYTPhotosViewController alloc] The Example project uses [Carthage](https://github.com/Carthage/Carthage) to integrate its dependencies. If you don’t have Carthage installed, you can install it via [Homebrew](http://brew.sh) with `brew install carthage`. -Then, in your checkout of the `NYTPhotoViewer` repo, run `carthage checkout --use-submodules`. - -Then run `scripts/bootstrap`. +Then, in your local workspace of the `NYTPhotoViewer` repo, run `./scripts/bootstrap`. ## Installation From 6d182e9a6586497c3e1c2555522b7258d320edf6 Mon Sep 17 00:00:00 2001 From: Eric Slosser Date: Tue, 28 Apr 2020 14:25:16 -0400 Subject: [PATCH 4/7] remove unrecognized parameter `--use-submodules` --- scripts/lint | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lint b/scripts/lint index 5dbfa902..c1bcd1ce 100755 --- a/scripts/lint +++ b/scripts/lint @@ -7,6 +7,6 @@ if ! command -v carthage > /dev/null; then fi -carthage build --platform iOS --no-use-binaries --use-submodules --no-skip-current +carthage build --platform iOS --no-use-binaries --no-skip-current pod lib lint From 21e49c2cb7e36146d9389c4acca42a106e9c52ed Mon Sep 17 00:00:00 2001 From: Eric Slosser Date: Tue, 28 Apr 2020 14:35:01 -0400 Subject: [PATCH 5/7] standardize on ObjC style of 'no space after colon'. --- Example-Swift/AppDelegate.swift | 2 +- Example-Swift/PhotoBox.swift | 4 ++-- Example-Swift/ViewController.swift | 4 ++-- Example/NYTViewController.m | 8 ++++---- NYTPhotoViewer/NYTPhotosViewController.m | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Example-Swift/AppDelegate.swift b/Example-Swift/AppDelegate.swift index 8736b564..d9e0a220 100755 --- a/Example-Swift/AppDelegate.swift +++ b/Example-Swift/AppDelegate.swift @@ -13,7 +13,7 @@ final class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - internal func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + internal func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey:Any]?) -> Bool { return true } } diff --git a/Example-Swift/PhotoBox.swift b/Example-Swift/PhotoBox.swift index 3523e78f..ff427274 100644 --- a/Example-Swift/PhotoBox.swift +++ b/Example-Swift/PhotoBox.swift @@ -35,13 +35,13 @@ final class NYTPhotoBox: NSObject, NYTPhoto { var attributedCaptionTitle: NSAttributedString? var attributedCaptionSummary: NSAttributedString? { - let attributes = [NSAttributedString.Key.foregroundColor: UIColor.white, + let attributes = [NSAttributedString.Key.foregroundColor:UIColor.white, NSAttributedString.Key.font: UIFont.preferredFont(forTextStyle: .body)] return NSAttributedString(string: value.summary, attributes: attributes) } var attributedCaptionCredit: NSAttributedString? { - let attributes = [NSAttributedString.Key.foregroundColor: UIColor.gray, + let attributes = [NSAttributedString.Key.foregroundColor:UIColor.gray, NSAttributedString.Key.font: UIFont.preferredFont(forTextStyle: .footnote)] return NSAttributedString(string: value.credit, attributes: attributes) } diff --git a/Example-Swift/ViewController.swift b/Example-Swift/ViewController.swift index 4217c97e..efc20750 100755 --- a/Example-Swift/ViewController.swift +++ b/Example-Swift/ViewController.swift @@ -46,8 +46,8 @@ extension ViewController: NYTPhotosViewControllerDelegate { return false } - let shareActivityViewController = UIActivityViewController(activityItems: [photoImage], applicationActivities: nil) - shareActivityViewController.completionWithItemsHandler = {(activityType: UIActivity.ActivityType?, completed: Bool, items: [Any]?, error: Error?) in + let shareActivityViewController = UIActivityViewController(activityItems: [photoImage], applicationActivities:nil) + shareActivityViewController.completionWithItemsHandler = {(activityType:UIActivity.ActivityType?, completed:Bool, items:[Any]?, error:Error?) in if completed { photosViewController.delegate?.photosViewController!(photosViewController, actionCompletedWithActivityType: activityType?.rawValue) } diff --git a/Example/NYTViewController.m b/Example/NYTViewController.m index 6a504027..8f7ba720 100644 --- a/Example/NYTViewController.m +++ b/Example/NYTViewController.m @@ -55,7 +55,7 @@ - (void)updateImagesOnPhotosViewController:(NYTPhotosViewController *)photosView for (NYTExamplePhoto *photo in dataSource.photos) { if (!photo.image && !photo.imageData) { photo.image = [UIImage imageNamed:@"NYTimesBuilding"]; - photo.attributedCaptionSummary = [[NSAttributedString alloc] initWithString:@"Photo which previously had a loading spinner (to see the spinner, reopen the photo viewer and scroll to this photo)" attributes:@{NSForegroundColorAttributeName: [UIColor whiteColor], NSFontAttributeName: [UIFont preferredFontForTextStyle:UIFontTextStyleBody]}]; + photo.attributedCaptionSummary = [[NSAttributedString alloc] initWithString:@"Photo which previously had a loading spinner (to see the spinner, reopen the photo viewer and scroll to this photo)" attributes:@{NSForegroundColorAttributeName:[UIColor whiteColor], NSFontAttributeName:[UIFont preferredFontForTextStyle:UIFontTextStyleBody]}]; [photosViewController updatePhoto:photo]; } } @@ -228,15 +228,15 @@ + (NYTPhotoViewerArrayDataSource *)newVariedDataSourceIncludingPhoto:(NYTExample } + (NSAttributedString *)attributedTitleFromString:(NSString *)caption { - return [[NSAttributedString alloc] initWithString:caption attributes:@{NSForegroundColorAttributeName: [UIColor whiteColor], NSFontAttributeName: [UIFont preferredFontForTextStyle:UIFontTextStyleBody]}]; + return [[NSAttributedString alloc] initWithString:caption attributes:@{NSForegroundColorAttributeName:[UIColor whiteColor], NSFontAttributeName:[UIFont preferredFontForTextStyle:UIFontTextStyleBody]}]; } + (NSAttributedString *)attributedSummaryFromString:(NSString *)summary { - return [[NSAttributedString alloc] initWithString:summary attributes:@{NSForegroundColorAttributeName: [UIColor lightGrayColor], NSFontAttributeName: [UIFont preferredFontForTextStyle:UIFontTextStyleBody]}]; + return [[NSAttributedString alloc] initWithString:summary attributes:@{NSForegroundColorAttributeName:[UIColor lightGrayColor], NSFontAttributeName:[UIFont preferredFontForTextStyle:UIFontTextStyleBody]}]; } + (NSAttributedString *)attributedCreditFromString:(NSString *)credit { - return [[NSAttributedString alloc] initWithString:credit attributes:@{NSForegroundColorAttributeName: [UIColor grayColor], NSFontAttributeName: [UIFont preferredFontForTextStyle:UIFontTextStyleCaption1]}]; + return [[NSAttributedString alloc] initWithString:credit attributes:@{NSForegroundColorAttributeName:[UIColor grayColor], NSFontAttributeName:[UIFont preferredFontForTextStyle:UIFontTextStyleCaption1]}]; } @end diff --git a/NYTPhotoViewer/NYTPhotosViewController.m b/NYTPhotoViewer/NYTPhotosViewController.m index 419f53e1..e9877b7c 100644 --- a/NYTPhotoViewer/NYTPhotosViewController.m +++ b/NYTPhotoViewer/NYTPhotosViewController.m @@ -207,7 +207,7 @@ - (void)commonInitWithDataSource:(id )dataSource initi _notificationCenter = [NSNotificationCenter new]; - self.pageViewController = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStyleScroll navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal options:@{UIPageViewControllerOptionInterPageSpacingKey: @(NYTPhotosViewControllerInterPhotoSpacing)}]; + self.pageViewController = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStyleScroll navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal options:@{UIPageViewControllerOptionInterPageSpacingKey:@(NYTPhotosViewControllerInterPhotoSpacing)}]; self.pageViewController.delegate = self; self.pageViewController.dataSource = self; @@ -604,11 +604,11 @@ - (UIViewController *)nextViewControllerFromIndex:(NSInteger)startingIndex delta } - (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController { - return [self nextViewControllerFromIndex:viewController.photoViewItemIndex delta: -1 stopBeforeIndex: -1]; + return [self nextViewControllerFromIndex:viewController.photoViewItemIndex delta:-1 stopBeforeIndex:-1]; } - (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController { - return [self nextViewControllerFromIndex:viewController.photoViewItemIndex delta: 1 stopBeforeIndex: self.totalItemCount]; + return [self nextViewControllerFromIndex:viewController.photoViewItemIndex delta:1 stopBeforeIndex:self.totalItemCount]; } #pragma mark - UIPageViewControllerDelegate From 017961d7812b781704238da1c16ac05d8a2f2ca0 Mon Sep 17 00:00:00 2001 From: Eric Slosser Date: Tue, 28 Apr 2020 14:44:49 -0400 Subject: [PATCH 6/7] bump version to 5.0.0 --- NYTPhotoViewer/Info.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NYTPhotoViewer/Info.plist b/NYTPhotoViewer/Info.plist index 331a2dac..e6771905 100644 --- a/NYTPhotoViewer/Info.plist +++ b/NYTPhotoViewer/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.2.0 + 5.0.0 CFBundleSignature ???? CFBundleVersion From df366e5142ed7d7b5701091a5f3016745ca57409 Mon Sep 17 00:00:00 2001 From: Eric Slosser Date: Tue, 28 Apr 2020 15:04:00 -0400 Subject: [PATCH 7/7] style: use the right protocol name in the comment --- NYTPhotoViewer/NYTPhotosViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NYTPhotoViewer/NYTPhotosViewController.m b/NYTPhotoViewer/NYTPhotosViewController.m index e9877b7c..e0dabdd1 100644 --- a/NYTPhotoViewer/NYTPhotosViewController.m +++ b/NYTPhotoViewer/NYTPhotosViewController.m @@ -579,7 +579,7 @@ - (NSInteger)totalItemCount { return self.dataSource.numberOfPhotos.integerValue + numberOfInterstitialViews; } -#pragma mark - UIPageViewControllerDelegate +#pragma mark - UIPageViewControllerDataSource /// internal helper method for the following two delegate methods