Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
91 views

I have a custom UITextView wrapped in SwiftUI using UIViewRepresentable. The goal is to have a dynamic height text view that grows as the user types. Here is a simplified version of my code: ...
Ivan Magda's user avatar
1 vote
1 answer
42 views

I have a UIViewRepresentable wrapping an UIView that contains a UILabel. I'm trying to position this representable view inside a HStack and I'd like it to take the width of the underlying label. Here ...
Vincent's user avatar
  • 669
2 votes
0 answers
52 views

The Issue I've created a zoomable image component for SwiftUI by wrapping UIScrollView and UIImageView using UIViewRepresentable. The core functionality, like pinch-to-zoom, double-tap-to-zoom, and ...
Silenter's user avatar
1 vote
1 answer
216 views

I found different examples for UIViewRepresentables which host a SwiftUI View, e.g. here. (see code below) The approach is always to create a UIHostingController with the UIViewRepresentable and add ...
Andrei Herford's user avatar
1 vote
1 answer
43 views

I have the following UIViewRepresentable to load a webview. struct SViewerWebView: UIViewRepresentable{ var url: String var token: String @Binding var isLoading: Bool func ...
MiguelG's user avatar
  • 471
0 votes
1 answer
86 views

I am trying to write a NSViewRepresentable wrapper for NSOutlineView that allows users to programmatically expand/collapse items from the SwiftUI side. I am doing this because the SwiftUI List(_:...
Sweeper's user avatar
  • 292k
0 votes
1 answer
354 views

I have a custom UITextView as an UIViewRepresentable in my SwiftUI app. Using TextKit2, I determine regions where I do drawing. Everything works fine, except when I rotate the device (Simulator or ...
koen's user avatar
  • 5,862
0 votes
0 answers
126 views

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
1 answer
561 views

I'm trying to incorporate a UIViewRepresentable into my SwiftUI app. My goal is that the view is displayed with the dimensions (especially height) it needs to fit the content. However, SwiftUI somehow ...
vaely's user avatar
  • 41
2 votes
0 answers
78 views

Explanation for reproducing: I'm using FSCalendar to display a calendar in my SwiftUI app. When a date is tapped I display a sheet on my CalendarView.swift. I have events for some dates and when those ...
Alp Durak's user avatar
0 votes
1 answer
133 views

I am encountering an issue when combining SwiftUI TabView with UIViewRepresentable. I have customized a video/stream player using MobileVLCKit and UIViewRepresentable. I have a view that displays ...
dtrognn's user avatar
  • 44
1 vote
1 answer
99 views

I have SwiftUI View where are two normal TextFields and one UIViewRepresentable UITextField. I need to turn off possibility of copy/paste/select on UIViewRepresentable while typing values. I'm doing ...
thadae's user avatar
  • 13
2 votes
0 answers
94 views

I am encountering an error when attempting to cache decorations in a UICalendarView. The code to reproduce the error is as follows: class Coordinator: NSObject, UICalendarViewDelegate, ...
shinking's user avatar
0 votes
1 answer
358 views

this page is loading twice. I Tried to intercept the error, using some "isLoading" @State var, but is not working. I think in my setup there is some other error, maybe in the way I ...
biggreentree's user avatar
  • 1,971
1 vote
0 answers
214 views

I'm attempting to implement CalendarKit using SwiftUI's UIViewControllerRepresentable. The example provided by the library is in UIKit. I've successfully displayed the UI, but when I try to pass dummy ...
Jayant Badlani's user avatar
0 votes
2 answers
301 views

I am working on showing the React-native-View in the swift project. I download the bunlde file through asynchronous operation, save the bundle file in the app directory, and use it to create the ...
viteknow's user avatar
0 votes
0 answers
173 views

For extra context, this is a follow up question to this. Would appreciate reading that post as theres quite a bunch of context as to my initial approach and what I need to ultimately accomplish. I ...
stompy's user avatar
  • 337
1 vote
0 answers
86 views

Whenever I try to use the below code snippet in our existing UIKit project, I get the following error. When I move the same code to another Xcode project, it works perfectly. On clicking Xcode ...
sharanabasappa sugoor's user avatar
3 votes
1 answer
994 views

Continuing from my previous question, what is the best way to observe several state changes from a UIViewRepresentable? Previously, I required to only observe changes to one property userWon. However, ...
batman's user avatar
  • 2,501
0 votes
2 answers
511 views

I'd like to wrap a CaptureSession in a SwiftUI view. The current way I'm doing this is: struct VideoPreviewView: UIViewRepresentable { @EnvironmentObject var cameraManager: CameraManager func ...
Jason Eveleth's user avatar
1 vote
0 answers
484 views

So let's say we have the following code: struct MyView: UIViewRepresentable { @Binding var myValue: Int func makeUIView(context: Context) -> MyOtherView { let someValue = ...
irrbloss's user avatar
  • 525
0 votes
1 answer
769 views

So I have the following in my project. ContentView ~ contains 3 vstacks. CustomView ~ a custom view with a containerView with fixed size of 300x300 that should always be centered in ContentView ...
batman's user avatar
  • 2,501
1 vote
0 answers
161 views

Can anybody tell me how can i set offset in a ScrollView?I have checked ScrollTo(), which scroll to index wise. But I want to move scrollview with offset. I have also checked Custom ScrollView( from ...
Nuhash Haque's user avatar
0 votes
0 answers
140 views

So I want to view pdf from core data but stuck on this issue struct PDFView: View { var pdfData: Data? var body: some View { if let pdfData = pdfData, let document = PDFDocument(data: ...
Ghemma Garay's user avatar
0 votes
1 answer
726 views

I have a custom modifier on a SwiftUI View to pan and zoom an Image. I need to get the location where the user long presses. The modifier uses an UIView (UIViewRepresentable) under the hood where the ...
DeveloperSammy's user avatar

1
2 3 4 5 6