2020-08-01から1ヶ月間の記事一覧

iPadでActionSheetを表示する

iPadでActionSheetを正しく呼び出す元の近くで表示させるため、popoverPresentationControllerのsourceViewとsourceRectの設定が必要です。 例: @IBAction func dataPressed(_ sender: UIButton) { let ac = UIAlertController(title: nil, message: nil, p…

UIKitのプロジェクトにSwiftUIのViewを呼び出す

let pcHostingController = UIHostingController(rootView: PcView(pc: selectedPc)) navigationController?.pushViewController(pcHostingController, animated: true)