raulriera / TextFieldEffects

Custom UITextFields effects inspired by Codrops, built using Swift
MIT License
5.95k stars 599 forks source link

Use of .fontName deprecated in Xcode 11 #207

Open wfgilman opened 4 years ago

wfgilman commented 4 years ago

I love this library ❤️ With Xcode 11 I started getting the following error:

2020-06-06 20:30:23.609206-0700 Project1[95342:6267628] CoreText note: Client requested name ".SFUI-Regular", it will get TimesNewRomanPSMT rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[UIFont systemFontOfSize:].
2020-06-06 20:30:23.609401-0700 Project1[95342:6267628] CoreText note: Set a breakpoint on CTFontLogSystemFontNameRequest to debug.

I researched the issue and it's the use of .fontName to instantiate a font that causes the error. This technique is used by the library to scale the placeholder font. The result is the placeholder always displays in TimesNewRoman. Boo.

Linke to issue: https://stackoverflow.com/questions/58706570/how-can-i-find-the-source-of-this-font-related-coretext-warning-in-ios13.

I'd love to see this fixed 🙂

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 3 days if no further activity occurs.

egorbedunkevich commented 3 years ago

Has this been solved? Seems to be an issue still on iOS 14 running the newest version of Xcode.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 3 days if no further activity occurs.