私はPopupDialog
ライブラリを使用し、負荷にポップアップをタップすると、以下のコードに示すように、というボタンがありますよ。そこに私のポップアップ内ポップアップが開いているときにビューコントローラを開く方法 - 迅速な3
// Create the dialog
let popup_around_me = AroundMePopUpViewController(nibName: "popup_around_me", bundle: nil)
popup_around_me.gh = self.getJobByLatitude(latitude: marker.position.latitude)
let popup = PopupDialog(viewController: popup_around_me, buttonAlignment: .horizontal, transitionStyle: .bounceDown, gestureDismissal: true)
present(popup, animated: true, completion: nil)
//print("marker.position.latitude: \(marker.position.latitude)")
コントローラを開く2つのボタンです。
ナビゲーションバーを使用しているため、まずポップアップを閉じてからコントローラを開く必要があります。そうしないと、ナビゲーションバーがロードされません。
しかし、これが正しい方法かどうかはわかりません。 問題が解決しない場合、どうすればいいですか(ポップアップを閉じてコントローラを開く)
私のボタン機能:
func cliclOnContent(tapGestureRecognizer: UITapGestureRecognizer)
{
print("job id: \(self.gh.id)")
//below codes not load my navigation.
// let vc = self.storyboard!.instantiateViewController(withIdentifier: "ContentAJobViewController") as! ContentAJobViewController
// vc.job_id = self.gh.id
// self.navigationController?.pushViewController(vc, animated: true)
// let storyboard = UIStoryboard(name: "Main", bundle: nil)
// let controller = storyboard?.instantiateViewController(withIdentifier: "ContentAJobViewController") as! ContentAJobViewController
// controller.job_id = self.gh.id
// self.present(controller, animated: true, completion: nil)
}
使用している「PopupDialog」への参照(リンク)を提供できますか? –
https://github.com/Orderella/PopupDialog –
ポップアップを閉じるには 'popup.tapButtonWithIndex'を使用できますか? –