Files
GitHawk/Classes/Views/LabelCell.swift
2018-02-04 19:09:42 -05:00

41 lines
936 B
Swift

//
// LabelCell.swift
// Freetime
//
// Created by Sherlock, James on 15/07/2017.
// Copyright © 2017 Ryan Nystrom. All rights reserved.
//
import UIKit
import SnapKit
final class LabelCell: UICollectionViewCell {
let label = UILabel()
override init(frame: CGRect) {
super.init(frame: frame)
contentView.backgroundColor = .clear
accessibilityTraits |= UIAccessibilityTraitStaticText
label.backgroundColor = .clear
label.textAlignment = .center
label.font = Styles.Text.button.preferredFont
contentView.addSubview(label)
label.snp.makeConstraints { make in
make.center.equalTo(contentView)
}
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func layoutSubviews() {
super.layoutSubviews()
layoutContentViewForSafeAreaInsets()
}
}