IGListKit/Examples/Examples-tvOS/IGListKitExamples/Views/CarouselCell.swift
Jesse Squires 879260b417 internal diff for PR #209
Summary: https://github.com/Instagram/IGListKit/pull/209

Reviewed By: rnystrom

Differential Revision: D4190633

fbshipit-source-id: 9d382b9ba3f3d20c8b9c48d900650ec354bc9728
2016-11-16 12:44:19 -08:00

20 lines
685 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
}
}