DraggableFloatingViewController allows you to play videos on a floating mini window at the bottom of your screen from sites like YouTube, Vimeo & Facebook or custom video , yes you have to prepare your video view for that.
The view will animate the view just like Youtube mobile app, while tapping on video a UIView pops up from right corner of the screen and the view can be dragged to right corner through Pan Gesture and more features are there as Youtube iOS app
override func viewDidLoad() {
self.setupViewsWithVideoView(yourMoivePlayer.view, //UIView
videoViewHeight: yourPlayerHeight, //CGFloat
minimizeButton: yourButton //UIButton
)
// add your view to bodyView
self.bodyView.addSubview(yourView)
}
func showSecondController() {
removeDraggableFloatingViewController()
self.videoViewController = VideoDetailViewController()
self.videoViewController.delegate = self
self.videoViewController.showVideoViewControllerOnParentVC(self)
}
func removeDraggableFloatingViewController() {
if self.videoViewController != nil {
self.videoViewController.removeAllViews()
self.videoViewController = nil
}
}
To disable swipe down gesture of Notification Center, you need to edit "info.plist" to hide status bar. http://stackoverflow.com/questions/18059703/cannot-hide-status-bar-in-ios7
override func didExpand() {
showVideoControl()
}
override func didMinimize() {
hideVideoControl()
}
If you want to use this, you have to check this demo app.