We can make @IBOutlets and @IBAction private.
Example:
class MyViewController: UIViewController {
@IBOutlet private weak var myLabel: UILabel!
@IBAction private func nextTapped(sender: UIButton) {
// Do something
}
}
We haven't access to this properties and methods outside class, which is good I thing.
But what about testing class with private outlets and actions? Are there any ways to test private outlet or method in XCTestCase, or I have to just expose them outside class making internal?
For purpose of test @IBOutlets/@IBActions should be internally visible?