Suggested approach: This is an intermediate to advanced question aimed at folks with UIKit experience. You could choose from
CAShapeLayer, and more – they are all quite popular on Apple's platforms.
If I were you, I'd list off a few different subclasses, but then pick one and try to provide more detail on how it works and why it exists.
Estimated difficulty: Advanced
Link copied to your pasteboard.