Navigation Menu

Skip to content
This repository has been archived by the owner on May 23, 2022. It is now read-only.

Commit

Permalink
Update for Swift3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tedokon committed Sep 16, 2016
1 parent 6dc4590 commit 72ba7f1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions SwiftFontName.xcodeproj/project.pbxproj
Expand Up @@ -110,6 +110,7 @@
TargetAttributes = {
908CE08F1B5AB6F10009CA5D = {
CreatedOnToolsVersion = 6.4;
LastSwiftMigration = 0800;
};
};
};
Expand Down Expand Up @@ -254,6 +255,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
Expand All @@ -272,6 +274,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
Expand Down
2 changes: 1 addition & 1 deletion SwiftFontName/FontName.swift
Expand Up @@ -565,7 +565,7 @@ extension FontName {
}

extension FontName {
private static func fontName(fontName name: String, osVersion version: Float? = nil) -> String {
fileprivate static func fontName(fontName name: String, osVersion version: Float? = nil) -> String {
if let _ = version {}
return name
}
Expand Down
4 changes: 2 additions & 2 deletions SwiftFontName/LocalizedFontName.swift
Expand Up @@ -8,8 +8,8 @@

import UIKit

public func LocalizedFontName(defaultFontName: String, localizedFontNames: [String: String]) -> String {
let preferredLanguage : String = NSLocale.preferredLanguages().first!
public func LocalizedFontName(_ defaultFontName: String, localizedFontNames: [String: String]) -> String {
let preferredLanguage : String = Locale.preferredLanguages.first!
for (k, _) in localizedFontNames {
if preferredLanguage == k || preferredLanguage.hasPrefix(k + "-") {
return localizedFontNames[k]!
Expand Down

0 comments on commit 72ba7f1

Please sign in to comment.