Reputation: 23301
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.
Upvotes: 3
Views: 4735
Reputation: 130193
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.
Upvotes: 13