Latest 0.3.0
Homepage https://github.com/malt03/PictureInPicture
License MIT
Platforms ios 8.0
Authors

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, [email protected]

License

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

Latest podspec

{
    "name": "PictureInPicture",
    "version": "0.3.0",
    "summary": "Picture in Picture.",
    "description": "Picture in Picture with your ViewController.",
    "homepage": "https://github.com/malt03/PictureInPicture",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Koji Murata": "[email protected]"
    },
    "source": {
        "git": "https://github.com/malt03/PictureInPicture.git",
        "tag": "0.3.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "PictureInPicture/Classes/**/*",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This