Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

Use font from React Native assets in SwiftUI

$
0
0

Is it possible to access files inside my React Native project in Swift(UI)?Lets say I have a custom font which lives inside my app/assets/fonts folder in React Native. This font is linked so it is visible in the info.plist inside Xcode, however it isn't listed when using

for family in UIFont.familyNames.sorted() {     let names = UIFont.fontNames(forFamilyName: family)     print("Family: \(family) Font names: \(names)")}

Do I have to copy the font over to the Xcode project? Resulting in having double the amount of assets. Isn't there a better way to do this?

This doesn't apply to only fonts, but also images and icons that live inside the assets folder that I might want to use in a Native Module.


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>