swiftui Questions

2

I've seen a lot of answers that simply say to use the limit limit view modifier but it doesn't seem to work: mport SwiftUI struct TextEditorTest: View { @State var text: String = "Type in ...
Shuman asked 28/6, 2021 at 23:43

1

I'm curious, is there a way to get TipKit to show a tip on-demand in a reliable way? I want a tip to appear only when the user taps on a help button, but I can't get it to happen consistently (ie a...
Understandable asked 27/11, 2023 at 21:27

7

Good Day, I was working on a project and did a build onto my device for some testing and close down the computer for a few days. When I went to open the project back up today Im being met with this...
Heathenish asked 16/2, 2023 at 14:35

2

Solved

I have the following (on iOS 16): NavigationStack { Form { .... } } .navigationTitle("Hello") .navigationBarTitleDisplayMode(.inline) The navigation bar background only appears when ...
Karolynkaron asked 28/1, 2023 at 12:7

8

Solved

My app was running perfectly without any errors or warnings yesterday. But when I tried to run it today, the build failed - I haven't changed anything in the code: Undefined symbol: __swift_FORCE_L...
Magritte asked 9/11, 2021 at 6:44

5

Solved

The code below is working fine in iOS 17.0.1, but in the latest update, 17.1 DatePicker does not open when we tap on it. After several tries, I found that on the long press, around 2-3 seconds, it ...
Tarantula asked 27/10, 2023 at 11:5

3

I want to disable the option of copy/paste from my Textfield in SwiftUI. How to achieve that?
Marsh asked 10/2, 2020 at 10:33

3

Solved

I am using the new swift charts framework to display some data. In seeking to manually control the frequency of the x-axis AxisValueLabels, as well as adjust the color, I implemented the following:...
Salient asked 28/10, 2022 at 20:19

3

Solved

I'm trying to get my navigation view style to be stacked on iPad but default on iPhone. Code: .navigationViewStyle(UIDevice.current.userInterfaceIdiom == .pad ? StackNavigationViewStyle() : Defau...
Disjoint asked 2/12, 2019 at 18:52

7

Solved

I'm building my first SwiftUI app. For some reason when I command+click on an HStack the "Extract Subview" and other options don't show up. Any reason why I'm not seeing these options? I'm using Co...
Reverberation asked 2/5, 2020 at 19:38

1

Trying to programmatically navigate in my app, but I can't get navigationDestination(item:destination:) to work on macOS. It works fine on iOS, but on macOS nothing happens when clicking the button...
Fraktur asked 5/11, 2023 at 22:36

4

Solved

I want to have an optional @ObservedObject in SwiftUI but I keep getting a compile time error of. Property type 'AModel?' does not match that of the 'wrappedValue' property of its wrapper type 'Obs...
Weihs asked 12/4, 2021 at 18:33

1

So I have a minimum target of iOS 16, am using .sheet() with .presentationDetents([.medium]) and it works fine on iOS (iPhone). But when I load it on iPadOS it's always a fullsized sheet, seemingly...
Primp asked 29/6, 2023 at 14:22

3

I've read a number of questions about this error that relates to dismissing sheets, but none dealing with SwiftUI's Map. The following code generates this error. Nothing is being updated in the vie...
Desiderative asked 23/9, 2022 at 16:36

3

Solved

I'm using SwiftData & SwiftUI and my App keeps crashing in the background. I sadly can't reproduce it, I'm only seeing the TestFlight crash reports. These are my observations so far: Having ei...
Anemone asked 3/4 at 6:11

3

I created a new SwiftUI project but the default code will not load in the live preview window. I get the following error every time: "Cannot preview in this file - Update failed". I am running Xcod...
Futility asked 30/3, 2020 at 1:9

10

Solved

I have a basic SwiftUI date picker that shows a calendar widget when tapped: DatePicker( "Date", selection: $date, in: ...Date(), displayedComponents: [.date] ) When you select a da...
Shell asked 10/10, 2021 at 15:36

5

Solved

When creating a class conforming to ReferenceFileDocument, how do you indicate the document needs saving. i.e. the equivalent of the NSDocument's updateChangeCount method?
Dubiety asked 10/9, 2020 at 13:38

3

Solved

I am developing a macOS and iOS app with SwiftUI. Both are using CoreData and iCloudKit to sync data between both platforms. It is indeed working very well with the same iCloud Container. I am faci...
Swine asked 6/9, 2020 at 12:20

6

Solved

Let's say I have a custom view inside of a sheet, something like this VStack { Text("Title") Text("Some very long text ...") } .padding() .presentationDetents([.height(250)]) ...
Fomentation asked 17/11, 2022 at 7:22

1

I need to make a SwiftUI view that can be scrolled both vertically and horizontally, with multiple columns, where the leftmost ones don't scroll horizontally, but the following ones do. Think like ...
Nudicaul asked 18/3, 2022 at 4:42

4

When I enter email and password information in my Login screen and tap either "Log in" or "Create Account" I get this message in my app error message in app and in my console I ...
Majors asked 11/1 at 13:39

2

NavigationView nests TabView, I have a List, and push to the next page When the application returns to the background and returns to the active state, the push page automatically pops up. If TabVie...
Cistaceous asked 18/3, 2022 at 8:33

1

I have multiline text for which I want to give specific line-height. I tried with linespacing but I can see no changes. Please help with the above query. Thank you for help
Taliesin asked 4/8, 2021 at 17:49

6

I have added the the correct Facebook sdk values into info.plist as the Quick Start guide shows & added the SDK using the package manager, but I still get this error Thread 1: App ID not found....
Enliven asked 30/5, 2021 at 19:40

© 2022 - 2024 — McMap. All rights reserved.