Skip to content

Instantly share code, notes, and snippets.

@edwellbrook
Last active December 25, 2017 18:41
Show Gist options
  • Save edwellbrook/35bd45f4bede309d6680897dc2e00af1 to your computer and use it in GitHub Desktop.
Save edwellbrook/35bd45f4bede309d6680897dc2e00af1 to your computer and use it in GitHub Desktop.
//
// TableViewCell.swift
//
// Created by Edward Wellbrook on 31/12/2016.
// Copyright © 2016-2017 Brushed Type. All rights reserved.
//
import UIKit
import Themeable
class TableViewCell: UITableViewCell, Themeable {
override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
AlertsTheme.manager.register(themeable: self)
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func apply(theme: AlertsTheme) {
self.tintColor = theme.tintColor
self.backgroundColor = theme.lightBackgroundColor
self.textLabel?.textColor = theme.cellTextColor
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment