swift programmatic view controller button press code example
Example 1: button click programmatically swift
button.sendActions(for: .touchUpInside)
Example 2: how to call another view controller method when button click from another ios swift
NotificationCenter.default.addObserver(self, selector: #selector(disconnectPaxiSocket(_:)), name: Notification.Name(rawValue: "disconnectPaxiSockets"), object: nil)