12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- //
- // DashboardSessionListTableViewCell.swift
- // LMS
- //
- // Created by Suraj Kumar Mandal on 06/01/23.
- //
- import UIKit
- class DashboardSessionListTableViewCell: UITableViewCell {
- @IBOutlet var sessionCustomView: UIView!
- @IBOutlet var sessionNameLabel: UILabel!
- @IBOutlet var dropdownArrowButton: UIButton!
- @IBOutlet var hiddenView: UIView!
- @IBOutlet var dayDateLabel: UILabel!
- @IBOutlet var timeLabel: UILabel!
- @IBOutlet var joinButton: UIButton!
-
- 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
- hiddenView.isHidden = true
- dropdownArrowButton.setImage(UIImage(systemName: "chevron.right"), for: .normal)
- }
- }
- extension DashboardSessionListTableViewCell {
- var isDetailViewHidden: Bool {
- return hiddenView.isHidden
- }
- func showDetailView() {
- hiddenView.isHidden = false
- dropdownArrowButton.setImage(UIImage(systemName: "chevron.down"), for: .normal)
- }
- func hideDetailView() {
- hiddenView.isHidden = true
- dropdownArrowButton.setImage(UIImage(systemName: "chevron.right"), for: .normal)
- }
- }
|