Possible to detect Bold Text setting in Settings > Accessibility?

As of iOS 8, it is possible to detect whether the user has enabled Bold Text in Settings using UIAccessibilityIsBoldTextEnabled() (docs) and UIAccessibilityBoldTextStatusDidChangeNotification (docs).

For apps that also require iOS 7 support, I’ve written an elegant one-liner that works on iOS 7 & 8 with Helvetica Neue and even on iOS 9 with the San Francisco typeface, based on the fact that standard-weight fonts are commonly referred to as the “Regular” weight, and that body text uses this weight for readability:

Objective-C:

BOOL hasBoldText = ![[UIFont preferredFontForTextStyle:UIFontTextStyleBody].fontName hasSuffix:@"-Regular"];

Swift:

let hasBoldText = !UIFont.preferredFontForTextStyle(UIFontTextStyleBody).fontName.hasSuffix("-Regular")