[英]How do you show a UIViewControllerRepresentable in SwiftUI as a non-sheet?
有很多關於如何將 UIViewControllerRepresentable(例如,顯示 VNDocumentCameraViewController)顯示為工作表的教程,但是有沒有辦法使用 NavigationLink 將其顯示為常規視圖,或者只是將其包含在另一個視圖中。 目前,如果我這樣包含它 ...
[英]How do you show a UIViewControllerRepresentable in SwiftUI as a non-sheet?
有很多關於如何將 UIViewControllerRepresentable(例如,顯示 VNDocumentCameraViewController)顯示為工作表的教程,但是有沒有辦法使用 NavigationLink 將其顯示為常規視圖,或者只是將其包含在另一個視圖中。 目前,如果我這樣包含它 ...
[英]Creating a SwiftUI UIViewControllerRepresentable for a ViewController that doesn't have a ViewController Delegate
我正在嘗試構建一個 SwiftUI tvOS 應用程序。 正如您在此處看到的,我正在嘗試使用 UIViewControllerRepresentable 創建一個 SwiftUI 視圖,專門用於DDDevicePickerViewController 。 但是,我注意到在我嘗試實現它時沒有DDDe ...
[英]Integrating Persona SDK in a SwiftUI View
我正在嘗試將 Person SDK v2 集成到 SwiftUI 視圖中。 它設置為 UIKit 從特定的 UIViewController 呈現。 這是我的代碼。 https://docs.withpersona.com/docs/ios-sdk-v2-integration-guide 我不 ...
[英]Updating published variables using DispatchQueue.main.async in SwiftUI
我正在開發一個 SwiftUI 應用程序,它顯示一個AVCaptureVideoPreviewLayer並且還實現了AVCaptureVideoDataOutputSampleBufferDelegate協議以在captureOutput(_: didOutput: from:)中執行一些自定義邏輯 ...
[英]Rotation of UIViewRepresentable View using AVFoundation
我使用CameraPreview ( UIViewRepresentable ) 作為UIKit和SwiftUI之間的橋梁。 CameraPreview配置有CameraModel並使用AVCaptureVideoPreviewLayer 。 CameraModel正在配置AVCaptureSe ...
[英]Changing bounds of a SwiftUI View when inserting UIKit functionality
我目前正在嘗試將 UIKit 功能插入 SwiftUI,因為我使用的 API 有一個 UIKit 教程,而我的項目是 SwiftUI。 對於上下文,這是我用來實現此功能的確切帖子: 將 UIKit 內容插入 SwiftUI 視圖層次結構 結果,我有 2 個不同的文件:PBViewController ...
[英]bg color of view controller status bar area in UIViewControllerRepresentable
我正在為視圖 controller 使用 UIViewControllerRepresentable,它可以完成我在 SwiftUI 中無法完成的事情。我試圖讓狀態欄區域顯示與深藍色相同的顏色,但它仍然是白色。 我早些時候嘗試將其嵌入導航 controller 中,但這也沒有用。 (忽略左側層次結 ...
[英]Working around a SwifUI layout bug involving UIViewControllerRepresentable
每當在 SwiftUI 視圖中使用UIViewControllerRepresentable時,我都會遇到一個錯誤。 我已向反饋助手提交報告,但需要解決此問題才能發布我的應用程序。 請注意,顯示錯誤不需要GeometryReader ,但它可能會闡明正在發生的事情。 重現步驟: 在縱向的 iPhon ...
[英]SwiftUI How to share a URL to Facebook using FBSDKShareKit and ShareDialog?
我嘗試在諸如此類的帖子中尋找解決方案,並且人們在這些帖子中提出了同樣的問題:如何使用SwiftUI將 url 共享到 Facebook? 我什至嘗試過這篇文章,有人問如何使用 SwiftUI 導出文件,但我的問題特別出在 Facebook,因為我沒有問題將 URL 共享到諸如 Whatsapp 之 ...
[英]Can not dismiss GKGameCenterViewController when using SwiftUI UIViewControlllerRepresentable
我有一個使用 SwiftUI 實現GKGameCenterViewController的UIViewControllerRepresentable 。我已經用 Game Center 完成了所有必要的設置,當在我的 SwiftUI 視圖中調用時,這個GKGameCenterViewControll ...
[英]How to upload multiple image on firebase using Swift's PHPickerController
因此在 Swift 中,您可以使用 UIImageViewController 輕松上傳圖像/視頻。 我做了研究並遇到了 PHPickerController,我正在嘗試將其合並到我的代碼中 - 因為我想要選擇多個圖像/視頻,一旦用戶按下“按鈕”,它就會將該批次推送到 firebase 雲。 我已經 ...
[英]Conditionally assigning a view of type UIViewControllerRepresentable fails to render changes when State is changed
按“FIRST”或“SECOND”文本視圖應更改 State selection並相應地更新selectedView 。 雖然調試器顯示按下“FIRST”或“SECOND”會導致重新評估body並正確分配selectedView ,但屏幕永遠不會更新以顯示正確的視圖。 相反,屏幕只顯示與select ...
[英]Can't drag down/dismiss UIColorPickerViewController
我正在使用 sheet() 方法將 UIColorPickerViewController 顯示為工作表,一切正常,但我無法再向下拖動/關閉視圖。 知道如何使拖動/向下關閉手勢起作用嗎? 謝謝! ...
[英]UIViewControllerRepresentable doesn't update currently only in iOS 14
我創建了 UIViewControllerRepresentable 來呈現彈出窗口。 我確實在 Xcode 13 和 iOS 15 上對其進行了測試,此鏈接上的視頻效果很好 但它在 Xcode 12.5.1 和 iOS 14.8 上無法按預期工作,如此鏈接上的視頻 我不知道為什么它在 iOS 1 ...
[英]Popover crash when update value using UIViewControllerRepresentable
我想在 iPhone 上制作彈出窗口,我注意到在 iPhone 中使用.popover時它總是顯示為工作表,但在 iPad 上它將顯示為彈出窗口所以我決定使用 UIKit 版本一切正常,直到我點擊按鈕更新視圖它會因這個錯誤而崩潰 我的代碼: 我如何使用它: } ...
[英]How can i show UIViewControllerRepresentable screen on button tap from UIViewRepresentable
我正在開發一個 SwiftUI 項目,在我的應用程序中,我必須顯示地圖,我可以使用UIViewRepresentable顯示地圖,現在地圖視圖將有一個按鈕,點擊該按鈕時,地圖視圖將需要顯示控制器(全屏方向)視圖,我知道我可以使用UIViewControllerRepresentable來做到這一點。 ...
[英]SwiftUI • How to implement half-Screen ShareSheet?
我使用UIViewControllerRepresentable在我的SwiftUI App實現了一個 ShareSheet 。 代碼 struct ShareView: UIViewControllerRepresentable { typealias Callback = (_ ac ...
[英]Navigating to a SwiftUI view from a button pressed in a UIViewControllerRepresentable
我正在使用 Swiftui 列表來顯示任務。 每個任務都有一個位置。 當您單擊列表行時,我正在使用 NavigationLink 導航到詳細信息頁面。 我正在使用 UIViewControllerRepresentable 創建一個 map 視圖,其中所有任務位置都在 map 上注釋。 我必須使用 ...
[英]Defer system edge gestures in only some view controllers. SwiftUI
我想導航到禁用系統邊緣手勢的自定義 UIView。 我正在使用帶有 UIViewControllerRepresentable 的 SwiftUI 生命周期並覆蓋preferredScreenEdgesDeferringSystemGestures。 我已經看到了 SceneDelegates 的 ...
[英]UIViewControllerRepresentable not correctly taking up space
我正在嘗試在 SwiftUI 視圖中使用自定義UIViewController 。 我設置了一個UIViewControllerRepresentable class ,它在makeUIViewController方法中創建了UIViewController 。 這將創建UIViewControll ...