-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #281 from nytimes/develop
Merge master into develop
- Loading branch information
Showing
30 changed files
with
562 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// | ||
// PhotoItem.swift | ||
// NYTPhotoViewer | ||
// | ||
// Created by Chris Dzombak on 2/2/17. | ||
// Copyright © 2017 NYTimes. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
/// A photo item can either be an image or a view | ||
enum PhotoItemType { | ||
case image | ||
case view | ||
} | ||
|
||
/// A photo may often be represented in a Swift application as a value type. | ||
struct PhotoItem { | ||
// This would usually be a URL, but for this demo we load images from the bundle. | ||
let name: String | ||
let summary: String | ||
let credit: String | ||
let itemType: PhotoItemType | ||
let identifier: Int | ||
|
||
init(name: String = "", summary: String = "", credit: String = "", itemType: PhotoItemType, identifier: Int) { | ||
self.name = name | ||
self.summary = summary | ||
self.credit = credit | ||
self.itemType = itemType | ||
self.identifier = identifier | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.