I've tried NSFont() but it says NSFont is undefined.
var fnt = NSFont(name: "Monaco", size: 12)
I have tried "import AppKit" but it says AppKit is not a valid module either.
You're on iOS. You should be using UIFont instead of NSFont.
let font = UIFont(name: "Monaco", size: 12.0)
You can't import AppKit either because it's an OS X framework. UIKit is the framework you should be using.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With