Created
June 1, 2020 15:20
-
-
Save aqubi/d03dbef5b8cc84abd992b703a342b397 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SURMasterTableViewCell: UITableViewCell { | |
override func awakeFromNib() { | |
super.awakeFromNib() | |
updateAccessoryType() | |
} | |
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { | |
super.traitCollectionDidChange(previousTraitCollection) | |
updateAccessoryType() | |
} | |
private func updateAccessoryType() { | |
self.accessoryType = traitCollection.horizontalSizeClass == .compact ? .disclosureIndicator : .none | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment