Skip to content

Commit

Permalink
[MobilePlayerOverlayViewController] Add public mobilePlayer property
Browse files Browse the repository at this point in the history
So that an overlay can access its player easily.
  • Loading branch information
isair committed Dec 10, 2015
1 parent 661e5c2 commit 5a61530
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions MobilePlayer/MobilePlayerOverlayViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ protocol MobilePlayerOverlayViewControllerDelegate: class {
public class MobilePlayerOverlayViewController: UIViewController {
weak var delegate: MobilePlayerOverlayViewControllerDelegate?

/// The MobilePlayerViewController instance that the overlay is being shown by.
/// It's value is nil if the overlay is not being shown at the time this property is accessed.
public var mobilePlayer: MobilePlayerViewController? {
return delegate as? MobilePlayerViewController
}

/// Causes the view controller's view to be removed from on top of player content if it is being displayed.
public func dismiss() {
delegate?.dismissMobilePlayerOverlayViewController(self)
Expand Down

0 comments on commit 5a61530

Please sign in to comment.