From ae5e77f1e70820a074f496b2dd4ef12e4803a78b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=A6tefan=20Suciu?= Date: Thu, 26 Apr 2018 15:09:32 +0300 Subject: [PATCH] swift 4 conversion --- netfox/Core/NFX.swift | 2 +- netfox/Core/NFXGenericController.swift | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/netfox/Core/NFX.swift b/netfox/Core/NFX.swift index 9c5a2fb8..104a0d85 100755 --- a/netfox/Core/NFX.swift +++ b/netfox/Core/NFX.swift @@ -273,7 +273,7 @@ extension NFX { navigationController!.navigationBar.tintColor = UIColor.NFXOrangeColor() navigationController!.navigationBar.barTintColor = UIColor.NFXStarkWhiteColor() #if !swift(>=4.0) - navigationController!.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.NFXOrangeColor()] + navigationController!.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: UIColor.NFXOrangeColor()] #else navigationController!.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: UIColor.NFXOrangeColor()] #endif diff --git a/netfox/Core/NFXGenericController.swift b/netfox/Core/NFXGenericController.swift index 8249b555..04ec6aaf 100755 --- a/netfox/Core/NFXGenericController.swift +++ b/netfox/Core/NFXGenericController.swift @@ -45,8 +45,8 @@ class NFXGenericController: NFXViewController for match in matchesBodyHeaders { #if !swift(>=4.0) - tempMutableString.addAttribute(NSFontAttributeName, value: NFXFont.NFXFontBold(size: 14), range: match.range) - tempMutableString.addAttribute(NSForegroundColorAttributeName, value: NFXColor.NFXOrangeColor(), range: match.range) + tempMutableString.addAttribute(NSAttributedStringKey.font, value: NFXFont.NFXFontBold(size: 14), range: match.range) + tempMutableString.addAttribute(NSAttributedStringKey.foregroundColor, value: NFXColor.NFXOrangeColor(), range: match.range) #else tempMutableString.addAttribute(NSAttributedStringKey.font, value: NFXFont.NFXFontBold(size: 14), range: match.range) tempMutableString.addAttribute(NSAttributedStringKey.foregroundColor, value: NFXColor.NFXOrangeColor(), range: match.range) @@ -58,7 +58,7 @@ class NFXGenericController: NFXViewController for match in matchesKeys { #if !swift(>=4.0) - tempMutableString.addAttribute(NSForegroundColorAttributeName, value: NFXColor.NFXBlackColor(), range: match.range) + tempMutableString.addAttribute(NSAttributedStringKey.foregroundColor, value: NFXColor.NFXBlackColor(), range: match.range) #else tempMutableString.addAttribute(NSAttributedStringKey.foregroundColor, value: NFXColor.NFXBlackColor(), range: match.range) #endif