In a single view application project for iOS, I am able to use the contains(_:) method of the String type defined in the Foundation module in the ViewController file where the Foundation module is not imported. Why is this possible? The only module imported in this file is the UIKit module. Is the definition of the contains(_:) method provided through the UIKit module indirectly? If it is, how?
ViewController.swift:
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let s = "Hello"
print(s.contains("H"))
}
}