123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- //
- // DashboardAssessmentListTableViewCell.swift
- // LMS
- //
- // Created by Suraj Kumar Mandal on 06/01/23.
- //
- import UIKit
- class DashboardAssessmentListTableViewCell: UITableViewCell {
- @IBOutlet var assessmentCustomView: UIView!
- @IBOutlet var assessmentNameLabel: UILabel!
- @IBOutlet var dropdownButton: UIButton!
- @IBOutlet var hiddenCustomView: UIView!
- @IBOutlet var dayDateLabel: UILabel!
- @IBOutlet var timeLabel: UILabel!
- @IBOutlet var startButton: UIButton!
- @IBOutlet var activeStatusLabel: UILabel!
- @IBOutlet var statusIndicatorImageView: UIImageView!
-
- override func awakeFromNib() {
- super.awakeFromNib()
- // Initialization code
- }
- override func setSelected(_ selected: Bool, animated: Bool) {
- super.setSelected(selected, animated: animated)
- // Configure the view for the selected state
- if isDetailViewHidden, selected {
- showDetailView()
- } else {
- hideDetailView()
- }
- }
-
- func commonInit() {
- selectionStyle = .none
- hiddenCustomView.isHidden = true
- dropdownButton.setImage(UIImage(systemName: "chevron.right"), for: .normal)
- }
- }
- extension DashboardAssessmentListTableViewCell {
- var isDetailViewHidden: Bool {
- return hiddenCustomView.isHidden
- }
- func showDetailView() {
- hiddenCustomView.isHidden = false
- dropdownButton.setImage(UIImage(systemName: "chevron.down"), for: .normal)
- }
- func hideDetailView() {
- hiddenCustomView.isHidden = true
- dropdownButton.setImage(UIImage(systemName: "chevron.right"), for: .normal)
- }
- }
|