Matvdg Triangle Save

A (really) simple Swift 4 UIView class with a triangle and a diagonal line rendered and customizable in the storyboard (color, line width, direction)

Project README

Triangle and DiagonalLine

Two (really) simple Swift 4 UIView classes with a triangle and a diagonal line rendered and customizable in the storyboard (color, line width, direction)

Triangle: UIView and DiagonalLine: UIView are @IBDesignable classes so that they are rendered in your storyboard, and all their properties are @IBInspectable so that you can customize your triangle and diagonal view inside the storyboard in the Attributes inspector.

Quick install:

  • Just drag these classes into your project

  • In your storyboard, select a UIView

  • Go the the identity inspector and in the class field, type Triangle or DiagonalView instead of UIView

  • Play with the attributes inspector with real-times results!

    • Triangle: pick a fill color
    • Diagonal: pick a color for your line
    • Triangle: choose the three points x and y positions (0 to 1) to create any triangle you want!
    • Diagonal: choose the direction (flip)
    • Diagonal: specify the line width

Image of Triangle Image of Diagonal View

Open Source Agenda is not affiliated with "Matvdg Triangle" Project. README Source: matvdg/Triangle
Stars
25
Open Issues
0
Last Commit
6 years ago
Repository
License

Open Source Agenda Badge

Open Source Agenda Rating