I am sorry, I meant hang point, not "pont" . As far as more complete code goes, I don' t see much point, since it happens at initailization of a CGFloat instance variable, but here you go, code for the entire class:
class FileOrFolderCell: UICollectionViewCell, CustomCell {
@IBOutlet weak var emojiLabel: UILabel!
@IBOutlet weak var nameLabel: MarqueeLabel!
@IBOutlet weak var emojiBadge: UILabel!
@IBOutlet weak var imageView: UIImageView!
let emojiLabelInitialFontSize: CGFloat = 64
@IBOutlet weak var newBadge: UILabel!
var url: URL!
var thumbURL: URL?
var isNew = false {
didSet {
newBadge.isHidden = !isNew
}
}
var emoji = "" {
didSet {
emojiLabel.text = emoji
emojiBadge.text = emoji
}
}
func setFontSizesFor(width: CGFloat) {
emojiLabel.font = emojiLabel.font?.withSize(32)
newBadge.font = newBadge.font?.withSize(20)
}
}
As you see, there is basically nothing there and whatever little this is, it all has to run on the UI thread (it is a subclass of UICollectionView).