Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 577 Bytes

README.md

File metadata and controls

27 lines (21 loc) · 577 Bytes

SwiftUIPiP

version

A small package that provides a picture in picture modifier for SwiftUI

The pip view can be moved by the user to all four corners and can be resized to three different sizes

Usage

VStack {
    Text("Hello, World!")
}
.frame(minWidth: 0,
       maxWidth: .infinity, 
       minHeight: 0, 
       maxHeight: .infinity)
.background(Color.red)
.pip {
    Color.yellow
        .clipShape(RoundedRectangle(cornerRadius: 15.0))
}

Output

Preview