Questions tagged [uiviewcontrollerrepresentable]

75 questions
0
votes
1 answer

About the problem of using UIViewController in swiftui that cannot update uibutton or uiview frame ui

This problem has troubled me for three days So I'm hoping to ask for some help Thank you so much screenWidth & screenHeight The value is correct and updated, but I don't understand why the UIViewController's view and the contained UIButton or…
0
votes
0 answers

Different behaviour when using ARSCNView through UIViewControllerRepresentable

I am following a tutorial that is using ARSCNView with ARImageTrackingConfiguration to create an interactive AR Image Anchor. When you scan a specific image, a swift UI view is overlayed on top of it, and when the button is tapped in that Swift UI…
0
votes
0 answers

Get rid of duplicate code of three UIViewController

I'm using UIViewControllerRepresentable to adjust brightness in SwiftUI. I have 3 buttons for 100%, 50%, 0% brightness. To enable the buttons I've created 3 UIViewControllerRepresentable, 3 UIViewControllers, and 3 struct. How can I combine them, or…
0
votes
1 answer

How can I trigger UIViewControllerRepresentable functions to fire after navigating between views?

I have a SwiftUI project in which uses UIViewControllerRepresentable to access a DataScannerViewController. The HomeView displays the camera data scanner and it is the initial screen shown when the app launches. If I navigate to another view from…
hallux
  • 61
  • 1
  • 8
0
votes
1 answer

Creating a SwiftUI UIViewControllerRepresentable for a ViewController that doesn't have a ViewController Delegate

I am trying to build a SwiftUI tvOS app. As you can see here, I am trying to create a SwiftUI View using a UIViewControllerRepresentable, specifically for the DDDevicePickerViewController. However, I noticed that there is no…
Saamer
  • 4,687
  • 1
  • 13
  • 55
0
votes
0 answers

Google maps SDK not working on SwiftUI app

I've followed the steps of adding a map to my iOS app and then created a struct to "bridge" between swiftUI and UIkit but for some reason when I call the struct nothing would show whatsoever. This is my viewcontroller: import CoreLocation import…
0
votes
1 answer

How do I bridge between SwiftUI and UIKit

I'm currently working on a project using both swiftUI and UIKit. I made a ViewController to work on, but now I want to use that as a navigation link in the original content view. The first thing I tried was the normal NavigationLink{ …
aisha's SO
  • 47
  • 1
  • 6
0
votes
1 answer

Integrating Persona SDK in a SwiftUI View

I'm trying it integrate the Person SDK v2 in a SwiftUI view. It's setup for UIKit to present from a specific UIViewController. Here is my code. https://docs.withpersona.com/docs/ios-sdk-v2-integration-guide I'm not sure how to call my present…
Berry Blue
  • 15,330
  • 18
  • 62
  • 113
0
votes
1 answer

Changing bounds of a SwiftUI View when inserting UIKit functionality

I am currently trying to insert UIKit functionality into SwiftUI as the API I am using has a tutorial with UIKit and my project is SwiftUI. For context, this is the exact post I used to implement this functionality: Inserting UIKit content into a…
Jacob F
  • 135
  • 3
  • 13
0
votes
1 answer

Can not dismiss GKGameCenterViewController when using SwiftUI UIViewControlllerRepresentable

I have a UIViewControllerRepresentable implementing a GKGameCenterViewController using SwiftUI. I have done all necessary setup with Game Center and this GKGameCenterViewController does appear when called in my SwiftUI view. However, I can't dismiss…
0
votes
1 answer

How to upload multiple image on firebase using Swift's PHPickerController

so in Swift, you have the ability to upload an image/video with ease using UIImageViewController. I did research and came across PHPickerController and I am trying to incorporate that into my code - for the reasoning being that I want multiple…
0
votes
1 answer

UIViewControllerRepresentable doesn't update currently only in iOS 14

I created UIViewControllerRepresentable to present popover. I did test it on Xcode 13 and iOS 15 it working great as video on this link But it doesn't work as expected on Xcode 12.5.1 and iOS 14.8 as video on this link I don't know why it doesn't…
Basel
  • 550
  • 8
  • 21
0
votes
1 answer

Popover crash when update value using UIViewControllerRepresentable

I want to make popover on iPhone , I notice when using .popover in iPhone it will always show as sheet , but on iPad it will show as popover so I decide to use UIKit version everything is working fine until I tap on Button to update the view it will…
0
votes
1 answer

Navigate from one embedded UIViewController in swiftUI to another embedded UIViewcontroller in swift UI

I have a UIViewController which is embedded in swiftUI View struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView(overlayShow: OverlayShow()) } } struct OnboardingWrapper: UIViewControllerRepresentable…
0
votes
1 answer

Apple TV: Search bar with keyboard and filters

I'm implementing a Search feature for my app for AppleTV. I was wondering if anyone knows how to implement for apple tv this search bar with keyboard + filtering (as screenshot bellow). I found that the Music App for apple tv enable us to filter the…