NSCharacterSet and UIKit Framework


Regarding one of the classes used in the chapter and frameworks in general, it seems as if when the module UIKit is imported, the class NSCharacterSet is imported as well. However, when I look at the Apple Developer Documentation for the UIKit module, I cannot seem to locate the NSCharacterSet class. Why is this?
Here’s a link to the reference for the UIKit framework


There’s no link in your post.

NSCharacterSet is in the Foundation library, and UIKit imports Foundation. You could just import UIKit in every file, but it demonstrates that you know what’s what if you import the smaller Foundation library in files that don’t use any User Interface items, like in a file that defines a model.


Thanks for the info!
Here’s the link that I was mentioning of earlier: https://developer.apple.com/reference/uikit

Also if one wants to see what gets imported with UIKit or any other framework, one can command click on the name to see.


Thanks for the tip! I had tried Option clicking on it, like with a function name, which didn’t work. I knew there was same way to click on it.