Files
GitHawk/Classes/Section Controllers/LoadMore/LoadMoreCell.swift
Ryan Nystrom d7084328f6 Testing out IGLK swift branch (#1743)
* testing out IGLK swift branch

* using local IGListKit, update labels to latest

* new labels working
2018-05-27 11:01:34 -04:00

56 lines
1.3 KiB
Swift

//
// LoadMoreCell.swift
// Freetime
//
// Created by Sherlock, James on 28/07/2017.
// Copyright © 2017 Ryan Nystrom. All rights reserved.
//
import UIKit
import SnapKit
import IGListKit
final class LoadMoreCell: UICollectionViewCell {
private let label = UILabel()
override init(frame: CGRect) {
super.init(frame: frame)
accessibilityTraits |= UIAccessibilityTraitButton
isAccessibilityElement = true
label.font = Styles.Text.button.preferredFont
label.textColor = Styles.Colors.Gray.light.color
contentView.addSubview(label)
label.snp.makeConstraints { make in
make.center.equalTo(contentView)
}
label.text = NSLocalizedString("Load More", comment: "")
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func layoutSubviews() {
super.layoutSubviews()
layoutContentViewForSafeAreaInsets()
}
override var accessibilityLabel: String? {
get { return NSLocalizedString("Load More", comment: "") }
set { }
}
override var isSelected: Bool {
didSet {
if isSelected {
label.alpha = 0.5
} else {
label.alpha = 1
}
}
}
}