You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.4 KiB

  1. //
  2. // PINComponents.swift
  3. // SRPinView
  4. //
  5. // Created by saroj raut on 1/23/20.
  6. // Copyright © 2020 saroj raut. All rights reserved.
  7. //
  8. import UIKit
  9. class Indicator: UIView {
  10. var isNeedClear = false
  11. override func draw(_ rect: CGRect) {
  12. super.draw(rect)
  13. self.layer.cornerRadius = rect.width/2
  14. self.clipsToBounds = true
  15. self.layer.borderWidth = 2
  16. self.layer.borderColor = UIColor.themeText.cgColor
  17. }
  18. }
  19. class PinIndicator: UIButton {
  20. override func draw(_ rect: CGRect) {
  21. super.draw(rect)
  22. self.layer.cornerRadius = rect.height/2
  23. self.clipsToBounds = true
  24. self.layer.borderWidth = 1
  25. self.layer.borderColor = UIColor.themeText.cgColor
  26. }
  27. }
  28. class DeleteOKIndicator: UIButton {
  29. override func draw(_ rect: CGRect) {
  30. super.draw(rect)
  31. self.layer.cornerRadius = rect.height/2
  32. self.clipsToBounds = true
  33. self.layer.borderWidth = 0
  34. self.layer.backgroundColor = #colorLiteral(red: 0.03843427449, green: 0.3333662152, blue: 0.780655086, alpha: 1)
  35. }
  36. }
  37. class PhotoImageView: UIImageView {
  38. override func draw(_ rect: CGRect) {
  39. super.draw(rect)
  40. self.layer.cornerRadius = rect.width/2
  41. self.clipsToBounds = true
  42. self.layer.borderColor = UIColor.themeText.cgColor
  43. }
  44. }