This commit is contained in:
Florian Gabach
2017-06-27 09:21:16 +02:00
parent 242b6ae368
commit 43b76c064c
7 changed files with 30 additions and 8 deletions
@@ -83,7 +83,7 @@ class OpenSourceViewController: UITableViewController {
self.navigationController?.navigationBar.barTintColor = tintColor
}
if let textColor = self.config.uiConfig.titleColor {
let attribut = [NSForegroundColorAttributeName: textColor]
let attribut = [NSAttributedStringKey.foregroundColor.rawValue: textColor]
self.navigationController?.navigationBar.titleTextAttributes = attribut
}
+1 -1
View File
@@ -37,7 +37,7 @@ public class LicenceFile: NSObject {
///
/// - Parameter completion: end of download handler
func downloadLicenceDetail(config: OpenSourceControllerConfig,
completion: @escaping (Void) -> Void) {
completion: @escaping () -> Void) {
if let url = URL(string: self.url) {
let task = URLSession.shared.dataTask(with: url) { (data, _, _) in
if let data = data,
+2 -2
View File
@@ -49,8 +49,8 @@ class OpenSourceTableViewCell: UITableViewCell {
func configure(licence: LicenceFile, config: OpenSourceControllerConfig) {
// Build attributed text
let libraryTitleAttribut = [NSFontAttributeName: UIFont.boldSystemFont(ofSize: UIFont.systemFontSize + 2)]
let libraryLicenceAttribut = [NSFontAttributeName: UIFont.systemFont(ofSize: UIFont.systemFontSize)]
let libraryTitleAttribut = [NSAttributedStringKey.font: UIFont.boldSystemFont(ofSize: UIFont.systemFontSize + 2)]
let libraryLicenceAttribut = [NSAttributedStringKey.font: UIFont.systemFont(ofSize: UIFont.systemFontSize)]
let libraryTitle = NSMutableAttributedString(string: licence.title ?? "",
attributes: libraryTitleAttribut)
libraryTitle.append(NSAttributedString(string: "\n\n"))