From b918b3be3d034add1e0838832a5ef7c2470b3c2b Mon Sep 17 00:00:00 2001 From: Ludovico Rossi Date: Fri, 8 Jan 2016 16:44:03 +0100 Subject: [PATCH 01/26] Fix orientation issue with reference view of type UIImageView The issue occurred during in and out animations when the reference view is a UIImageView containing a UIImage with meaningful orientation informations (e.g. taken directly with the device in portrait orientation). --- Pod/Classes/ios/NYTPhotoTransitionAnimator.m | 35 ++++++++++++-------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/Pod/Classes/ios/NYTPhotoTransitionAnimator.m b/Pod/Classes/ios/NYTPhotoTransitionAnimator.m index 048513d1..97354eb2 100644 --- a/Pod/Classes/ios/NYTPhotoTransitionAnimator.m +++ b/Pod/Classes/ios/NYTPhotoTransitionAnimator.m @@ -227,19 +227,28 @@ + (UIView *)newAnimationViewFromView:(UIView *)view { UIView *animationView; - if (view.layer.contents) { - animationView = [[UIView alloc] initWithFrame:view.frame]; - animationView.layer.contents = view.layer.contents; - animationView.layer.bounds = view.layer.bounds; - animationView.layer.cornerRadius = view.layer.cornerRadius; - animationView.layer.masksToBounds = view.layer.masksToBounds; - animationView.contentMode = view.contentMode; - animationView.transform = view.transform; - } - else { - animationView = [view snapshotViewAfterScreenUpdates:YES]; - } - + if (view.layer.contents) { + if ([view isKindOfClass:[UIImageView class]]) { + // The case of UIImageView is handled separately since the mere layer's contents (i.e. CGImage in this case) doesn't + // seem to contain proper informations about the image orientation for portrait images taken directly on the device. + animationView = [(UIImageView *)[[view class] alloc] initWithImage:((UIImageView *)view).image]; + animationView.bounds = view.bounds; + } + else { + animationView = [[UIView alloc] initWithFrame:view.frame]; + animationView.layer.contents = view.layer.contents; + animationView.layer.bounds = view.layer.bounds; + } + + animationView.layer.cornerRadius = view.layer.cornerRadius; + animationView.layer.masksToBounds = view.layer.masksToBounds; + animationView.contentMode = view.contentMode; + animationView.transform = view.transform; + } + else { + animationView = [view snapshotViewAfterScreenUpdates:YES]; + } + return animationView; } From 31f88942535c0213b4a14b8935c279d2c520dffe Mon Sep 17 00:00:00 2001 From: Danny Zlobinsky Date: Thu, 14 Jan 2016 09:03:12 -0500 Subject: [PATCH 02/26] Removed redundant swift tests --- Example/NYTPhotoViewer-SwiftTests/Info.plist | 24 -- .../NYTPhotoCaptionViewTests.swift | 27 --- .../NYTPhotoTransitionAnimatorTests.swift | 16 -- .../NYTPhotoViewControllerTests.swift | 63 ----- .../NYTPhotosDataSourceTests.swift | 34 --- .../NYTPhotosOverlayViewTests.swift | 46 ---- .../NYTPhotosViewControllerTests.swift | 170 ------------- .../NYTScalingImageViewTests.swift | 39 --- .../NYTPhotoViewer.xcodeproj/project.pbxproj | 225 ------------------ 9 files changed, 644 deletions(-) delete mode 100644 Example/NYTPhotoViewer-SwiftTests/Info.plist delete mode 100644 Example/NYTPhotoViewer-SwiftTests/NYTPhotoCaptionViewTests.swift delete mode 100644 Example/NYTPhotoViewer-SwiftTests/NYTPhotoTransitionAnimatorTests.swift delete mode 100644 Example/NYTPhotoViewer-SwiftTests/NYTPhotoViewControllerTests.swift delete mode 100644 Example/NYTPhotoViewer-SwiftTests/NYTPhotosDataSourceTests.swift delete mode 100644 Example/NYTPhotoViewer-SwiftTests/NYTPhotosOverlayViewTests.swift delete mode 100644 Example/NYTPhotoViewer-SwiftTests/NYTPhotosViewControllerTests.swift delete mode 100644 Example/NYTPhotoViewer-SwiftTests/NYTScalingImageViewTests.swift diff --git a/Example/NYTPhotoViewer-SwiftTests/Info.plist b/Example/NYTPhotoViewer-SwiftTests/Info.plist deleted file mode 100644 index ba72822e..00000000 --- a/Example/NYTPhotoViewer-SwiftTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/Example/NYTPhotoViewer-SwiftTests/NYTPhotoCaptionViewTests.swift b/Example/NYTPhotoViewer-SwiftTests/NYTPhotoCaptionViewTests.swift deleted file mode 100644 index 64c6cd57..00000000 --- a/Example/NYTPhotoViewer-SwiftTests/NYTPhotoCaptionViewTests.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// NYTPhotoCaptionViewTests.swift -// NYTPhotoViewer -// -// Created by Mark Keefe on 3/21/15. -// Copyright (c) 2015 The New York Times. All rights reserved. -// - -import XCTest - -class NYTPhotoCaptionViewTests: XCTestCase { - - func testDesignatedInitializerAcceptsNilForTitle() { - let photoCaptionView = NYTPhotoCaptionView(attributedTitle: nil, attributedSummary: NSAttributedString(), attributedCredit: NSAttributedString()) - XCTAssertNotNil(photoCaptionView) - } - - func testDesignatedInitializerAcceptsNilForSummary() { - let photoCaptionView = NYTPhotoCaptionView(attributedTitle: NSAttributedString(), attributedSummary: nil, attributedCredit: NSAttributedString()) - XCTAssertNotNil(photoCaptionView) - } - - func testDesignatedInitializerAcceptsNilForCredit() { - let photoCaptionView = NYTPhotoCaptionView(attributedTitle: NSAttributedString(), attributedSummary: NSAttributedString(), attributedCredit: nil) - XCTAssertNotNil(photoCaptionView) - } -} diff --git a/Example/NYTPhotoViewer-SwiftTests/NYTPhotoTransitionAnimatorTests.swift b/Example/NYTPhotoViewer-SwiftTests/NYTPhotoTransitionAnimatorTests.swift deleted file mode 100644 index c3f69933..00000000 --- a/Example/NYTPhotoViewer-SwiftTests/NYTPhotoTransitionAnimatorTests.swift +++ /dev/null @@ -1,16 +0,0 @@ -// -// NYTPhotoTransitionAnimatorTests.swift -// NYTPhotoViewer -// -// Created by Mark Keefe on 3/21/15. -// Copyright (c) 2015 The New York Times. All rights reserved. -// - -import XCTest - -class NYTPhotoTransitionAnimatorTests: XCTestCase { - - func testNewAnimationViewReturnsNilWhenPassedNil() { - XCTAssertNil(NYTPhotoTransitionAnimator.newAnimationViewFromView(nil)) - } -} diff --git a/Example/NYTPhotoViewer-SwiftTests/NYTPhotoViewControllerTests.swift b/Example/NYTPhotoViewer-SwiftTests/NYTPhotoViewControllerTests.swift deleted file mode 100644 index 702fad42..00000000 --- a/Example/NYTPhotoViewer-SwiftTests/NYTPhotoViewControllerTests.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// NYTPhotoViewControllerTests.swift -// NYTPhotoViewer -// -// Created by Mark Keefe on 3/21/15. -// Copyright (c) 2015 The New York Times. All rights reserved. -// - -import XCTest - -class NYTPhotoViewControllerTests: XCTestCase { - - var testPhoto: ExamplePhoto? - - override func setUp() { - super.setUp() - testPhoto = ExamplePhoto(attributedCaptionTitle: NSAttributedString()) - } - - override func tearDown() { - testPhoto = nil - super.tearDown() - } - - func testScalingImageViewExistsAferInitialization() { - let photoViewController = NYTPhotoViewController(photo: testPhoto, loadingView: nil, notificationCenter: nil) - XCTAssertNotNil(photoViewController.scalingImageView) - } - - func testDoubleTapGestureRecognizerExistsAferInitialization() { - let photoViewController = NYTPhotoViewController(photo: testPhoto, loadingView: nil, notificationCenter: nil) - XCTAssertNotNil(photoViewController.doubleTapGestureRecognizer) - } - - func testLoadingViewExistsAferNilInitialization() { - let photoViewController = NYTPhotoViewController(photo: testPhoto, loadingView: nil, notificationCenter: nil) - XCTAssertNotNil(photoViewController.loadingView) - } - - func testDesignatedInitializerAcceptsNilForPhotoArgument() { - let photoViewController = NYTPhotoViewController(photo: nil, loadingView: UIView(), notificationCenter: NSNotificationCenter.defaultCenter()) - - XCTAssertNotNil(photoViewController) - } - - func testDesignatedInitializerAcceptsNilForLoadingViewArgument() { - let photoViewController = NYTPhotoViewController(photo: testPhoto, loadingView: nil, notificationCenter: NSNotificationCenter.defaultCenter()) - - XCTAssertNotNil(photoViewController) - } - - func testDesignatedInitializerAcceptsNilForNotificationCenterArgument() { - let photoViewController = NYTPhotoViewController(photo: testPhoto, loadingView: UIView(), notificationCenter: nil) - - XCTAssertNotNil(photoViewController) - } - - func testDesignatedInitializerAcceptsNilForAllArguments() { - let photoViewController = NYTPhotoViewController(photo: nil, loadingView: nil, notificationCenter: nil) - - XCTAssertNotNil(photoViewController) - } -} diff --git a/Example/NYTPhotoViewer-SwiftTests/NYTPhotosDataSourceTests.swift b/Example/NYTPhotoViewer-SwiftTests/NYTPhotosDataSourceTests.swift deleted file mode 100644 index 80d0cb24..00000000 --- a/Example/NYTPhotoViewer-SwiftTests/NYTPhotosDataSourceTests.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// NYTPhotosDataSourceTests.swift -// NYTPhotoViewer -// -// Created by Mark Keefe on 3/21/15. -// Copyright (c) 2015 The New York Times. All rights reserved. -// - -import XCTest - -class NYTPhotosDataSourceTests: XCTestCase { - - let photos: [ExamplePhoto] = PhotosProvider().photos - - func testInitializerAcceptsNil() { - XCTAssertNotNil(NYTPhotosDataSource(photos: nil)) - } - - func testOutOfBoundsReturnsNilAndDoesNotCrash() { - let dataSource = NYTPhotosDataSource(photos: nil) - let notAnObject: AnyObject? = dataSource[1] - XCTAssertNil(notAnObject, "NYTDataSource should not crash after it was initialized with nil") - } - - func testValidIndexReturnsPhoto() { - let dataSource = NYTPhotosDataSource(photos: photos) - XCTAssertNotNil(dataSource[1]) - } - - func testValidIndexReturnsCorrectPhoto() { - let dataSource = NYTPhotosDataSource(photos: photos) - XCTAssertEqual(photos[1], dataSource[1] as? ExamplePhoto) - } -} diff --git a/Example/NYTPhotoViewer-SwiftTests/NYTPhotosOverlayViewTests.swift b/Example/NYTPhotoViewer-SwiftTests/NYTPhotosOverlayViewTests.swift deleted file mode 100644 index 6f1e67e2..00000000 --- a/Example/NYTPhotoViewer-SwiftTests/NYTPhotosOverlayViewTests.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// NYTPhotosOverlayViewTests.swift -// NYTPhotoViewer -// -// Created by Mark Keefe on 3/21/15. -// Copyright (c) 2015 The New York Times. All rights reserved. -// - -import XCTest -import UIKit - -class NYTPhotosOverlayViewTests: XCTestCase { - - func testNavigationBarExistsAfterInitialization() { - let overlayView = NYTPhotosOverlayView() - XCTAssertNotNil(overlayView.navigationBar) - } - - func testLeftBarButtonItemSetterAffectsNavigationBar() { - let overlayView = NYTPhotosOverlayView() - let leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.Done, target: nil, action: nil) - overlayView.leftBarButtonItem = leftBarButtonItem - XCTAssert(leftBarButtonItem == overlayView.navigationBar.items?.first?.leftBarButtonItem) - } - - func testRightBarButtonItemSetterAffectsNavigationBar() { - let overlayView = NYTPhotosOverlayView() - let rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.Done, target: nil, action: nil) - overlayView.rightBarButtonItem = rightBarButtonItem - XCTAssert(rightBarButtonItem == overlayView.navigationBar.items?.first?.rightBarButtonItem) - } - - func testTitleSetterAffectsNavigationBar() { - let overlayView = NYTPhotosOverlayView() - let title = "title" - overlayView.title = title - XCTAssert(title == overlayView.navigationBar.items?.first?.title) - } - - func testTitleTextAttributesSetterAffectsNavigationBar() { - let overlayView = NYTPhotosOverlayView() - let titleTextAttributes = [NSForegroundColorAttributeName: UIColor.orangeColor()] - overlayView.titleTextAttributes = titleTextAttributes - XCTAssertEqual(titleTextAttributes, overlayView.navigationBar.titleTextAttributes as? [String: UIColor]) - } -} diff --git a/Example/NYTPhotoViewer-SwiftTests/NYTPhotosViewControllerTests.swift b/Example/NYTPhotoViewer-SwiftTests/NYTPhotosViewControllerTests.swift deleted file mode 100644 index ffdbd632..00000000 --- a/Example/NYTPhotoViewer-SwiftTests/NYTPhotosViewControllerTests.swift +++ /dev/null @@ -1,170 +0,0 @@ -// -// NYTPhotosViewControllerTests.swift -// NYTPhotoViewer -// -// Created by Mark Keefe on 3/21/15. -// Copyright (c) 2015 The New York Times. All rights reserved. -// - -import UIKit -import XCTest - -class NYTPhotosViewControllerTests: XCTestCase { - - let photos: [ExamplePhoto] = PhotosProvider().photos - var photosViewController: NYTPhotosViewController? - - override func setUp() { - super.setUp() - photosViewController = NYTPhotosViewController(photos: photos) - } - - override func tearDown() { - photosViewController = nil - super.tearDown() - } - - func testPanGestureRecognizerExistsAfterInitialization() { - XCTAssertNotNil(photosViewController?.panGestureRecognizer) - } - - func testPanGestureRecognizerHasAssociatedView() { - XCTAssertNotNil(photosViewController?.panGestureRecognizer.view) - } - - func testSingleTapGestureRecognizerExistsAfterInitialization() { - XCTAssertNotNil(photosViewController?.singleTapGestureRecognizer) - } - - func testSingleTapGestureRecognizerHasAssociatedView() { - XCTAssertNotNil(photosViewController?.singleTapGestureRecognizer.view) - } - - func testPageViewControllerExistsAfterInitialization() { - XCTAssertNotNil(photosViewController?.pageViewController) - } - - func testPageViewControllerDoesNotHaveAssociatedSuperviewBeforeViewLoads() { - XCTAssertNil(photosViewController?.pageViewController.view.superview) - } - - func testPageViewControllerHasAssociatedSuperviewAfterViewLoads() { - photosViewController?.view = photosViewController?.view // Referencing the view loads it. - XCTAssertNotNil(photosViewController?.pageViewController.view.superview) - } - - func testCurrentlyDisplayedPhotoIsFirstAfterConvenienceInitialization() { - XCTAssertEqual(photos.first!, photosViewController?.currentlyDisplayedPhoto as? ExamplePhoto) - } - - func testCurrentlyDisplayedPhotoIsAccurateAfterSettingInitialPhoto() { - photosViewController = NYTPhotosViewController(photos: photos, initialPhoto: photos.last) - XCTAssertEqual(photos.last!, photosViewController?.currentlyDisplayedPhoto as? ExamplePhoto) - } - - func testCurrentlyDisplayedPhotoIsAccurateAfterDisplayPhotoCall() { - photosViewController = NYTPhotosViewController(photos: photos, initialPhoto: photos.last) - photosViewController?.displayPhoto(photos.first, animated: false) - XCTAssertEqual(photos.first!, photosViewController?.currentlyDisplayedPhoto as? ExamplePhoto) - } - - func testLeftBarButtonItemIsPopulatedAfterInitialization() { - XCTAssertNotNil(photosViewController?.leftBarButtonItem) - } - - func testLeftBarButtonItemIsNilAfterSettingToNil() { - photosViewController?.leftBarButtonItem = nil - XCTAssertNil(photosViewController?.leftBarButtonItem) - } - - func testRightBarButtonItemIsPopulatedAfterInitialization() { - XCTAssertNotNil(photosViewController?.rightBarButtonItem) - } - - func testRightBarButtonItemIsNilAfterSettingToNil() { - photosViewController?.rightBarButtonItem = nil - XCTAssertNil(photosViewController?.rightBarButtonItem) - } - - func testConvenienceInitializerAcceptsNil() { - XCTAssertNotNil(photosViewController) - } - - func testDesignatedInitializerAcceptsNilForPhotosParameter() { - photosViewController = NYTPhotosViewController(photos: nil, initialPhoto: photos.first) - XCTAssertNotNil(photosViewController) - } - - func testDesignatedInitializerAcceptsNilForInitialPhotoParameter() { - photosViewController = NYTPhotosViewController(photos: photos, initialPhoto: nil) - - XCTAssertNotNil(photosViewController) - } - - func testDesignatedInitializerAcceptsNilForBothParameters() { - photosViewController = NYTPhotosViewController(photos: nil, initialPhoto: nil) - - XCTAssertNotNil(photosViewController) - } - - func testDisplayPhotoAcceptsNil() { - photosViewController?.displayPhoto(nil, animated: false) - XCTAssertNotNil(photosViewController) - } - - func testDisplayPhotoDoesNothingWhenPassedPhotoOutsideDataSource() { - photosViewController = NYTPhotosViewController(photos: photos, initialPhoto: photos.first) - - let invalidPhoto = ExamplePhoto(attributedCaptionTitle: NSAttributedString(string: "title")) - - photosViewController?.displayPhoto(invalidPhoto as NYTPhoto, animated: false) - XCTAssertEqual(photos.first!, photosViewController?.currentlyDisplayedPhoto as? ExamplePhoto) - } - - func testDisplayPhotoMovesToCorrectPhoto() { - photosViewController = NYTPhotosViewController(photos: photos, initialPhoto: photos.first) - let photoToDisplay = photos[2] - - photosViewController?.displayPhoto(photoToDisplay, animated: false) - XCTAssertEqual(photoToDisplay, photosViewController?.currentlyDisplayedPhoto as? ExamplePhoto) - } - - func testUpdateImageForPhotoAcceptsNil() { - photosViewController?.updateImageForPhoto(nil) - XCTAssertNotNil(photosViewController) - } - - func testUpdateImageForPhotoDoesNothingWhenPassedPhotoOutsideDataSource() { - photosViewController = NYTPhotosViewController(photos: photos, initialPhoto: photos[CustomEverythingPhotoIndex]) - let invalidPhoto = ExamplePhoto(attributedCaptionTitle: NSAttributedString()) - invalidPhoto.image = UIImage() - - photosViewController?.updateImageForPhoto(invalidPhoto) - - if photos.count > CustomEverythingPhotoIndex { - if let testImage = photos[CustomEverythingPhotoIndex].image { - /** Swift 1.2 - * if photos.count > PhotosProvider.CustomEverythingPhotoIndex, - * let testImage = photos[PhotosProvider.CustomEverythingPhotoIndex].image - */ - if let currentlyDisplayedPhoto = photosViewController?.currentlyDisplayedPhoto { - XCTAssertEqual(currentlyDisplayedPhoto.image, testImage) - } - } - } - } - - func testUpdateImageForPhotoUpdatesImage() { - photosViewController = NYTPhotosViewController(photos: photos, initialPhoto: photos.first) - - if let photoToUpdate = photos.first { - photoToUpdate.image = UIImage() - - photosViewController?.updateImageForPhoto(photoToUpdate) - - if let currentlyDisplayedPhoto = photosViewController?.currentlyDisplayedPhoto { - XCTAssertEqual(currentlyDisplayedPhoto.image, photoToUpdate.image!) - } - } - } -} diff --git a/Example/NYTPhotoViewer-SwiftTests/NYTScalingImageViewTests.swift b/Example/NYTPhotoViewer-SwiftTests/NYTScalingImageViewTests.swift deleted file mode 100644 index 7516b5c6..00000000 --- a/Example/NYTPhotoViewer-SwiftTests/NYTScalingImageViewTests.swift +++ /dev/null @@ -1,39 +0,0 @@ -// -// NYTScalingImageViewTests.swift -// NYTPhotoViewer -// -// Created by Mark Keefe on 3/21/15. -// Copyright (c) 2015 The New York Times. All rights reserved. -// - -import XCTest - -class NYTScalingImageViewTests: XCTestCase { - - func testInitializationAcceptsNil() { - let scalingImageView = NYTScalingImageView(image: nil, frame: CGRectZero) - XCTAssertNotNil(scalingImageView) - } - - func testImageViewExistsAfterInitialization() { - let scalingImageView = NYTScalingImageView(image: nil, frame: CGRectZero) - XCTAssertNotNil(scalingImageView.imageView); - } - - func testInitializationSetsImage() { - let image = UIImage() - let scalingImageView = NYTScalingImageView(image: nil, frame: CGRectZero) - if let scalingImage = scalingImageView.imageView.image { - XCTAssertEqual(image, scalingImage) - } - } - - func testUpdateImageUpdatesImage() { - let image2 = UIImage() - - let scalingImageView = NYTScalingImageView(image: nil, frame: CGRectZero) - scalingImageView.updateImage(image2) - - XCTAssertEqual(image2, scalingImageView.imageView.image!) - } -} diff --git a/Example/NYTPhotoViewer.xcodeproj/project.pbxproj b/Example/NYTPhotoViewer.xcodeproj/project.pbxproj index 2d7ee24d..89cc551a 100644 --- a/Example/NYTPhotoViewer.xcodeproj/project.pbxproj +++ b/Example/NYTPhotoViewer.xcodeproj/project.pbxproj @@ -22,25 +22,14 @@ 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; - 8C2AB3F31ABDF266004A2BBA /* NYTPhotosDataSourceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C2AB3F21ABDF266004A2BBA /* NYTPhotosDataSourceTests.swift */; }; - 8C2AB3F51ABDF959004A2BBA /* NYTPhotosViewControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C2AB3F41ABDF959004A2BBA /* NYTPhotosViewControllerTests.swift */; }; 8C4464E51ABCA3BA00BD79F1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C4464E41ABCA3BA00BD79F1 /* AppDelegate.swift */; }; 8C4464E71ABCA3BA00BD79F1 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C4464E61ABCA3BA00BD79F1 /* ViewController.swift */; }; 8C4464EA1ABCA3BA00BD79F1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8C4464E81ABCA3BA00BD79F1 /* Main.storyboard */; }; 8C4464EF1ABCA3BA00BD79F1 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8C4464ED1ABCA3BA00BD79F1 /* LaunchScreen.xib */; }; 8C4465031ABCA95600BD79F1 /* PhotosProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C4465021ABCA95600BD79F1 /* PhotosProvider.swift */; }; - 8C4465041ABCA95600BD79F1 /* PhotosProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C4465021ABCA95600BD79F1 /* PhotosProvider.swift */; }; 8C4465061ABCAAD100BD79F1 /* ExamplePhoto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C4465051ABCAAD100BD79F1 /* ExamplePhoto.swift */; }; - 8C4465071ABCAAD100BD79F1 /* ExamplePhoto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C4465051ABCAAD100BD79F1 /* ExamplePhoto.swift */; }; 8C838AC51AC7777D00D754D3 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; }; - 8CD283DE1ABE3B6400ADD109 /* NYTPhotoViewControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CD283DD1ABE3B6400ADD109 /* NYTPhotoViewControllerTests.swift */; }; - 8CD283E01ABE43DC00ADD109 /* NYTPhotoCaptionViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CD283DF1ABE43DC00ADD109 /* NYTPhotoCaptionViewTests.swift */; }; - 8CD283E21ABE455A00ADD109 /* NYTPhotosOverlayViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CD283E11ABE455A00ADD109 /* NYTPhotosOverlayViewTests.swift */; }; - 8CD283E41ABE624200ADD109 /* NYTScalingImageViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CD283E31ABE624200ADD109 /* NYTScalingImageViewTests.swift */; }; - 8CD283E61ABE6F6600ADD109 /* NYTPhotoTransitionAnimatorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CD283E51ABE6F6600ADD109 /* NYTPhotoTransitionAnimatorTests.swift */; }; 934B3EA91BD54CE400953DC1 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; }; - 934B3EAA1BD54CE400953DC1 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; }; - 94195E1720FF535F0D8447E6 /* libPods-NYTPhotoViewer-SwiftTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 03C738E753BE4DA373A7BC05 /* libPods-NYTPhotoViewer-SwiftTests.a */; }; 955BE815A0B486203B80D541 /* libPods-NYTPhotoViewer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1477DE9B8584BD5335F644E1 /* libPods-NYTPhotoViewer.a */; }; B5B252E11A8BE10B00E9973E /* NYTExamplePhoto.m in Sources */ = {isa = PBXBuildFile; fileRef = B5B252E01A8BE10B00E9973E /* NYTExamplePhoto.m */; }; B5DC9D821A9D04D300F4F81F /* NYTPhotosViewControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B5DC9D811A9D04D300F4F81F /* NYTPhotosViewControllerTests.m */; }; @@ -55,7 +44,6 @@ EC1B97111BA675DC00C9C9FD /* giphy.gif in Resources */ = {isa = PBXBuildFile; fileRef = EC1B97101BA675DC00C9C9FD /* giphy.gif */; }; EC1B97121BA675DC00C9C9FD /* giphy.gif in Resources */ = {isa = PBXBuildFile; fileRef = EC1B97101BA675DC00C9C9FD /* giphy.gif */; }; EC1B97131BA67E6700C9C9FD /* giphy.gif in Resources */ = {isa = PBXBuildFile; fileRef = EC1B97101BA675DC00C9C9FD /* giphy.gif */; }; - EC1B97141BA67E6700C9C9FD /* giphy.gif in Resources */ = {isa = PBXBuildFile; fileRef = EC1B97101BA675DC00C9C9FD /* giphy.gif */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -66,13 +54,6 @@ remoteGlobalIDString = 6003F589195388D20070C39A; remoteInfo = "ios-photo-viewer"; }; - 8C4464F51ABCA3BA00BD79F1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6003F582195388D10070C39A /* Project object */; - proxyType = 1; - remoteGlobalIDString = 8C4464DF1ABCA3BA00BD79F1; - remoteInfo = "NYTPhotoViewer-Swift"; - }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ @@ -106,8 +87,6 @@ 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = ""; }; 72DCB731DCC658F46D0B619E /* Pods-Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-Tests/Pods-Tests.release.xcconfig"; sourceTree = ""; }; - 8C2AB3F21ABDF266004A2BBA /* NYTPhotosDataSourceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NYTPhotosDataSourceTests.swift; sourceTree = ""; }; - 8C2AB3F41ABDF959004A2BBA /* NYTPhotosViewControllerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NYTPhotosViewControllerTests.swift; sourceTree = ""; }; 8C3F25531ABCE816007BFF4E /* NYTPhotoViewer-Swift-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NYTPhotoViewer-Swift-Bridging-Header.h"; sourceTree = ""; }; 8C4464E01ABCA3BA00BD79F1 /* NYTPhotoViewer-Swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "NYTPhotoViewer-Swift.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 8C4464E31ABCA3BA00BD79F1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -115,15 +94,8 @@ 8C4464E61ABCA3BA00BD79F1 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 8C4464E91ABCA3BA00BD79F1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 8C4464EE1ABCA3BA00BD79F1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - 8C4464F41ABCA3BA00BD79F1 /* NYTPhotoViewer-SwiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "NYTPhotoViewer-SwiftTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 8C4464F91ABCA3BA00BD79F1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 8C4465021ABCA95600BD79F1 /* PhotosProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PhotosProvider.swift; sourceTree = ""; }; 8C4465051ABCAAD100BD79F1 /* ExamplePhoto.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExamplePhoto.swift; sourceTree = ""; }; - 8CD283DD1ABE3B6400ADD109 /* NYTPhotoViewControllerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NYTPhotoViewControllerTests.swift; sourceTree = ""; }; - 8CD283DF1ABE43DC00ADD109 /* NYTPhotoCaptionViewTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NYTPhotoCaptionViewTests.swift; sourceTree = ""; }; - 8CD283E11ABE455A00ADD109 /* NYTPhotosOverlayViewTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NYTPhotosOverlayViewTests.swift; sourceTree = ""; }; - 8CD283E31ABE624200ADD109 /* NYTScalingImageViewTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NYTScalingImageViewTests.swift; sourceTree = ""; }; - 8CD283E51ABE6F6600ADD109 /* NYTPhotoTransitionAnimatorTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NYTPhotoTransitionAnimatorTests.swift; sourceTree = ""; }; A2B2556D53F0690AADDF6739 /* Pods-NYTPhotoViewer-SwiftTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NYTPhotoViewer-SwiftTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-NYTPhotoViewer-SwiftTests/Pods-NYTPhotoViewer-SwiftTests.debug.xcconfig"; sourceTree = ""; }; B5B252DF1A8BE10B00E9973E /* NYTExamplePhoto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NYTExamplePhoto.h; sourceTree = ""; }; B5B252E01A8BE10B00E9973E /* NYTExamplePhoto.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NYTExamplePhoto.m; sourceTree = ""; }; @@ -171,14 +143,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 8C4464F11ABCA3BA00BD79F1 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 94195E1720FF535F0D8447E6 /* libPods-NYTPhotoViewer-SwiftTests.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -190,7 +154,6 @@ 6003F593195388D20070C39A /* NYTPhotoViewer */, 8C4464E11ABCA3BA00BD79F1 /* NYTPhotoViewer-Swift */, 6003F5B5195388D20070C39A /* Tests */, - 8C4464F71ABCA3BA00BD79F1 /* NYTPhotoViewer-SwiftTests */, 6003F58C195388D20070C39A /* Frameworks */, 6003F58B195388D20070C39A /* Products */, DC8AE5E7086B7FC6E4B5BE53 /* Pods */, @@ -203,7 +166,6 @@ 6003F58A195388D20070C39A /* NYTPhotoViewer.app */, 6003F5AE195388D20070C39A /* Tests.xctest */, 8C4464E01ABCA3BA00BD79F1 /* NYTPhotoViewer-Swift.app */, - 8C4464F41ABCA3BA00BD79F1 /* NYTPhotoViewer-SwiftTests.xctest */, ); name = Products; sourceTree = ""; @@ -308,29 +270,6 @@ name = "Supporting Files"; sourceTree = ""; }; - 8C4464F71ABCA3BA00BD79F1 /* NYTPhotoViewer-SwiftTests */ = { - isa = PBXGroup; - children = ( - 8C2AB3F41ABDF959004A2BBA /* NYTPhotosViewControllerTests.swift */, - 8CD283DD1ABE3B6400ADD109 /* NYTPhotoViewControllerTests.swift */, - 8C2AB3F21ABDF266004A2BBA /* NYTPhotosDataSourceTests.swift */, - 8CD283DF1ABE43DC00ADD109 /* NYTPhotoCaptionViewTests.swift */, - 8CD283E11ABE455A00ADD109 /* NYTPhotosOverlayViewTests.swift */, - 8CD283E31ABE624200ADD109 /* NYTScalingImageViewTests.swift */, - 8CD283E51ABE6F6600ADD109 /* NYTPhotoTransitionAnimatorTests.swift */, - 8C4464F81ABCA3BA00BD79F1 /* Supporting Files */, - ); - path = "NYTPhotoViewer-SwiftTests"; - sourceTree = ""; - }; - 8C4464F81ABCA3BA00BD79F1 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 8C4464F91ABCA3BA00BD79F1 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; 8C838AC41AC7774300D754D3 /* Common Resources */ = { isa = PBXGroup; children = ( @@ -418,27 +357,6 @@ productReference = 8C4464E01ABCA3BA00BD79F1 /* NYTPhotoViewer-Swift.app */; productType = "com.apple.product-type.application"; }; - 8C4464F31ABCA3BA00BD79F1 /* NYTPhotoViewer-SwiftTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8C4465011ABCA3BA00BD79F1 /* Build configuration list for PBXNativeTarget "NYTPhotoViewer-SwiftTests" */; - buildPhases = ( - 77060F753544EBF4A399EF7E /* Check Pods Manifest.lock */, - 8C4464F01ABCA3BA00BD79F1 /* Sources */, - 8C4464F11ABCA3BA00BD79F1 /* Frameworks */, - 8C4464F21ABCA3BA00BD79F1 /* Resources */, - 9F9185D07ADDCE84D01D6062 /* Copy Pods Resources */, - 4A3E2FF23078350CB8D4ECDB /* Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 8C4464F61ABCA3BA00BD79F1 /* PBXTargetDependency */, - ); - name = "NYTPhotoViewer-SwiftTests"; - productName = "NYTPhotoViewer-SwiftTests"; - productReference = 8C4464F41ABCA3BA00BD79F1 /* NYTPhotoViewer-SwiftTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -456,10 +374,6 @@ 8C4464DF1ABCA3BA00BD79F1 = { CreatedOnToolsVersion = 6.3; }; - 8C4464F31ABCA3BA00BD79F1 = { - CreatedOnToolsVersion = 6.3; - TestTargetID = 8C4464DF1ABCA3BA00BD79F1; - }; }; }; buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "NYTPhotoViewer" */; @@ -478,7 +392,6 @@ 6003F589195388D20070C39A /* NYTPhotoViewer */, 6003F5AD195388D20070C39A /* Tests */, 8C4464DF1ABCA3BA00BD79F1 /* NYTPhotoViewer-Swift */, - 8C4464F31ABCA3BA00BD79F1 /* NYTPhotoViewer-SwiftTests */, ); }; /* End PBXProject section */ @@ -517,15 +430,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 8C4464F21ABCA3BA00BD79F1 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - EC1B97141BA67E6700C9C9FD /* giphy.gif in Resources */, - 934B3EAA1BD54CE400953DC1 /* Images.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ @@ -589,36 +493,6 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-NYTPhotoViewer-Swift/Pods-NYTPhotoViewer-Swift-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 4A3E2FF23078350CB8D4ECDB /* Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-NYTPhotoViewer-SwiftTests/Pods-NYTPhotoViewer-SwiftTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 77060F753544EBF4A399EF7E /* Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; 87D1B9B97C179AA75901DB00 /* Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -649,21 +523,6 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-NYTPhotoViewer/Pods-NYTPhotoViewer-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 9F9185D07ADDCE84D01D6062 /* Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-NYTPhotoViewer-SwiftTests/Pods-NYTPhotoViewer-SwiftTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; B4CAEB715688F67681460AC0 /* Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -749,22 +608,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 8C4464F01ABCA3BA00BD79F1 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8CD283E61ABE6F6600ADD109 /* NYTPhotoTransitionAnimatorTests.swift in Sources */, - 8C2AB3F31ABDF266004A2BBA /* NYTPhotosDataSourceTests.swift in Sources */, - 8CD283DE1ABE3B6400ADD109 /* NYTPhotoViewControllerTests.swift in Sources */, - 8CD283E21ABE455A00ADD109 /* NYTPhotosOverlayViewTests.swift in Sources */, - 8C2AB3F51ABDF959004A2BBA /* NYTPhotosViewControllerTests.swift in Sources */, - 8C4465071ABCAAD100BD79F1 /* ExamplePhoto.swift in Sources */, - 8CD283E01ABE43DC00ADD109 /* NYTPhotoCaptionViewTests.swift in Sources */, - 8CD283E41ABE624200ADD109 /* NYTScalingImageViewTests.swift in Sources */, - 8C4465041ABCA95600BD79F1 /* PhotosProvider.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -773,11 +616,6 @@ target = 6003F589195388D20070C39A /* NYTPhotoViewer */; targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */; }; - 8C4464F61ABCA3BA00BD79F1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 8C4464DF1ABCA3BA00BD79F1 /* NYTPhotoViewer-Swift */; - targetProxy = 8C4464F51ABCA3BA00BD79F1 /* PBXContainerItemProxy */; - }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -1023,60 +861,6 @@ }; name = Release; }; - 8C4464FE1ABCA3BA00BD79F1 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = A2B2556D53F0690AADDF6739 /* Pods-NYTPhotoViewer-SwiftTests.debug.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = "NYTPhotoViewer-SwiftTests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "com.nytimes.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "NYTPhotoViewer-Swift/NYTPhotoViewer-Swift-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/NYTPhotoViewer-Swift.app/NYTPhotoViewer-Swift"; - }; - name = Debug; - }; - 8C4464FF1ABCA3BA00BD79F1 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 49CD4B2FD524DCA01A37028A /* Pods-NYTPhotoViewer-SwiftTests.release.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "NYTPhotoViewer-SwiftTests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "com.nytimes.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "NYTPhotoViewer-Swift/NYTPhotoViewer-Swift-Bridging-Header.h"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/NYTPhotoViewer-Swift.app/NYTPhotoViewer-Swift"; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -1116,15 +900,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 8C4465011ABCA3BA00BD79F1 /* Build configuration list for PBXNativeTarget "NYTPhotoViewer-SwiftTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 8C4464FE1ABCA3BA00BD79F1 /* Debug */, - 8C4464FF1ABCA3BA00BD79F1 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; /* End XCConfigurationList section */ }; rootObject = 6003F582195388D10070C39A /* Project object */; From ee1f94e764fa8f7cadcdd9258a47fcd00757002c Mon Sep 17 00:00:00 2001 From: Chris Dzombak Date: Thu, 14 Jan 2016 09:41:30 -0500 Subject: [PATCH 03/26] Minor formatting fix in CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5db67d0..2d44415b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Changes for users of the library in 1.0.0: - **The library now supports iOS 8.0 and newer.** ([#82](https://github.com/NYTimes/NYTPhotoViewer/pull/82), [#84](https://github.com/NYTimes/NYTPhotoViewer/pull/84), [#107](https://github.com/NYTimes/NYTPhotoViewer/pull/107)) - Support programmatic view controller dismissal via `dismissViewControllerAnimated:completion:` ([#121](https://github.com/NYTimes/NYTPhotoViewer/pull/121), [#122](https://github.com/NYTimes/NYTPhotoViewer/pull/122)) -- Use scrolling UITextView for captions ([#88](https://github.com/NYTimes/NYTPhotoViewer/pull/88)) +- Use scrolling `UITextView` for captions ([#88](https://github.com/NYTimes/NYTPhotoViewer/pull/88)) - Fix a bug when presenting NYTPhotoViewer from a subview of `UIStackView` ([#104](https://github.com/NYTimes/NYTPhotoViewer/pull/104)) - Update overlay information after `displayPhoto:` call ([#100](https://github.com/NYTimes/NYTPhotoViewer/pull/100)) - Implements animated GIF support ([#71](https://github.com/NYTimes/NYTPhotoViewer/pull/71), [#94](https://github.com/NYTimes/NYTPhotoViewer/pull/94), [#106](https://github.com/NYTimes/NYTPhotoViewer/pull/106), [#111](https://github.com/NYTimes/NYTPhotoViewer/pull/111)) From c0c2040dfccf9f5cac452a60cea2994b4e9d415a Mon Sep 17 00:00:00 2001 From: Chris Dzombak Date: Thu, 14 Jan 2016 17:36:59 -0500 Subject: [PATCH 04/26] Fix delegate calls on interactive dismissal transitions closes https://github.com/NYTimes/NYTPhotoViewer/issues/129 This was a stupid reversed-logic bug. I even tried extracting this to a boolean to keep the logic straight, but something with the "forces non interactive" naming messed with my head, I guess. --- Pod/Classes/ios/NYTPhotosViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pod/Classes/ios/NYTPhotosViewController.m b/Pod/Classes/ios/NYTPhotosViewController.m index a56133bd..877dc532 100644 --- a/Pod/Classes/ios/NYTPhotosViewController.m +++ b/Pod/Classes/ios/NYTPhotosViewController.m @@ -358,7 +358,7 @@ - (void)dismissViewControllerAnimated:(BOOL)animated completion:(void (^)(void)) // Cocoa convention is not to call delegate methods when you do something directly in code, // so we'll not call delegate methods if this is a programmatic, noninteractive dismissal: - BOOL shouldSendDelegateMessages = self.transitionController.forcesNonInteractiveDismissal; + BOOL shouldSendDelegateMessages = !self.transitionController.forcesNonInteractiveDismissal; if (shouldSendDelegateMessages && [self.delegate respondsToSelector:@selector(photosViewControllerWillDismiss:)]) { [self.delegate photosViewControllerWillDismiss:self]; From ea7304c7ad2b849590819d31d7fe25a5d24f392c Mon Sep 17 00:00:00 2001 From: Prayag Verma Date: Mon, 18 Jan 2016 07:39:08 +0530 Subject: [PATCH 05/26] Update license year range to 2016 --- LICENSE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index b7e2ecb6..1b8afe29 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015 The New York Times Company +Copyright (c) 2015-2016 The New York Times Company Licensed under the Apache License, Version 2.0 (the "License"); you may not use this library except in compliance with the License. From 86ae16fdae42f294155ecf02a322e7e497a62a1f Mon Sep 17 00:00:00 2001 From: Chris Dzombak Date: Tue, 19 Jan 2016 14:59:28 -0500 Subject: [PATCH 06/26] Avoid testing floats for equality in PhotoViewController closes #133 --- Pod/Classes/ios/NYTPhotoViewController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Pod/Classes/ios/NYTPhotoViewController.m b/Pod/Classes/ios/NYTPhotoViewController.m index 3a5627f6..8f3f1ee8 100644 --- a/Pod/Classes/ios/NYTPhotoViewController.m +++ b/Pod/Classes/ios/NYTPhotoViewController.m @@ -157,8 +157,8 @@ - (void)didDoubleTapWithGestureRecognizer:(UITapGestureRecognizer *)recognizer { CGPoint pointInView = [recognizer locationInView:self.scalingImageView.imageView]; CGFloat newZoomScale = self.scalingImageView.maximumZoomScale; - - if (self.scalingImageView.zoomScale >= self.scalingImageView.maximumZoomScale) { + + if ((self.scalingImageView.zoomScale - self.scalingImageView.maximumZoomScale) >= 0.0) { newZoomScale = self.scalingImageView.minimumZoomScale; } From 9cda32692289cc3ed595ee393b877a72e4882a45 Mon Sep 17 00:00:00 2001 From: Chris Dzombak Date: Tue, 19 Jan 2016 15:43:15 -0500 Subject: [PATCH 07/26] =?UTF-8?q?Don=E2=80=99t=20hack=20around=20radar://2?= =?UTF-8?q?0070670=20on=20iOS=208.3=20or=20later?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per @bcapps, this status bar bug was fixed in iOS 8.3 but not marked as such on bugreport.apple.com : https://github.com/NYTimes/NYTPhotoViewer/issues/131#issue-126923817 closes #131 --- .../NYTPhotoDismissalInteractionController.m | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Pod/Classes/ios/NYTPhotoDismissalInteractionController.m b/Pod/Classes/ios/NYTPhotoDismissalInteractionController.m index 4a5ee1ae..433f51c9 100644 --- a/Pod/Classes/ios/NYTPhotoDismissalInteractionController.m +++ b/Pod/Classes/ios/NYTPhotoDismissalInteractionController.m @@ -136,7 +136,23 @@ - (void)fixCancellationStatusBarAppearanceBug { } + (BOOL)isRadar20070670Fixed { - return NO; + // per @bcapps, this was fixed in iOS 8.3 but not marked as such on bugreport.apple.com + // https://github.com/NYTimes/NYTPhotoViewer/issues/131#issue-126923817 + + static BOOL isRadar20070670Fixed; + + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + NSOperatingSystemVersion const iOSVersion8Point3 = (NSOperatingSystemVersion) { + .majorVersion = 8, + .minorVersion = 3, + .patchVersion = 0 + }; + + isRadar20070670Fixed = [[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion:iOSVersion8Point3]; + }); + + return isRadar20070670Fixed; } #pragma mark - UIViewControllerInteractiveTransitioning From 4fab820ba5d52a56260e7c93afda8de4f1b1ee17 Mon Sep 17 00:00:00 2001 From: Chris Dzombak Date: Tue, 19 Jan 2016 15:53:10 -0500 Subject: [PATCH 08/26] Add changes so far on `develop` to CHANGELOG --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d44415b..a85c4a59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## `develop` + +Changes for users of the library currently on `develop`: + +- Fixes for incorrect logic determining whether to send delegate messages about `PhotosViewController` dismissal ([#130](https://github.com/NYTimes/NYTPhotoViewer/pull/130), TKTK) +- Avoid applying a hacky iOS status bar bugfix on iOS 8.3+ (it appears to have been fixed then) ([#131](https://github.com/NYTimes/NYTPhotoViewer/issues/131)) +- Removed redundant Swift unit tests ([#128](https://github.com/NYTimes/NYTPhotoViewer/pull/128)) + ## [1.0.0](https://github.com/NYTimes/NYTPhotoViewer/releases/tag/1.0.0) Changes for users of the library in 1.0.0: From eff4f0834a2e05804325fb41f8f7e415664da2db Mon Sep 17 00:00:00 2001 From: Chris Dzombak Date: Tue, 19 Jan 2016 16:35:01 -0500 Subject: [PATCH 09/26] Track current dismissal is user-triggered; send delegate messages appropriately MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This follow-up to #130 fixes a bug wherein user-initiated dismissals via the Close/X button didn’t send delegate messages about the dismissal. closes #134 I would welcome alternative fixes that do not require tracking additional state. --- Pod/Classes/ios/NYTPhotosViewController.m | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Pod/Classes/ios/NYTPhotosViewController.m b/Pod/Classes/ios/NYTPhotosViewController.m index 877dc532..e38f42f8 100644 --- a/Pod/Classes/ios/NYTPhotosViewController.m +++ b/Pod/Classes/ios/NYTPhotosViewController.m @@ -53,6 +53,13 @@ - (instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER; @property (nonatomic, readonly) UIView *referenceViewForCurrentPhoto; @property (nonatomic, readonly) CGPoint boundsCenterPoint; +/** + * Tracks whether the current dismissal of this view controller is due to user interaction + * (an interactive pan or a tap on the Close button). + * Reset to `NO` when an interactive dismissal is not in progress. + */ +@property (nonatomic, getter=isCurrentDismissalUserTriggered) BOOL currentDismissalUserTriggered; + @end @implementation NYTPhotosViewController @@ -132,6 +139,8 @@ - (void)viewDidAppear:(BOOL)animated { if (!self.overlayWasHiddenBeforeTransition) { [self setOverlayViewHidden:NO animated:YES]; } + + self.currentDismissalUserTriggered = NO; } - (void)viewWillLayoutSubviews { @@ -243,6 +252,7 @@ - (void)updateOverlayInformation { } - (void)doneButtonTapped:(id)sender { + self.currentDismissalUserTriggered = YES; [self dismissViewControllerAnimated:YES completion:nil]; } @@ -335,6 +345,7 @@ - (void)didSingleTapWithGestureRecognizer:(UITapGestureRecognizer *)tapGestureRe - (void)didPanWithGestureRecognizer:(UIPanGestureRecognizer *)panGestureRecognizer { if (panGestureRecognizer.state == UIGestureRecognizerStateBegan) { + self.currentDismissalUserTriggered = YES; self.transitionController.forcesNonInteractiveDismissal = NO; [self dismissViewControllerAnimated:YES completion:nil]; } @@ -357,8 +368,8 @@ - (void)dismissViewControllerAnimated:(BOOL)animated completion:(void (^)(void)) [self setOverlayViewHidden:YES animated:animated]; // Cocoa convention is not to call delegate methods when you do something directly in code, - // so we'll not call delegate methods if this is a programmatic, noninteractive dismissal: - BOOL shouldSendDelegateMessages = !self.transitionController.forcesNonInteractiveDismissal; + // so we'll not call delegate methods if this is a programmatic dismissal: + BOOL const shouldSendDelegateMessages = self.isCurrentDismissalUserTriggered; if (shouldSendDelegateMessages && [self.delegate respondsToSelector:@selector(photosViewControllerWillDismiss:)]) { [self.delegate photosViewControllerWillDismiss:self]; @@ -372,6 +383,8 @@ - (void)dismissViewControllerAnimated:(BOOL)animated completion:(void (^)(void)) if (isStillOnscreen && !self.overlayWasHiddenBeforeTransition) { [self setOverlayViewHidden:NO animated:YES]; } + + self.currentDismissalUserTriggered = NO; if (!isStillOnscreen) { if (shouldSendDelegateMessages && [self.delegate respondsToSelector:@selector(photosViewControllerDidDismiss:)]) { From ae6aaa2f24ac2950905c2281b742b00848276f5f Mon Sep 17 00:00:00 2001 From: Chris Dzombak Date: Tue, 19 Jan 2016 16:35:12 -0500 Subject: [PATCH 10/26] [minor] Add VC dismissal `pragma mark` --- Pod/Classes/ios/NYTPhotosViewController.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Pod/Classes/ios/NYTPhotosViewController.m b/Pod/Classes/ios/NYTPhotosViewController.m index e38f42f8..4facb339 100644 --- a/Pod/Classes/ios/NYTPhotosViewController.m +++ b/Pod/Classes/ios/NYTPhotosViewController.m @@ -354,6 +354,8 @@ - (void)didPanWithGestureRecognizer:(UIPanGestureRecognizer *)panGestureRecogniz [self.transitionController didPanWithPanGestureRecognizer:panGestureRecognizer viewToPan:self.pageViewController.view anchorPoint:self.boundsCenterPoint]; } } + +#pragma mark - View Controller Dismissal - (void)dismissViewControllerAnimated:(BOOL)animated completion:(void (^)(void))completion { UIView *startingView; From 340fc0cb53bb12823c2dfa8a1186661e5ac58290 Mon Sep 17 00:00:00 2001 From: Chris Dzombak Date: Tue, 19 Jan 2016 16:40:28 -0500 Subject: [PATCH 11/26] Clarify documentation for dismissal delegate methods & notifications --- Pod/Classes/ios/NYTPhotosViewController.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Pod/Classes/ios/NYTPhotosViewController.h b/Pod/Classes/ios/NYTPhotosViewController.h index 10c29679..c94ae625 100644 --- a/Pod/Classes/ios/NYTPhotosViewController.h +++ b/Pod/Classes/ios/NYTPhotosViewController.h @@ -17,7 +17,19 @@ NS_ASSUME_NONNULL_BEGIN // All notifications will have the `NYTPhotosViewController` instance set as the object. extern NSString * const NYTPhotosViewControllerDidNavigateToPhotoNotification; + +/** + * Notification name issued when this `NYTPhotosViewController` is about to be dismissed. + * + * Includes the `NYTPhotosViewController` instance, as the notification's object. + */ extern NSString * const NYTPhotosViewControllerWillDismissNotification; + +/** + * Notification name issued when this `NYTPhotosViewController` has been dismissed. + * + * Includes the `NYTPhotosViewController` instance, as the notification's object. + */ extern NSString * const NYTPhotosViewControllerDidDismissNotification; @interface NYTPhotosViewController : UIViewController @@ -125,14 +137,15 @@ extern NSString * const NYTPhotosViewControllerDidDismissNotification; - (void)photosViewController:(NYTPhotosViewController *)photosViewController didNavigateToPhoto:(id )photo atIndex:(NSUInteger)photoIndex; /** - * Called immediately before the photos view controller is about to start dismissal. This will be the beginning of the interactive panning to dismiss, if it is enabled and performed. + * Called immediately before the `NYTPhotosViewController` is about to start a user-initiated dismissal. + * This will be the beginning of the interactive panning to dismiss, if it is enabled and performed. * * @param photosViewController The `NYTPhotosViewController` instance that sent the delegate message. */ - (void)photosViewControllerWillDismiss:(NYTPhotosViewController *)photosViewController; /** - * Called immediately after the photos view controller has dismissed. + * Called immediately after the photos view controller has been dismissed by the user. * * @param photosViewController The `NYTPhotosViewController` instance that sent the delegate message. */ From 506403f8581ecbe1c79949e8ccb16f36ded4d743 Mon Sep 17 00:00:00 2001 From: Chris Dzombak Date: Tue, 19 Jan 2016 16:40:47 -0500 Subject: [PATCH 12/26] Slightly improve docs for NYTPhotosViewControllerDidNavigateToPhotoNotification --- Pod/Classes/ios/NYTPhotosViewController.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Pod/Classes/ios/NYTPhotosViewController.h b/Pod/Classes/ios/NYTPhotosViewController.h index c94ae625..22d22dab 100644 --- a/Pod/Classes/ios/NYTPhotosViewController.h +++ b/Pod/Classes/ios/NYTPhotosViewController.h @@ -15,7 +15,11 @@ NS_ASSUME_NONNULL_BEGIN -// All notifications will have the `NYTPhotosViewController` instance set as the object. +/** + * Notification name issued when this `NYTPhotosViewController` navigates to a different photo. + * + * Includes the `NYTPhotosViewController` instance, as the notification's object. + */ extern NSString * const NYTPhotosViewControllerDidNavigateToPhotoNotification; /** From 57c15bf85357a1b7a40bb22804358f1e8559d506 Mon Sep 17 00:00:00 2001 From: Chris Dzombak Date: Tue, 19 Jan 2016 17:00:00 -0500 Subject: [PATCH 13/26] Add an initial release process document --- Documentation/Release Process.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Documentation/Release Process.md diff --git a/Documentation/Release Process.md b/Documentation/Release Process.md new file mode 100644 index 00000000..0bf01ec2 --- /dev/null +++ b/Documentation/Release Process.md @@ -0,0 +1,23 @@ +_While tagging a new version of a library and pushing it to CocoaPods is conceptually simple, there are several fine points which must not be forgotten to produce a polished product._ + +# NYTPhotoViewer Release Process + +- Review [the diff between `master` and `develop`](https://github.com/NYTimes/NYTPhotoViewer/compare/master...develop) to determine which part of the version number to increment, in accordance with [semantic versioning](http://semver.org/). +- Update [the Podspec](https://github.com/NYTimes/NYTPhotoViewer/blob/develop/NYTPhotoViewer.podspec) to the new version number. + - Make this change via a pull request to trigger notifications for those who watch the repository. +- Using [the diff](https://github.com/NYTimes/NYTPhotoViewer/compare/master...develop), [the commit history](https://github.com/NYTimes/NYTPhotoViewer/commits/develop), and any notes about `develop` which may have been written in the `CHANGELOG`, update [`CHANGELOG.md`](https://github.com/NYTimes/NYTPhotoViewer/blob/develop/CHANGELOG.md) with changes in the new version which may affect library users. + - When reviewing the commit history, searching for “Merge pull request” helps find changes which should appear in [the `CHANGELOG`](https://github.com/NYTimes/NYTPhotoViewer/blob/develop/CHANGELOG.md). +- Update any other documentation which still needs to be updated, given those changes. +- Create a pull request merging [`develop` into `master`](https://github.com/NYTimes/NYTPhotoViewer/compare/master...develop). Merge it yourself, immediately. +- Tag that merge commit with the new version number (eg. `1.0.0`). + - Before creating the tag, ensure your local `master` branch is up to date. + - After creating the tag, be sure to push the tags with `git push origin HEAD --tags` +- Create a Github release from the new version’s tag. Copy [the `CHANGELOG`](https://github.com/NYTimes/NYTPhotoViewer/blob/develop/CHANGELOG.md)’s Markdown content for this release into the Github release. +- Push the new Podspec to Cocoapods Trunk: `pod trunk push NYTPhotoViewer.podspec` + +## CocoaPods Trunk Setup + +Before you can use this process to push a release to CocoaPods: + +- Set up a CocoaPods Trunk account on your machine: [Getting setup with Trunk/Getting started](https://guides.cocoapods.org/making/getting-setup-with-trunk.html#getting-started) +- Become an owner for [NYTPhotoViewer](https://cocoapods.org/pods/NYTPhotoViewer). A current owner will need to run `pod trunk add-owner NYTPhotoViewer your.email@nytimes.com` From f272e46cf4248b25b146044508a72343cd4b1951 Mon Sep 17 00:00:00 2001 From: Chris Dzombak Date: Tue, 19 Jan 2016 17:18:58 -0500 Subject: [PATCH 14/26] Change release process to use Github Releases to create git tags --- Documentation/Release Process.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Documentation/Release Process.md b/Documentation/Release Process.md index 0bf01ec2..98d3e6b1 100644 --- a/Documentation/Release Process.md +++ b/Documentation/Release Process.md @@ -9,10 +9,7 @@ _While tagging a new version of a library and pushing it to CocoaPods is concept - When reviewing the commit history, searching for “Merge pull request” helps find changes which should appear in [the `CHANGELOG`](https://github.com/NYTimes/NYTPhotoViewer/blob/develop/CHANGELOG.md). - Update any other documentation which still needs to be updated, given those changes. - Create a pull request merging [`develop` into `master`](https://github.com/NYTimes/NYTPhotoViewer/compare/master...develop). Merge it yourself, immediately. -- Tag that merge commit with the new version number (eg. `1.0.0`). - - Before creating the tag, ensure your local `master` branch is up to date. - - After creating the tag, be sure to push the tags with `git push origin HEAD --tags` -- Create a Github release from the new version’s tag. Copy [the `CHANGELOG`](https://github.com/NYTimes/NYTPhotoViewer/blob/develop/CHANGELOG.md)’s Markdown content for this release into the Github release. +- Create a Github release, using the new version number (eg. `1.0.0`) as the tag, and the merge commit into `master` as the target. Copy [the `CHANGELOG`](https://raw.githubusercontent.com/NYTimes/NYTPhotoViewer/develop/CHANGELOG.md)’s Markdown content for this release into the Github release. - Push the new Podspec to Cocoapods Trunk: `pod trunk push NYTPhotoViewer.podspec` ## CocoaPods Trunk Setup From 03952128f096706cea4743020324bb72a05aaf07 Mon Sep 17 00:00:00 2001 From: Chris Dzombak Date: Tue, 26 Jan 2016 09:39:15 -0500 Subject: [PATCH 15/26] test floats for equality via ABS(-) method on PhotoViewController closes #133 --- Pod/Classes/ios/NYTPhotoViewController.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Pod/Classes/ios/NYTPhotoViewController.m b/Pod/Classes/ios/NYTPhotoViewController.m index 8f3f1ee8..5b9e0d7c 100644 --- a/Pod/Classes/ios/NYTPhotoViewController.m +++ b/Pod/Classes/ios/NYTPhotoViewController.m @@ -158,7 +158,8 @@ - (void)didDoubleTapWithGestureRecognizer:(UITapGestureRecognizer *)recognizer { CGFloat newZoomScale = self.scalingImageView.maximumZoomScale; - if ((self.scalingImageView.zoomScale - self.scalingImageView.maximumZoomScale) >= 0.0) { + if (self.scalingImageView.zoomScale >= self.scalingImageView.maximumZoomScale + || ABS(self.scalingImageView.zoomScale - self.scalingImageView.maximumZoomScale) <= 0.01) { newZoomScale = self.scalingImageView.minimumZoomScale; } From fc643039ebe9c7a15c090fe2e6e6e200ca72c6ea Mon Sep 17 00:00:00 2001 From: Danny Zlobinsky Date: Tue, 26 Jan 2016 09:50:17 -0500 Subject: [PATCH 16/26] Fix the use of tabs and add a comment explaining a workaround for #115 --- Pod/Classes/ios/NYTPhotoTransitionAnimator.m | 46 ++++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/Pod/Classes/ios/NYTPhotoTransitionAnimator.m b/Pod/Classes/ios/NYTPhotoTransitionAnimator.m index 97354eb2..aa80441d 100644 --- a/Pod/Classes/ios/NYTPhotoTransitionAnimator.m +++ b/Pod/Classes/ios/NYTPhotoTransitionAnimator.m @@ -224,30 +224,30 @@ + (UIView *)newAnimationViewFromView:(UIView *)view { if (!view) { return nil; } - + UIView *animationView; - - if (view.layer.contents) { - if ([view isKindOfClass:[UIImageView class]]) { - // The case of UIImageView is handled separately since the mere layer's contents (i.e. CGImage in this case) doesn't - // seem to contain proper informations about the image orientation for portrait images taken directly on the device. - animationView = [(UIImageView *)[[view class] alloc] initWithImage:((UIImageView *)view).image]; - animationView.bounds = view.bounds; - } - else { - animationView = [[UIView alloc] initWithFrame:view.frame]; - animationView.layer.contents = view.layer.contents; - animationView.layer.bounds = view.layer.bounds; - } - - animationView.layer.cornerRadius = view.layer.cornerRadius; - animationView.layer.masksToBounds = view.layer.masksToBounds; - animationView.contentMode = view.contentMode; - animationView.transform = view.transform; - } - else { - animationView = [view snapshotViewAfterScreenUpdates:YES]; - } + if (view.layer.contents) { + if ([view isKindOfClass:[UIImageView class]]) { + // The case of UIImageView is handled separately since the mere layer's contents (i.e. CGImage in this case) doesn't + // seem to contain proper informations about the image orientation for portrait images taken directly on the device. + // See https://github.com/NYTimes/NYTPhotoViewer/issues/115 + animationView = [(UIImageView *)[[view class] alloc] initWithImage:((UIImageView *)view).image]; + animationView.bounds = view.bounds; + } + else { + animationView = [[UIView alloc] initWithFrame:view.frame]; + animationView.layer.contents = view.layer.contents; + animationView.layer.bounds = view.layer.bounds; + } + + animationView.layer.cornerRadius = view.layer.cornerRadius; + animationView.layer.masksToBounds = view.layer.masksToBounds; + animationView.contentMode = view.contentMode; + animationView.transform = view.transform; + } + else { + animationView = [view snapshotViewAfterScreenUpdates:YES]; + } return animationView; } From cdb20068fdac69c027b6ad2317c9cd2bc7fddbc9 Mon Sep 17 00:00:00 2001 From: Chris Dzombak Date: Tue, 26 Jan 2016 09:56:13 -0500 Subject: [PATCH 17/26] =?UTF-8?q?Refactor=20out=20=E2=80=9CcurrentDismissa?= =?UTF-8?q?lUserTriggered=E2=80=9D=20property?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit per @bcapps feedback in https://github.com/NYTimes/NYTPhotoViewer/pull/137#discussion_r50186467 --- Pod/Classes/ios/NYTPhotosViewController.m | 25 ++++++++--------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/Pod/Classes/ios/NYTPhotosViewController.m b/Pod/Classes/ios/NYTPhotosViewController.m index 4facb339..f9acde85 100644 --- a/Pod/Classes/ios/NYTPhotosViewController.m +++ b/Pod/Classes/ios/NYTPhotosViewController.m @@ -53,13 +53,6 @@ - (instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER; @property (nonatomic, readonly) UIView *referenceViewForCurrentPhoto; @property (nonatomic, readonly) CGPoint boundsCenterPoint; -/** - * Tracks whether the current dismissal of this view controller is due to user interaction - * (an interactive pan or a tap on the Close button). - * Reset to `NO` when an interactive dismissal is not in progress. - */ -@property (nonatomic, getter=isCurrentDismissalUserTriggered) BOOL currentDismissalUserTriggered; - @end @implementation NYTPhotosViewController @@ -139,8 +132,6 @@ - (void)viewDidAppear:(BOOL)animated { if (!self.overlayWasHiddenBeforeTransition) { [self setOverlayViewHidden:NO animated:YES]; } - - self.currentDismissalUserTriggered = NO; } - (void)viewWillLayoutSubviews { @@ -158,6 +149,10 @@ - (UIStatusBarAnimation)preferredStatusBarUpdateAnimation { return UIStatusBarAnimationFade; } +- (void)dismissViewControllerAnimated:(BOOL)animated completion:(void (^)(void))completion { + [self dismissViewControllerAnimated:animated userInitiated:NO completion:completion]; +} + #pragma mark - NYTPhotosViewController - (instancetype)initWithPhotos:(NSArray *)photos { @@ -252,8 +247,7 @@ - (void)updateOverlayInformation { } - (void)doneButtonTapped:(id)sender { - self.currentDismissalUserTriggered = YES; - [self dismissViewControllerAnimated:YES completion:nil]; + [self dismissViewControllerAnimated:YES userInitiated:YES completion:nil]; } - (void)actionButtonTapped:(id)sender { @@ -345,9 +339,8 @@ - (void)didSingleTapWithGestureRecognizer:(UITapGestureRecognizer *)tapGestureRe - (void)didPanWithGestureRecognizer:(UIPanGestureRecognizer *)panGestureRecognizer { if (panGestureRecognizer.state == UIGestureRecognizerStateBegan) { - self.currentDismissalUserTriggered = YES; self.transitionController.forcesNonInteractiveDismissal = NO; - [self dismissViewControllerAnimated:YES completion:nil]; + [self dismissViewControllerAnimated:YES userInitiated:YES completion:nil]; } else { self.transitionController.forcesNonInteractiveDismissal = YES; @@ -357,7 +350,7 @@ - (void)didPanWithGestureRecognizer:(UIPanGestureRecognizer *)panGestureRecogniz #pragma mark - View Controller Dismissal -- (void)dismissViewControllerAnimated:(BOOL)animated completion:(void (^)(void))completion { +- (void)dismissViewControllerAnimated:(BOOL)animated userInitiated:(BOOL)isUserInitiated completion:(void (^)(void))completion { UIView *startingView; if (self.currentlyDisplayedPhoto.image || self.currentlyDisplayedPhoto.placeholderImage || self.currentlyDisplayedPhoto.imageData) { startingView = self.currentPhotoViewController.scalingImageView.imageView; @@ -371,7 +364,7 @@ - (void)dismissViewControllerAnimated:(BOOL)animated completion:(void (^)(void)) // Cocoa convention is not to call delegate methods when you do something directly in code, // so we'll not call delegate methods if this is a programmatic dismissal: - BOOL const shouldSendDelegateMessages = self.isCurrentDismissalUserTriggered; + BOOL const shouldSendDelegateMessages = isUserInitiated; if (shouldSendDelegateMessages && [self.delegate respondsToSelector:@selector(photosViewControllerWillDismiss:)]) { [self.delegate photosViewControllerWillDismiss:self]; @@ -385,8 +378,6 @@ - (void)dismissViewControllerAnimated:(BOOL)animated completion:(void (^)(void)) if (isStillOnscreen && !self.overlayWasHiddenBeforeTransition) { [self setOverlayViewHidden:NO animated:YES]; } - - self.currentDismissalUserTriggered = NO; if (!isStillOnscreen) { if (shouldSendDelegateMessages && [self.delegate respondsToSelector:@selector(photosViewControllerDidDismiss:)]) { From 93eee38cdec418020b586e28b9d8eec501c9b714 Mon Sep 17 00:00:00 2001 From: Chris Dzombak Date: Tue, 26 Jan 2016 10:09:59 -0500 Subject: [PATCH 18/26] [minor] remove extra whitespace in tests --- Example/Tests/NYTPhotosViewControllerTests.m | 1 - 1 file changed, 1 deletion(-) diff --git a/Example/Tests/NYTPhotosViewControllerTests.m b/Example/Tests/NYTPhotosViewControllerTests.m index 91d9630b..2066904a 100644 --- a/Example/Tests/NYTPhotosViewControllerTests.m +++ b/Example/Tests/NYTPhotosViewControllerTests.m @@ -13,7 +13,6 @@ #import "NYTExamplePhoto.h" @interface NYTPhotosViewControllerTests : XCTestCase - @end @implementation NYTPhotosViewControllerTests From 16bd3c040b69bd5b2b125d1b8f15d1bb03e272ba Mon Sep 17 00:00:00 2001 From: Chris Dzombak Date: Tue, 26 Jan 2016 10:13:02 -0500 Subject: [PATCH 19/26] Remove Swift-Tests target from Example's Podfile This should've been covered in https://github.com/NYTimes/NYTPhotoViewer/pull/128 --- Example/Podfile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Example/Podfile b/Example/Podfile index da2c53b0..3e8d41bc 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -12,8 +12,3 @@ end target 'NYTPhotoViewer-Swift', :exclusive => true do pod "NYTPhotoViewer/AnimatedGifSupport", :path => "../" end - -target 'NYTPhotoViewer-SwiftTests', :exclusive => true do - pod "NYTPhotoViewer/AnimatedGifSupport", :path => "../" - pod 'OCMock', '~> 3.2' -end \ No newline at end of file From f41d2dc6b52f5f0921758476382d88999337368e Mon Sep 17 00:00:00 2001 From: Chris Dzombak Date: Tue, 26 Jan 2016 10:43:34 -0500 Subject: [PATCH 20/26] [minor] remove whitespace from PhotosOverlayViewTests --- Example/Tests/NYTPhotosOverlayViewTests.m | 1 - 1 file changed, 1 deletion(-) diff --git a/Example/Tests/NYTPhotosOverlayViewTests.m b/Example/Tests/NYTPhotosOverlayViewTests.m index 8a0e7e45..c7cbb3bd 100644 --- a/Example/Tests/NYTPhotosOverlayViewTests.m +++ b/Example/Tests/NYTPhotosOverlayViewTests.m @@ -12,7 +12,6 @@ #import @interface NYTPhotosOverlayViewTests : XCTestCase - @end @implementation NYTPhotosOverlayViewTests From 2b5ccdd15ff0f1e223f917b0def4b2881237be95 Mon Sep 17 00:00:00 2001 From: Chris Dzombak Date: Tue, 26 Jan 2016 10:44:03 -0500 Subject: [PATCH 21/26] Add basic tests for dismissal user-initiated flag --- Example/Tests/NYTPhotosViewControllerTests.m | 49 ++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/Example/Tests/NYTPhotosViewControllerTests.m b/Example/Tests/NYTPhotosViewControllerTests.m index 2066904a..4a002f1a 100644 --- a/Example/Tests/NYTPhotosViewControllerTests.m +++ b/Example/Tests/NYTPhotosViewControllerTests.m @@ -9,12 +9,22 @@ @import UIKit; @import XCTest; +#import + #import #import "NYTExamplePhoto.h" @interface NYTPhotosViewControllerTests : XCTestCase @end +@interface NYTPhotosViewController (Testing) + +- (void)dismissViewControllerAnimated:(BOOL)animated userInitiated:(BOOL)isUserInitiated completion:(void (^)(void))completion; +- (void)didPanWithGestureRecognizer:(UIPanGestureRecognizer *)panGestureRecognizer; +- (void)doneButtonTapped:(id)sender; + +@end + @implementation NYTPhotosViewControllerTests - (void)testPanGestureRecognizerExistsAfterInitialization { @@ -211,6 +221,45 @@ - (void)testPageViewIsntLoadedAfterInit { XCTAssertFalse(photosViewController.pageViewController.isViewLoaded); } +- (void)testDoneButtonDismissalUserInitiatedFlagIsTrue { + NSArray *photos = [self newTestPhotos]; + NYTPhotosViewController *photosViewController = [[NYTPhotosViewController alloc] initWithPhotos:photos]; + + id photosVCMock = OCMPartialMock(photosViewController); + OCMExpect([photosVCMock dismissViewControllerAnimated:[OCMArg isEqual:OCMOCK_VALUE(YES)] userInitiated:[OCMArg isEqual:OCMOCK_VALUE(YES)] completion:[OCMArg isNil]]); + + [photosViewController doneButtonTapped:nil]; + + OCMVerifyAll(photosVCMock); +} + +- (void)testGestureBasedDismissalUserInitiatedFlagIsTrue { + NSArray *photos = [self newTestPhotos]; + NYTPhotosViewController *photosViewController = [[NYTPhotosViewController alloc] initWithPhotos:photos]; + + id photosVCMock = OCMPartialMock(photosViewController); + OCMExpect([photosVCMock dismissViewControllerAnimated:[OCMArg isEqual:OCMOCK_VALUE(YES)] userInitiated:[OCMArg isEqual:OCMOCK_VALUE(YES)] completion:[OCMArg isNil]]); + + id gestureRecognizerMock = OCMClassMock([UIPanGestureRecognizer class]); + OCMStub([gestureRecognizerMock state]).andReturn(UIGestureRecognizerStateBegan); + + [photosViewController didPanWithGestureRecognizer:gestureRecognizerMock]; + + OCMVerifyAll(photosVCMock); +} + +- (void)testProgrammaticDismissalUserInitiatedFlagIsFalse { + NSArray *photos = [self newTestPhotos]; + NYTPhotosViewController *photosViewController = [[NYTPhotosViewController alloc] initWithPhotos:photos]; + + id photosVCMock = OCMPartialMock(photosViewController); + OCMExpect([photosVCMock dismissViewControllerAnimated:[OCMArg isEqual:OCMOCK_VALUE(YES)] userInitiated:[OCMArg isEqual:OCMOCK_VALUE(NO)] completion:[OCMArg isNil]]); + + [photosViewController dismissViewControllerAnimated:YES completion:nil]; + + OCMVerifyAll(photosVCMock); +} + #pragma mark - Helpers - (NSArray *)newTestPhotos { From 922bdb0d5bab53221f5d13fe36fd46f162b04b4a Mon Sep 17 00:00:00 2001 From: Chris Dzombak Date: Tue, 26 Jan 2016 10:57:13 -0500 Subject: [PATCH 22/26] Call `-stopMocking` fter verifying each PhotosVC mock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes no difference re: the testing glitch I’m seeing in https://github.com/NYTimes/NYTPhotoViewer/pull/137#issuecomment-175083986 . --- Example/Tests/NYTPhotosViewControllerTests.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Example/Tests/NYTPhotosViewControllerTests.m b/Example/Tests/NYTPhotosViewControllerTests.m index 4a002f1a..81a5866e 100644 --- a/Example/Tests/NYTPhotosViewControllerTests.m +++ b/Example/Tests/NYTPhotosViewControllerTests.m @@ -231,6 +231,7 @@ - (void)testDoneButtonDismissalUserInitiatedFlagIsTrue { [photosViewController doneButtonTapped:nil]; OCMVerifyAll(photosVCMock); + [photosVCMock stopMocking]; } - (void)testGestureBasedDismissalUserInitiatedFlagIsTrue { @@ -246,6 +247,7 @@ - (void)testGestureBasedDismissalUserInitiatedFlagIsTrue { [photosViewController didPanWithGestureRecognizer:gestureRecognizerMock]; OCMVerifyAll(photosVCMock); + [photosVCMock stopMocking]; } - (void)testProgrammaticDismissalUserInitiatedFlagIsFalse { @@ -258,6 +260,7 @@ - (void)testProgrammaticDismissalUserInitiatedFlagIsFalse { [photosViewController dismissViewControllerAnimated:YES completion:nil]; OCMVerifyAll(photosVCMock); + [photosVCMock stopMocking]; } #pragma mark - Helpers From ced28be57ecb5c2f86630f7511cf8a55a261e713 Mon Sep 17 00:00:00 2001 From: Chris Dzombak Date: Tue, 26 Jan 2016 12:05:56 -0500 Subject: [PATCH 23/26] Use OCMExpect() properly with primitive types in PhotosVCTests --- Example/Tests/NYTPhotosViewControllerTests.m | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Example/Tests/NYTPhotosViewControllerTests.m b/Example/Tests/NYTPhotosViewControllerTests.m index 81a5866e..9573daaa 100644 --- a/Example/Tests/NYTPhotosViewControllerTests.m +++ b/Example/Tests/NYTPhotosViewControllerTests.m @@ -226,12 +226,11 @@ - (void)testDoneButtonDismissalUserInitiatedFlagIsTrue { NYTPhotosViewController *photosViewController = [[NYTPhotosViewController alloc] initWithPhotos:photos]; id photosVCMock = OCMPartialMock(photosViewController); - OCMExpect([photosVCMock dismissViewControllerAnimated:[OCMArg isEqual:OCMOCK_VALUE(YES)] userInitiated:[OCMArg isEqual:OCMOCK_VALUE(YES)] completion:[OCMArg isNil]]); + OCMExpect([photosVCMock dismissViewControllerAnimated:YES userInitiated:YES completion:[OCMArg isNil]]); [photosViewController doneButtonTapped:nil]; OCMVerifyAll(photosVCMock); - [photosVCMock stopMocking]; } - (void)testGestureBasedDismissalUserInitiatedFlagIsTrue { @@ -239,7 +238,7 @@ - (void)testGestureBasedDismissalUserInitiatedFlagIsTrue { NYTPhotosViewController *photosViewController = [[NYTPhotosViewController alloc] initWithPhotos:photos]; id photosVCMock = OCMPartialMock(photosViewController); - OCMExpect([photosVCMock dismissViewControllerAnimated:[OCMArg isEqual:OCMOCK_VALUE(YES)] userInitiated:[OCMArg isEqual:OCMOCK_VALUE(YES)] completion:[OCMArg isNil]]); + OCMExpect([photosVCMock dismissViewControllerAnimated:YES userInitiated:YES completion:[OCMArg isNil]]); id gestureRecognizerMock = OCMClassMock([UIPanGestureRecognizer class]); OCMStub([gestureRecognizerMock state]).andReturn(UIGestureRecognizerStateBegan); @@ -247,7 +246,6 @@ - (void)testGestureBasedDismissalUserInitiatedFlagIsTrue { [photosViewController didPanWithGestureRecognizer:gestureRecognizerMock]; OCMVerifyAll(photosVCMock); - [photosVCMock stopMocking]; } - (void)testProgrammaticDismissalUserInitiatedFlagIsFalse { @@ -255,12 +253,11 @@ - (void)testProgrammaticDismissalUserInitiatedFlagIsFalse { NYTPhotosViewController *photosViewController = [[NYTPhotosViewController alloc] initWithPhotos:photos]; id photosVCMock = OCMPartialMock(photosViewController); - OCMExpect([photosVCMock dismissViewControllerAnimated:[OCMArg isEqual:OCMOCK_VALUE(YES)] userInitiated:[OCMArg isEqual:OCMOCK_VALUE(NO)] completion:[OCMArg isNil]]); + OCMExpect([photosVCMock dismissViewControllerAnimated:YES userInitiated:NO completion:[OCMArg isNil]]); [photosViewController dismissViewControllerAnimated:YES completion:nil]; OCMVerifyAll(photosVCMock); - [photosVCMock stopMocking]; } #pragma mark - Helpers From c318d3b7e6cdcdbfa4c283396ae81cb8804bf501 Mon Sep 17 00:00:00 2001 From: Chris Dzombak Date: Tue, 26 Jan 2016 14:26:09 -0500 Subject: [PATCH 24/26] Use newer verify-after-running OCMock syntax in PhotosVCTests per @soundsokay feedback in https://github.com/NYTimes/NYTPhotoViewer/pull/137#commitcomment-15686319 --- Example/Tests/NYTPhotosViewControllerTests.m | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Example/Tests/NYTPhotosViewControllerTests.m b/Example/Tests/NYTPhotosViewControllerTests.m index 9573daaa..641ff94b 100644 --- a/Example/Tests/NYTPhotosViewControllerTests.m +++ b/Example/Tests/NYTPhotosViewControllerTests.m @@ -226,11 +226,10 @@ - (void)testDoneButtonDismissalUserInitiatedFlagIsTrue { NYTPhotosViewController *photosViewController = [[NYTPhotosViewController alloc] initWithPhotos:photos]; id photosVCMock = OCMPartialMock(photosViewController); - OCMExpect([photosVCMock dismissViewControllerAnimated:YES userInitiated:YES completion:[OCMArg isNil]]); [photosViewController doneButtonTapped:nil]; - OCMVerifyAll(photosVCMock); + OCMVerify([photosVCMock dismissViewControllerAnimated:YES userInitiated:YES completion:[OCMArg any]]); } - (void)testGestureBasedDismissalUserInitiatedFlagIsTrue { @@ -238,14 +237,13 @@ - (void)testGestureBasedDismissalUserInitiatedFlagIsTrue { NYTPhotosViewController *photosViewController = [[NYTPhotosViewController alloc] initWithPhotos:photos]; id photosVCMock = OCMPartialMock(photosViewController); - OCMExpect([photosVCMock dismissViewControllerAnimated:YES userInitiated:YES completion:[OCMArg isNil]]); id gestureRecognizerMock = OCMClassMock([UIPanGestureRecognizer class]); OCMStub([gestureRecognizerMock state]).andReturn(UIGestureRecognizerStateBegan); [photosViewController didPanWithGestureRecognizer:gestureRecognizerMock]; - OCMVerifyAll(photosVCMock); + OCMVerify([photosVCMock dismissViewControllerAnimated:YES userInitiated:YES completion:[OCMArg any]]); } - (void)testProgrammaticDismissalUserInitiatedFlagIsFalse { @@ -253,11 +251,10 @@ - (void)testProgrammaticDismissalUserInitiatedFlagIsFalse { NYTPhotosViewController *photosViewController = [[NYTPhotosViewController alloc] initWithPhotos:photos]; id photosVCMock = OCMPartialMock(photosViewController); - OCMExpect([photosVCMock dismissViewControllerAnimated:YES userInitiated:NO completion:[OCMArg isNil]]); [photosViewController dismissViewControllerAnimated:YES completion:nil]; - OCMVerifyAll(photosVCMock); + OCMVerify([photosVCMock dismissViewControllerAnimated:YES userInitiated:NO completion:[OCMArg any]]); } #pragma mark - Helpers From ffdbfacebc9d757ba074fbc3c805bf3c1faec592 Mon Sep 17 00:00:00 2001 From: Chris Dzombak Date: Tue, 26 Jan 2016 14:41:51 -0500 Subject: [PATCH 25/26] Bump podspec to version 1.0.1 --- NYTPhotoViewer.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NYTPhotoViewer.podspec b/NYTPhotoViewer.podspec index 16804f8f..5fe5a09b 100644 --- a/NYTPhotoViewer.podspec +++ b/NYTPhotoViewer.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "NYTPhotoViewer" - s.version = "1.0.0" + s.version = "1.0.1" 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. From 158a8b4ffec11c3c4653a683d692546a1671d4d4 Mon Sep 17 00:00:00 2001 From: Chris Dzombak Date: Tue, 26 Jan 2016 14:45:29 -0500 Subject: [PATCH 26/26] Update CHANGELOG for v1.0.1 --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a85c4a59..07631610 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,14 @@ ## `develop` +_This space intentionally left blank._ + +## [1.0.1](https://github.com/NYTimes/NYTPhotoViewer/releases/tag/1.0.1) + Changes for users of the library currently on `develop`: -- Fixes for incorrect logic determining whether to send delegate messages about `PhotosViewController` dismissal ([#130](https://github.com/NYTimes/NYTPhotoViewer/pull/130), TKTK) +- Fixes for incorrect logic determining whether to send delegate messages about `PhotosViewController` dismissal ([#130](https://github.com/NYTimes/NYTPhotoViewer/pull/130), [#137](https://github.com/NYTimes/NYTPhotoViewer/pull/137)) +- Avoid testing floats for equality in PhotoViewController ([#135](https://github.com/NYTimes/NYTPhotoViewer/pull/135)) +- Fix orientation issue with reference view of type UIImageView ([#116](https://github.com/NYTimes/NYTPhotoViewer/pull/116), [#145](https://github.com/NYTimes/NYTPhotoViewer/pull/145)) - Avoid applying a hacky iOS status bar bugfix on iOS 8.3+ (it appears to have been fixed then) ([#131](https://github.com/NYTimes/NYTPhotoViewer/issues/131)) - Removed redundant Swift unit tests ([#128](https://github.com/NYTimes/NYTPhotoViewer/pull/128))