IGListKit/Examples/Examples-tvOS/IGListKitExamples/Views/CarouselCell.swift
Jesse Squires 8dd464e712 Update swiftlint + script, add newrules, autocorrect
Summary:
- Updates to SwiftLint 0.24.2
- Improve `scripts/lint.sh`
    - pull version out to a var for easier maintenance
    - better error message
    - make script fail xcode build if not installed (so we don't commit lint errors)
- Adds a few new SwiftLint rules
- Correct all new lint errors (most can be done by running `swiftlint autocorrect`)
- Cleans up `.swiftlint.yml`
- Fix up example projects
Closes https://github.com/Instagram/IGListKit/pull/1058

Differential Revision: D6776177

Pulled By: rnystrom

fbshipit-source-id: 345172237b97aaed0d62312c8f366f46145f8cd9
2018-01-22 12:14:38 -08:00

20 lines
684 B
Swift

//
// CarouselCell.swift
// IGListKitExamples
//
// Created by Sherlock, James (Apprentice Software Developer) on 29/10/2016.
// Copyright © 2016 Instagram. All rights reserved.
//
import UIKit
final class CarouselCell: UICollectionViewCell {
@IBOutlet weak var titleLabel: UILabel!
override func didUpdateFocus(in context: UIFocusUpdateContext, with coordinator: UIFocusAnimationCoordinator) {
let normalColor = UIColor(red: 174 / 255.0, green: 198 / 255.0, blue: 207 / 255.0, alpha: 1)
let focusColor = UIColor(red: 117 / 255.0, green: 155 / 255.0, blue: 169 / 255.0, alpha: 1)
backgroundColor = isFocused ? focusColor : normalColor
}
}