Swift 4
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user