Skip to content

Instantly share code, notes, and snippets.

@edwellbrook
edwellbrook / UILocalizedIndexedCollation+Locale.swift
Last active May 18, 2024 16:16
Create a UILocalizedIndexedCollation for a specific locale
extension UILocalizedIndexedCollation {
static func collation(for locale: Locale) -> UILocalizedIndexedCollation? {
let collationPlistURL = Bundle(for: UILocalizedIndexedCollation.self).url(
forResource: "UITableViewLocalizedSectionIndex",
withExtension: "plist",
subdirectory: nil,
localization: locale.identifier
)
//
// TableViewCell.swift
//
// Created by Edward Wellbrook on 31/12/2016.
// Copyright © 2016-2017 Brushed Type. All rights reserved.
//
import UIKit
import Themeable
//
// ExampleTheme.swift
// Example
//
// Created by Edward Wellbrook on 27/01/2017.
// Copyright © 2017 Edward Wellbrook. All rights reserved.
//
import UIKit
import Themeable