How to create unique shapes or UIViews in Swift
<p>I don't really have any knowledge of drawing in Swift, but I'm looking to create part of my app background that's slightly different to a square. See the image below for what I'm trying to make:</p>

<p><a href="https://i.stack.imgur.com/xxSn8.png" rel="noreferrer"><img src="https://i.stack.imgur.com/xxSn8.png" alt="enter image description here"></a></p>

<p>The idea is that this will sit at the top of the screen, and be nothing more than a background. It'll stretch half way down the screen. I'll then add an image over the top etc. I would need the point at the bottom of the square to always sit in the middle of the screen.</p>

<p>Can I make this shape/UIView in Swift by code? And if so, how?</p>

<p>Or, is it better to just create this as an image and do it that way?</p>