Home

Awesome

Morphi - Μορφ

License Platform Language Build Status Sponsor <a href="https://www.patreon.com/phimage"> <img src="https://c5.patreon.com/external/logo/become_a_patron_button.png" alt="Become a Patron!" height="20"> </a> <a href="https://paypal.me/ericphimage"> <img src="https://buymecoffee.intm.org/img/button-paypal-white.png" alt="Buy me a coffee" height="20"> </a>

Morphi provides some additional shapes for SwiftUI.

<img align="left" hspace="20" src="/Example/Screen.png" alt="Screen shot" height="333">

Examples

Create a shape view

Like any other shapes just initialize it.

 Heart().fill(Color.red).frame(width: 100, height: 100)
<img src="/Example/Heart.png" alt="Heart" height="128">

Mask an existing view

aView.clipShape(Drop())
// or using static member
aView.clipShape(.drop)

You can even do it on another shape.

Polygon(sides: 6).fill(Color.red).clipShape(.drop)
<img src="/Example/PolygonDrop.png" alt="PolygonDrop" height="128">

UIKit

For UIKit version with UIBezierPath see IBAnimatable framework