-
Notifications
You must be signed in to change notification settings - Fork 383
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 #262 from NYTimes/feature/interstial-views
Support Interstitial Views
- Loading branch information
Showing
21 changed files
with
409 additions
and
111 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
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,31 @@ | ||
// | ||
// NYTInterstitialViewController.h | ||
// NYTPhotoViewer | ||
// | ||
// Created by Howarth, Craig on 4/17/18. | ||
// Copyright © 2018 NYTimes. All rights reserved. | ||
// | ||
|
||
@import UIKit; | ||
#import "NYTPhotoViewerContainer.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
/** | ||
* The view controller controlling the display of a interstitial view. | ||
*/ | ||
@interface NYTInterstitialViewController : UIViewController <NYTPhotoViewerContainer> | ||
|
||
/** | ||
* The designated initializer that takes an interstitial view. | ||
* | ||
* @param view The view object that this view controller manages. | ||
* @param itemIndex The index of this view controller in the photo viewer collection. | ||
* | ||
* @return A fully initialized object. | ||
*/ | ||
- (instancetype)initWithView:(nullable UIView *)view itemIndex:(NSUInteger)itemIndex NS_DESIGNATED_INITIALIZER; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
Oops, something went wrong.