Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/nytm/ios-photo-viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
bcapps committed Mar 27, 2015
2 parents 2f1eefd + 5157b48 commit e7231b4
Show file tree
Hide file tree
Showing 31 changed files with 2,591 additions and 2,718 deletions.
2 changes: 0 additions & 2 deletions Example/NYTPhotoViewer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; };
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 = "<group>"; };
B1CF36C351772D91C5ADADDE /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
B5B252DF1A8BE10B00E9973E /* NYTExamplePhoto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NYTExamplePhoto.h; sourceTree = "<group>"; };
B5B252E01A8BE10B00E9973E /* NYTExamplePhoto.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NYTExamplePhoto.m; sourceTree = "<group>"; };
B5DC9D811A9D04D300F4F81F /* NYTPhotosViewControllerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NYTPhotosViewControllerTests.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -215,7 +214,6 @@
children = (
C3A795E41A9CE3AA00A5AF55 /* NYTPhotoViewer.podspec */,
C260A188D0E255B25171088B /* README.md */,
B1CF36C351772D91C5ADADDE /* LICENSE */,
);
name = "Podspec Metadata";
sourceTree = "<group>";
Expand Down
12 changes: 6 additions & 6 deletions Example/NYTPhotoViewer/Base.lproj/Main_iPhone.storyboard
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6254" systemVersion="14C109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="vXZ-lx-hvc">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6751" systemVersion="14C1514" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="vXZ-lx-hvc">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6247"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6736"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
</dependencies>
<scenes>
Expand All @@ -19,12 +19,12 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="zGH-LE-XPk" userLabel="ImageButton">
<rect key="frame" x="85" y="228" width="150" height="112"/>
<rect key="frame" x="85" y="234" width="150" height="101"/>
<constraints>
<constraint firstAttribute="width" secondItem="zGH-LE-XPk" secondAttribute="height" multiplier="206:153" id="3NK-Qh-qg7"/>
<constraint firstAttribute="width" secondItem="zGH-LE-XPk" secondAttribute="height" multiplier="80:54" id="dgz-gP-jPm"/>
<constraint firstAttribute="width" constant="150" id="sED-Db-UzQ"/>
</constraints>
<state key="normal" title="Button" image="testImage">
<state key="normal" title="Button" image="NYTimesBuilding">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
Expand All @@ -47,7 +47,7 @@
</scene>
</scenes>
<resources>
<image name="testImage" width="769" height="612"/>
<image name="NYTimesBuilding" width="800" height="540"/>
</resources>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
"scale" : "1x",
"filename" : "NYTimesBuilding.jpg"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "testImagePlaceholder@2x.png"
"filename" : "NYTimesBuilding@2x.jpg"
},
{
"idiom" : "universal",
"scale" : "3x",
"filename" : "testImagePlaceholder@3x.png"
"filename" : "NYTimesBuilding@3x.jpg"
}
],
"info" : {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "test@2x.png"
"filename" : "NYTimesBuildingPlaceholder@2x.jpg"
},
{
"idiom" : "universal",
"scale" : "3x",
"filename" : "file0001110781475-1-1.png"
"filename" : "[email protected]"
}
],
"info" : {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
7 changes: 4 additions & 3 deletions Example/NYTPhotoViewer/NYTViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ - (void)updateImagesOnPhotosViewController:(NYTPhotosViewController *)photosView
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(updateImageDelay * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
for (NYTExamplePhoto *photo in photos) {
if (!photo.image) {
photo.image = [UIImage imageNamed:@"testImage"];
// Photo credit: Nic Lehoux
photo.image = [UIImage imageNamed:@"NYTimesBuilding"];
[photosViewController updateImageForPhoto:photo];
}
}
Expand All @@ -52,13 +53,13 @@ + (NSArray *)newTestPhotos {
for (int i = 0; i < 5; i++) {
NYTExamplePhoto *photo = [[NYTExamplePhoto alloc] init];

photo.image = [UIImage imageNamed:@"testImage"];
photo.image = [UIImage imageNamed:@"NYTimesBuilding"];
if (i == NYTViewControllerCustomEverythingPhotoIndex || i == NYTViewControllerDefaultLoadingSpinnerPhotoIndex) {
photo.image = nil;
}

if (i == NYTViewControllerCustomEverythingPhotoIndex) {
photo.placeholderImage = [UIImage imageNamed:@"testImagePlaceholder"];
photo.placeholderImage = [UIImage imageNamed:@"NYTimesBuildingPlaceholder"];
}

photo.attributedCaptionTitle = [[NSAttributedString alloc] initWithString:@(i + 1).stringValue attributes:@{NSForegroundColorAttributeName: [UIColor whiteColor]}];
Expand Down
4 changes: 2 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- NYTPhotoViewer (0.1.0)
- NYTPhotoViewer (0.1.2)
- OCMock (3.1.2)

DEPENDENCIES:
Expand All @@ -11,7 +11,7 @@ EXTERNAL SOURCES:
:path: ../

SPEC CHECKSUMS:
NYTPhotoViewer: 9d60a48ad2492ce1c13d69fdb62e8429e287c145
NYTPhotoViewer: 45abe0164f8f7b8f5172fe9809847845637c5a9f
OCMock: ecdd510b73ef397f2f97274785c1e87fd147c49f

COCOAPODS: 0.35.0
32 changes: 8 additions & 24 deletions Example/Pods/Local Podspecs/NYTPhotoViewer.podspec

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Example/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e7231b4

Please sign in to comment.