Skip to content

Instantly share code, notes, and snippets.

@Koze
Last active February 7, 2020 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Koze/ad83de3ad23225ff90d2212d0dedc2af to your computer and use it in GitHub Desktop.
Save Koze/ad83de3ad23225ff90d2212d0dedc2af to your computer and use it in GitHub Desktop.
This API seems to be private use. You can directly import header <EventKitUI/UIFont+EKDayOccurrenceView.h>
//
// UIFont+EKDayOccurrenceView.h
// EventKitUI
//
// Created by harry-dev on 4/18/19.
// Copyright © 2019 Apple Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface UIFont (EKDayOccurrenceView)
@property (nonatomic, readonly, class) UIFont *ek_defaultOccurrenceSecondaryTextFont;
+ (UIFont *)ek_defaultOccurrencePrimaryTextFontForSizeClass:(UIUserInterfaceSizeClass)sizeClass;
+ (UIFont *)ek_defaultOccurrenceSmallPrimaryTextFontForSizeClass:(UIUserInterfaceSizeClass)sizeClass;
@end
NS_ASSUME_NONNULL_END
https://developer.apple.com/documentation/uikit/uifont/3255206-ek_defaultoccurrencesecondarytex
https://developer.apple.com/documentation/uikit/uifont/3255205-ek_defaultoccurrenceprimarytextf
https://developer.apple.com/documentation/uikit/uifont/3255207-ek_defaultoccurrencesmallprimary
@Koze
Copy link
Author

Koze commented Oct 15, 2019

Results

    NSLog(@"%@", UIFont.ek_defaultOccurrenceSecondaryTextFont);
    NSLog(@"%@", [UIFont ek_defaultOccurrencePrimaryTextFontForSizeClass:UIUserInterfaceSizeClassCompact]);
    NSLog(@"%@", [UIFont ek_defaultOccurrencePrimaryTextFontForSizeClass:UIUserInterfaceSizeClassRegular]);
    NSLog(@"%@", [UIFont ek_defaultOccurrencePrimaryTextFontForSizeClass:UIUserInterfaceSizeClassUnspecified]);
    NSLog(@"%@", [UIFont ek_defaultOccurrenceSmallPrimaryTextFontForSizeClass:UIUserInterfaceSizeClassCompact]);
    NSLog(@"%@", [UIFont ek_defaultOccurrenceSmallPrimaryTextFontForSizeClass:UIUserInterfaceSizeClassRegular]);
    NSLog(@"%@", [UIFont ek_defaultOccurrenceSmallPrimaryTextFontForSizeClass:UIUserInterfaceSizeClassUnspecified]);

    // <UICTFont: 0x7f9d01403320> font-family: "UICTFontTextStyleCaption2"; font-weight: normal; font-style: normal; font-size: 11.00pt
    // <UICTFont: 0x7f9d01404960> font-family: ".SFUI-Semibold"; font-weight: bold; font-style: normal; font-size: 13.00pt
    // <UICTFont: 0x7f9d01404960> font-family: ".SFUI-Semibold"; font-weight: bold; font-style: normal; font-size: 13.00pt
    // <UICTFont: 0x7f9d01404960> font-family: ".SFUI-Semibold"; font-weight: bold; font-style: normal; font-size: 13.00pt
    // <UICTFont: 0x7f9d01207540> font-family: ".SFUI-Semibold"; font-weight: bold; font-style: normal; font-size: 11.00pt
    // <UICTFont: 0x7f9d01404960> font-family: ".SFUI-Semibold"; font-weight: bold; font-style: normal; font-size: 13.00pt
    // <UICTFont: 0x7f9d01207540> font-family: ".SFUI-Semibold"; font-weight: bold; font-style: normal; font-size: 11.00pt

スクリーンショット 2019-10-15 15 04 00

@Koze
Copy link
Author

Koze commented Oct 15, 2019

スクリーンショット 2019-10-15 17 53 39

@Koze
Copy link
Author

Koze commented Feb 7, 2020

These methods have been deprecated in iOS 13.4 Beta 1.

//
//  UIFont+EKDayOccurrenceView.h
//  EventKit
//
//  Copyright 2019 Apple Inc. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIFont (EKDayOccurrenceView)

@property (nonatomic, readonly, class) UIFont *ek_defaultOccurrenceSecondaryTextFont
API_DEPRECATED("No replacement. This is not intended for third party use and will return nil.", ios(13.0, 13.4))
API_UNAVAILABLE(macos, macCatalyst, watchos);

+ (UIFont *)ek_defaultOccurrencePrimaryTextFontForSizeClass:(UIUserInterfaceSizeClass)sizeClass
API_DEPRECATED("No replacement. This is not intended for third party use and will return nil.", ios(13.0, 13.4))
API_UNAVAILABLE(macos, macCatalyst, watchos);

+ (UIFont *)ek_defaultOccurrenceSmallPrimaryTextFontForSizeClass:(UIUserInterfaceSizeClass)sizeClass
API_DEPRECATED("No replacement. This is not intended for third party use and will return nil.", ios(13.0, 13.4))
API_UNAVAILABLE(macos, macCatalyst, watchos);

@end

NS_ASSUME_NONNULL_END

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment