No description, website, or topics provided.
Clone or download
Latest commit 49a63fa Oct 26, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Carthage/PictureInPicture update 4.2 Oct 26, 2018
Example update recommended settings Oct 26, 2018
PictureInPicture converted Oct 26, 2018
README image Jun 16, 2017
.gitignore ignore Jul 25, 2017
.swift-version swift version Oct 18, 2017
.travis.yml Initial commit Jun 15, 2017
CHANGELOG.md add changelog Aug 10, 2017
Gemfile add changelog Aug 10, 2017
Gemfile.lock add changelog Aug 10, 2017
LICENSE license Jun 16, 2017
PictureInPicture.podspec 0.3.0 Oct 18, 2017
README.md Update README.md Oct 18, 2017
_Pods.xcodeproj Initial commit Jun 15, 2017

README.md

PictureInPicture

Platform Language CocoaPods Carthage compatible License

ScreenShot

Usage

Configure

If you want to change from default value.

let shadowConfig = PictureInPicture.ShadowConfig(color: .black, offset: .zero, radius: 10, opacity: 1)
PictureInPicture.configure(movable: true,
                           scale: 0.3,
                           margin: 10,
                           defaultEdge: .left,
                           shadowConfig: shadowConfig)

Default Config

PictureInPicture.configure(movable: true,
                           scale: 0.2,
                           margin: 8,
                           defaultEdge: .right,
                           shadowConfig: .default)

Default Shadow Config

ShadowConfig(color: .black, offset: .zero, radius: 5, opacity: 0.5)

Main Functions

PictureInPicture.shared.present(with: viewController) // Present
PictureInPicture.shared.dismiss()                     // Dismiss
PictureInPicture.shared.makeSmaller()                 // Make Smaller
PictureInPicture.shared.makeLarger()                  // Make Larger
PictureInPicture.shared.presentedViewController       // Get presented ViewController

Notifications

  • PictureInPictureMadeSmaller
  • PictureInPictureMadeLarger
  • PictureInPictureDidBeginMakingSmaller
  • PictureInPictureDidBeginMakingLarger
  • PictureInPictureMoved
    • PictureInPictureOldCornerUserInfoKey # PictureInPicture.Corner
    • PictureInPictureNewCornerUserInfoKey # PictureInPicture.Corner
  • PictureInPictureDismissed

Other Constants

  • UIWindowLevelPictureInPicture

Installation

Via CocoaPods

pod "PictureInPicture"

Via Carthage

github "malt03/PictureInPicture"

Author

Koji Murata, malt.koji@gmail.com

License

PictureInPicture is available under the MIT license. See the LICENSE file for more info.