Small code refactoring

This commit is contained in:
Florian Gabach
2018-12-10 17:22:28 +01:00
parent 016099a7c3
commit 0dbf658de9
12 changed files with 92 additions and 44 deletions
@@ -6,7 +6,7 @@
import UIKit
final class OpenSourceTableViewCell: UITableViewCell {
final class OpenSourceTableViewCell: UITableViewCell, Reusable {
// MARK: - Lifecycle
@@ -29,15 +29,10 @@ final class OpenSourceTableViewCell: UITableViewCell {
// MARK: - Configure
/// Initialize the cell content with Licence model
///
/// - Parameter licence: the licence model
func configure(licence: LicenceFile, config: OpenSourceControllerConfig) {
// Set text
self.textLabel?.attributedText = licence.attributedContent
self.textLabel?.textColor = config.uiConfig.licenceTextColor
// Background
if let backgroundColor = config.uiConfig.licenceBackgroundColor {
self.backgroundColor = backgroundColor
}