RxSwift/RxCocoa example:
1 2 3 4 5 6 7 8 9 |
import SafariServices learnMoreButton.rx.tap .subscribe(onNext: { guard let url = URL(string: "https://google.com") else { return } let svc = SFSafariViewController(url: url) self.present(svc, animated: true, completion: nil) }) .disposed(by: disposeBag) |