Home > Enterprise >  UIView With Pointed Edges
UIView With Pointed Edges

Time:02-18

I am trying to make a UIView with pointed edges like Custom UIView with pointed edge tag view iOS swift

And can also be created using code, here is a frame example since the storyboard showed its compatibility with autolayout

private func createPointedView()
{
    let pointedView = PointedView(frame: CGRect(x: 0,
                                                y: 0,
                                                width: 200,
                                                height: 60))
    
    pointedView.backgroundColor = .red
    pointedView.slopeFactor = 50
    pointedView.center = view.center
    
    view.addSubview(pointedView)
}
  • Related