swiftui Questions

3

Solved

I would like to centre an image on the screen but make its height half of the screen height? How is this possible?
Almedaalmeeta asked 28/11, 2020 at 21:41

5

Solved

I'm trying to add a drag gesture over a vertically scrollable view like List (mainly to detect horizontal drag only). I want the drag gesture to work in higher priority than the scrollable view scr...
Blighter asked 26/8 at 4:18

2

I've been playing around with the .addArc method on the Path view in SwiftUI but I'm still confused as to what the tangent parameters are doing. I'm more of a visual learner and I haven't been able...
Overkill asked 28/3, 2021 at 3:25

1

I have been building a macOS app with SwiftUI and Xcode. At some point I started facing a crash with following error: The window has been marked as needing another Update Constraints in Window pas...
Gotha asked 25/10 at 13:10

1

I am trying to create a chat app using SwiftUI and Firebase. My current approach involves using chatrooms documents and within each chatroom have a subcollection of messages. Therefore, I am using ...

5

Solved

I am struggling with the locilization of some of my TextFields. Usually a "normal" localization of a Text() or TextField() works without any problem in my App if the text I want to translate is har...
Alimentary asked 8/5, 2020 at 16:53

5

can anyone tell how to make Responsive UI in Swift UI, which is compatible on all Device , and using figma Text like 24 then it shows iphone 8 and iphone 11 same view
Walls asked 22/7, 2022 at 6:33

2

How do I pass a Binding via the new .navigationDestination(for: , destination: )? import SwiftUI enum TestEnum: String, Hashable, CaseIterable { case first, second, third } struct ContentView: V...

5

Solved

I'm trying to reproduce a "Instagram" like tabBar which has a "Utility" button in the middle which doesn't necessarily belong to the tabBar eco system. I have attached this gif to show the behavi...
Pilkington asked 25/2, 2020 at 12:2

1

I tried to create a custom SwiftUI menu (based on UIMenu). However, I'm unable to trigger the primary action. It works when I tap on the CustomMenu but the programmatic action is not triggered. Wha...
Elsyelton asked 13/1, 2021 at 12:11

4

Solved

I tried running my app in landscape on an iPhone XR simulator and got a blank screen. The code below is my test. It works correctly on an iPhone 8 simulator and also not the iPhone XR simulator if...
Ruse asked 4/8, 2019 at 6:49

2

I have an immersive space that I want to add a gesture recognizer to. I want the ability to detect a pinch / tap gesture anywhere in the immersive space. ImmersiveSpace(id: "FlappyImmersiveSpa...
Doralin asked 25/12, 2023 at 0:23

2

Solved

Ever since Xcode 16, whenever there is a subview with a horizontal DragGesture inside a vertical ScrollView, horizontal drag gesture is detected on the subview but any scrolling up/down is not dete...
General asked 19/9 at 5:33

4

Solved

I have users uploading images from their mobile device and these images can be either are portrait or landscape. I have these images tiled similar to Instagram posts. The biggest problem I'm having...
Commissary asked 17/8, 2020 at 22:20

5

Solved

I am building a macOS-app using SwiftUI and the new App lifecycle. I would love to change the contents of the “About Window” (that appears when you tap “About DemoApp” in the apps’ menu) but have n...
Pulpboard asked 31/10, 2020 at 16:55

4

Solved

I have defined import SwiftUI import UniformTypeIdentifiers enum LayerType: String, Codable, RawRepresentable { case text case image } struct TransferableLayer: Identifiable, Hashable, Codable,...
Autotomy asked 15/12, 2023 at 23:0

1

When using the new DocumentGroupLaunchScene in a document-based app, the documents are opened without a navigation bar. The document title and back button are not visible and the user cannot return...
Batory asked 30/8 at 8:0

4

I am attempting to integrate SwiftUI into my project, and I am currently using a storyboard which is launched via my app delegate with the following code: _rootNavigiationController = [[UINavigati...
Korenblat asked 29/8, 2020 at 23:35

6

Description When an HStack'ed list row components start with a non-Text and is followed by a Text component, then line Divider start from the first Text occurrence in the row. What I expect is Divi...
Simas asked 8/1, 2023 at 9:35

5

I'm trying to place a toolbarItem on the trailing edge of the Toolbar (MacOS). I've gone thru the documentation, and found the following: .automatic: item is placed in the center .bottomBar: N/A fo...
Sneaker asked 16/9, 2021 at 9:33

4

Solved

I've implemented a List with a search bar in SwiftUI. Now I want to implement paging for this list. When the user scrolls to the bottom of the list, new elements should be loaded. My problem is, ho...
Giarla asked 22/1, 2020 at 21:18

1

I think this is a bug, it only appears when I try to access a custom color in the Assets Catalog. The color is displayed correctly but I have an error in the console. No color named '...' found in...
Neubauer asked 17/6 at 21:1

2

Solved

Goal: use a custom Font on SwiftUI, targeting MacOS. Problem: On iOS, custom Font works fine in SwiftUI: But on MacOS, it doesn't: import SwiftUI struct ContentView: View { var body: some View ...
Patina asked 22/11, 2022 at 16:42

3

Solved

Inside a widget, there is a button, Button(intent: AnAppIntent()) { // Button's label. } // It seems this modifier does not add any value. .invalidatableContent() connected to an AppIntent. struc...
Malicious asked 27/6, 2023 at 15:20

6

Solved

I know how to change the background color of a SwiftUI Views list, but I cannot find the default color. I've tried using the MacOS 'Digital Color Meter', but it just doesn't pick it up right. As yo...
Psychrometer asked 8/12, 2020 at 8:25

© 2022 - 2024 — McMap. All rights reserved.