NetNewsWire/Widget/Shared Views/SizeCategories.swift
Stuart Breckenridge 47d12f4fe7
Widget Accessibility
Reduces article count on display when using larger text sizes
2020-12-24 08:45:07 +08:00

27 lines
680 B
Swift

//
// SizeCategories.swift
// NetNewsWire iOS Widget Extension
//
// Created by Stuart Breckenridge on 24/12/2020.
// Copyright © 2020 Ranchero Software. All rights reserved.
//
import SwiftUI
struct SizeCategories {
let largeSizeCategories: [ContentSizeCategory] = [.extraExtraLarge,
.extraExtraExtraLarge,
.accessibilityMedium,
.accessibilityLarge,
.accessibilityExtraLarge,
.accessibilityExtraExtraLarge,
.accessibilityExtraExtraExtraLarge]
func isSizeCategoryLarge(category: ContentSizeCategory) -> Bool {
largeSizeCategories.filter{ $0 == category }.count == 1
}
}