UIFontPickerViewController with filteredLanguagesPredicate "zh-Hant" doesn't work on iOS16.

I got a sample code as following that worked correctly on iOS 14 and iOS 15. But it seems to not work at iOS16, it there something missing on iOS16?

func showFontPicker(_ sender: Any) {
    let fontConfig = UIFontPickerViewController.Configuration()
    fontConfig.includeFaces = true
    fontConfig.filteredLanguagesPredicate = UIFontPickerViewController.Configuration.filterPredicate(forFilteredLanguages: ["zh-Hant"])
    let fontPicker = UIFontPickerViewController(configuration: fontConfig)
    fontPicker.delegate = self
    self.present(fontPicker, animated: true, completion: nil)
}
  • More detail comment is that above code has none result for filterPredicate with "zh-Hant" on iOS 16.

Add a Comment