You can’t access it because it’s how it is designed (for now this info will be enough).
What you need to do to access it: Create functions that will trigger your event when you need to do those checks for those certain conditions. In those functions you can access the Outlet.
For example: add the button to your ViewController
> drag it into the code > choose Action
(but not Outlet
) > in that method try to do what you need (check those conditions etc) > you will see that the Outlet
will be accessible.
solved How to acess @IBOutlet weak var