This file contains hidden or 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
| import UIKit | |
| class FourColumnsContainerViewController: UIViewController { | |
| let outerSplitViewController = UISplitViewController(style: .tripleColumn) | |
| let innerSplitViewController = UISplitViewController(style: .doubleColumn) | |
| let primary = makeContentViewController("App") | |
| let secondary = makeContentViewController("Files") | |
| let mainContent = makeContentViewController("File Content") | |
| let inspector = makeContentViewController("Inspector") |
This file contains hidden or 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
| class FairPlayer: AVPlayer { | |
| private let queue = DispatchQueue(label: "com.icapps.fairplay.queue") | |
| func play(asset: AVURLAsset) { | |
| // Set the resource loader delegate to this class. The `resourceLoader`'s delegate will be | |
| // triggered when FairPlay handling is required. | |
| asset.resourceLoader.setDelegate(self, queue: queue) | |
| // Load the asset in the player. |
This file contains hidden or 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
| import Foundation | |
| extension UIViewController { | |
| class func fromStoryboard(name: String, identifier: String? = .None, bundle: NSBundle? = .None) -> Self? { | |
| return fromStoryboardHelper(self, name: name, identifier: identifier, bundle: bundle) | |
| } | |
| private class func fromStoryboardHelper<T: UIViewController>(type: T.Type, name: String, identifier: String?, bundle: NSBundle?) -> T? { | |
| if let identifier = identifier { |