TrueFalseTableViewCell.swift 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // TrueFalseTableViewCell.swift
  3. // LMS
  4. //
  5. // Created by Suraj Kumar Mandal on 28/09/22.
  6. //
  7. import UIKit
  8. class TrueFalseTableViewCell: UITableViewCell {
  9. @IBOutlet var customView: UIView!
  10. @IBOutlet var selectButton: UIButton!
  11. @IBOutlet var optionLabel: UILabel!
  12. override func awakeFromNib() {
  13. super.awakeFromNib()
  14. // Initialization code
  15. }
  16. override func setSelected(_ selected: Bool, animated: Bool) {
  17. super.setSelected(selected, animated: animated)
  18. // Configure the view for the selected state
  19. if selected {
  20. self.selectButton.setImage(UIImage(systemName: "circle.inset.filled"), for: .normal)
  21. } else {
  22. self.selectButton.setImage(UIImage(systemName: "circle"), for: .normal)
  23. }
  24. }
  25. override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
  26. super.init(style: style, reuseIdentifier: reuseIdentifier)
  27. self.selectionStyle = .none
  28. }
  29. required init?(coder aDecoder: NSCoder) {
  30. super.init(coder: aDecoder)
  31. }
  32. }