skip to Main Content

Wrong offsets when displaying multiple VNRecognizedObjectObservation boundingBoxes using SwiftUI – Ios swift

I am using Vision to detect objects and after getting [VNRecognizedObjectObservation] I transform the normalized rects before showing them: let transform = CGAffineTransform(scaleX: 1, y: -1).translatedBy(x: 0, y: -CGFloat(height)) VNImageRectForNormalizedRect(normalizedRect, width, height) // Displayed with SwiftUI, that's why I'm applying…

VIEW QUESTION

Get elements to fill width screen in LazyHStack – Ios swift

I have a LazyHstack in a horizontal scrollview : struct HorizontalSpotsList: View { var spots: [Spot] var body: some View { ScrollView(.horizontal){ LazyHStack(alignment: .center, spacing: 0){ if (!spots.isEmpty){ ForEach(spots.prefix(upTo: 3) , id: .self) { spot in Text("Test").frame(maxWidth: .infinity) .background(RoundedRectangle(cornerRadius: 25)…

VIEW QUESTION
Back To Top
Search