How can I close a Safari App Extension popover programmatically?

前端 未结 2 1599
萌比男神i
萌比男神i 2021-02-08 00:13

I\'m building a Safari App Extension using XCode 8.3 and Swift 3, following the Safari App Extension Programming Guide. The extension includes a popover that appears when the ex

2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-08 00:56

    I did it by calling dismiss method like below

    @IBAction func onLoginBtnClicked (_ sender: Any) {
        NSLog("Button clicked")
        self.dismiss(self)
    }
    

提交回复
热议问题