aa23c953ca
* Add support for macOS - Add PlayerView for switching between UIKit and AppKit view class - Remove imports of UIKit - Replace UIView uses with PlayerView - Add #if for cases that are not supported on macOS - Update podspec for macOS specific configuration * Add documentation for PlayerView * Fix brace placement * Lower macOS minimum deployment target * Change type oif RegularPlayerView to PlayerView * Updated parameters to support macOS and tvOS * Switch to canImport() from os() * Revert canImport() back to os() in on instance
19 lines
587 B
Swift
19 lines
587 B
Swift
//
|
|
// PlayerView.swift
|
|
// PlayerKit
|
|
//
|
|
// Created by Balatbat, Bryant on 12/20/17.
|
|
//
|
|
|
|
/// This file creates a `typealias` called `PlayerView` that determines which core view component to use depending on
|
|
/// which platform the binary is being compiled for. If iOS or tvOS, `UIKit` will be imported and `UIView` will be used.
|
|
/// otherwise, if macOS is used, `AppKit` will be imported and `NSView` will be used.
|
|
|
|
#if canImport(UIKit)
|
|
import UIKit
|
|
public typealias PlayerView = UIView
|
|
#elseif canImport(AppKit)
|
|
import AppKit
|
|
public typealias PlayerView = NSView
|
|
#endif
|