项目作者: brampf

项目描述 :
SwiftUI Shapes
高级语言: Swift
项目地址: git://github.com/brampf/SUEShapes.git
创建时间: 2020-08-26T21:26:29Z
项目社区:https://github.com/brampf/SUEShapes

开源协议:MIT License

下载


SUEShapes

SwiftUI Shapes



MIT License


Swift 5.3

SUE stands for SwiftUI Extras and is a collection of small SwiftUI libraries for various recurring use cases

HorizontalLine

  1. HorizontalLine().stroke(lineWidth: 5).padding()

HorizontalLine

VerticalLine

  1. VerticalLine().stroke(lineWidth: 5).padding()

VerticalLine

Stripes

  1. Stripes().stroke(Color.black, lineWidth: 10).background(Color.yellow)

Stripes

RoundedCorners

  1. HStack {
  2. VStack(spacing: 0) {
  3. RoundedCorners(hue: 0.2, part: .start)
  4. RoundedCorners(hue: 0.2, part: .middle)
  5. RoundedCorners(hue: 0.2, part: .middle)
  6. RoundedCorners(hue: 0.2, part: .middle)
  7. RoundedCorners(hue: 0.2, part: .middle)
  8. RoundedCorners(hue: 0.2, part: .end)
  9. Spacer()
  10. }
  11. VStack(spacing: 0) {
  12. RoundedCorners(hue: 0.4, part: .start, type: .dashed)
  13. RoundedCorners(hue: 0.4, part: .middle, type: .dashed)
  14. RoundedCorners(hue: 0.4, part: .middle, type: .dashed)
  15. RoundedCorners(hue: 0.4, part: .end, type: .dashed)
  16. Spacer()
  17. }
  18. VStack(spacing: 0) {
  19. RoundedCorners(hue: 0.6, part: .start, type: .regularOutline)
  20. RoundedCorners(hue: 0.6, part: .middle, type: .regularOutline)
  21. RoundedCorners(hue: 0.6, part: .middle, type: .regularOutline)
  22. RoundedCorners(hue: 0.6, part: .middle, type: .regularOutline)
  23. RoundedCorners(hue: 0.6, part: .middle, type: .regularOutline)
  24. RoundedCorners(hue: 0.6, part: .middle, type: .regularOutline)
  25. RoundedCorners(hue: 0.6, part: .end, type: .regularOutline)
  26. Spacer()
  27. }
  28. VStack(spacing: 0) {
  29. RoundedCorners(hue: 0.8, part: .start, type: .dashedOutline)
  30. RoundedCorners(hue: 0.8, part: .middle, type: .dashedOutline)
  31. RoundedCorners(hue: 0.8, part: .end, type: .dashedOutline)
  32. Spacer()
  33. }
  34. }.padding()

RoundedCorners

License

MIT license; see LICENSE.
(c) 2020