Skip to main content

All Questions

0 votes
0 answers
90 views

Difference in the Coordinator for UIViewRepresentable and UIViewControllerRepresentable

Why does the Coordinator for UIViewRepresentable written so verbose? Given below are two fragments of code, one using UIViewRepresentable and one using UIViewControllerRepresentable: struct ...
MrProgrammer's user avatar
1 vote
0 answers
123 views

UIViewControllerRepresentable loses its alignment when integrated with other SwiftUI dynamic views

Targets: Tested with iPhone 16 Pro with iOS 18.0 (Simulator) iPhone 6s with iOS 15.8.1 (Physical device) I have an UIKit UIViewController component (instance of UIPageViewController, repo: here). I'...
Baffo rasta's user avatar
2 votes
1 answer
224 views

How to use UIVideoEditorController in SwiftUI?

I'm trying to use UIVideoEditorController in SwiftUI, but I'm having an issue where upon tapping Save, it doesn't trigger the delegate method to be called with the edited video path, and it also ...
wristbands's user avatar
  • 1,387
2 votes
1 answer
2k views

Go Back to SwiftUi View from UIViewControllerRepresentable

I want to return to the previous view via a UIViewController button in a UIViewControllerRepresentable. When I click on uiButtonBack, nothing happens. What is wrong in my code? MainContent: struct ...
gspawn's user avatar
  • 23
2 votes
1 answer
137 views

Issue where the same page is displayed twice in a row when using UIPageView from SwiftUI

Paging is achieved by using UIPageView from SwiftUI. I am having trouble with the same page being displayed twice in a row when swiping through pages. The condition that causes this phenomenon is the ...
yuto_zutomayo's user avatar
0 votes
0 answers
173 views

viewDidLayoutSubviews being called many times on orientation change in UIViewControllerRepresentable

I'm trying to implement a zoomable image in SwiftUI to display in a page view like the iOS photos app. I'm using UIViewControllerRepresentable to wrap a controller containing a UIScrollView to achieve ...
Cameron Delong's user avatar
0 votes
1 answer
202 views

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 ...
jy02411368's user avatar
0 votes
0 answers
159 views

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, ...
harcipulyka's user avatar
0 votes
0 answers
276 views

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....
amanda's user avatar
  • 1
0 votes
1 answer
1k views

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 ...
aisha's SO's user avatar
0 votes
1 answer
167 views

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 ...
Jacob F's user avatar
  • 157
0 votes
1 answer
657 views

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 ...
Basel's user avatar
  • 700
3 votes
3 answers
3k views

SwiftUI • How to implement half-Screen ShareSheet?

I implemented a ShareSheet into my SwiftUI App using UIViewControllerRepresentable. Code struct ShareView: UIViewControllerRepresentable { typealias Callback = (_ activityType: UIActivity....
christophriepe's user avatar
5 votes
3 answers
8k views

UIViewControllerRepresentable not correctly taking up space

I am trying to use a custom UIViewController in a SwiftUI view. I set up a UIViewControllerRepresentable class which creates the UIViewController in the makeUIViewController method. This creates the ...
Timmy's user avatar
  • 326
2 votes
1 answer
2k views

UIViewControllerRepresentable height is too big

I am trying to add UIKit context menu to a SwiftUI view because SwiftUI context menu is pretty limited. I managed to do it, but UIViewControllerRepresentable takes more space than it needs. How can I ...
bomatix's user avatar
  • 21

15 30 50 per page