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)
PictureInPicture.configure(movable: true,
scale: 0.2,
margin: 8,
defaultEdge: .right,
shadowConfig: .default)
ShadowConfig(color: .black, offset: .zero, radius: 5, opacity: 0.5)
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
- PictureInPictureMadeSmaller
- PictureInPictureMadeLarger
- PictureInPictureDidBeginMakingSmaller
- PictureInPictureDidBeginMakingLarger
- PictureInPictureMoved
- PictureInPictureOldCornerUserInfoKey # PictureInPicture.Corner
- PictureInPictureNewCornerUserInfoKey # PictureInPicture.Corner
- PictureInPictureDismissed
- UIWindowLevelPictureInPicture
pod "PictureInPicture"
github "malt03/PictureInPicture"
Koji Murata, [email protected]
PictureInPicture is available under the MIT license. See the LICENSE file for more info.