Skip to content

Instantly share code, notes, and snippets.

View moveitonover's full-sized avatar

Daniel D moveitonover

  • Stockholm, Sweden
View GitHub Profile
@moveitonover
moveitonover / ios-currency-locale-table.json
Created October 4, 2016 06:43
iOS map of currency symbols with associated locales.
{
"TZS": [
"rwk_TZ",
"jmc_TZ",
"lag_TZ",
"sw_TZ",
"ksb_TZ",
"bez_TZ",
"asa_TZ",
"sbp_TZ",
@moveitonover
moveitonover / Logger.swift
Created November 2, 2017 07:42
Drop in replacement for `print` and `debugPrint` in Swift 4
//
// Logger.swift
//
// Drop in replacement for `print` and `debugPrint`.
//
func print(_ items: Any..., separator: String = " ", terminator: String = "\n") {
#if DEBUG
Swift.print(items, separator: separator, terminator: terminator)
#endif
@moveitonover
moveitonover / UIKitLocalizedString.swift
Last active October 27, 2020 13:51
Localized strings accessible from com.apple.UIKit bundle
//
// UIKitLocalizedString.swift
//
// Helper class for accessing the localized strings shipped with Apple UIKit
//
class UIKitLocalizedString {
static let bundle = Bundle(identifier: "com.apple.UIKit")
@moveitonover
moveitonover / PrintFonts.swift
Created May 23, 2018 11:42
Print all font names in iOS using Swift
// Iterate through all font families and print names ✌🏻
UIFont.familyNames.flatMap { UIFont.fontNames(forFamilyName: $0) }
.forEach { print("Font: \($0)") }