All Questions
332
questions
0
votes
1
answer
40
views
SwiftUI Image scaledToFill() takes entire screen width
I'm new to SwiftUI and I'm trying to implement a card :
I want the image to be 124 units tall. Everything works fine until I try to add scaledToFill() to the Image.
Here is my code:
var body: ...
0
votes
1
answer
37
views
How do I fix this Error implementing map in SwiftUI
I am trying to create my first app, it is an app that allows me to follow the progress of my enduro (dirt bike) sessions, both in race and training mode, it happens that one of the basic features that ...
0
votes
1
answer
43
views
How do hide tab bar when going into view?
I have a TabView in my SwiftUI app, and one of the tabs contains a list with NavigationLinks to other views. I don't want the tab bar to be on the screen when I navigate to a new view, so it is only ...
0
votes
0
answers
35
views
Unexpect SwiftUI NavigationStack Behavior
How would I go about initializing a navigationpath with a already populated data array? For example I might want to load in path the user have previously navigated through. I'm trying to use this ...
1
vote
0
answers
51
views
XCode 15.4 keeps crashing when trying to "Record UI Tests"
I'm using Xcode Version 15.4 (15F31d) and when I click the Record UI Tests icon, as soon as it finishes building, Xcode crashes. I'm not 100% sure why this is happening, but I've seen multiple bug ...
-1
votes
0
answers
91
views
How to determine the iOS version is Beta or Not?
I have a requirement where I need to call an API with the following payload from the iOS device
{
"version" : "18",
"model" : "iPhone13,2"
}
version refers ...
0
votes
0
answers
39
views
SwiftUI app makes the keyboard flicker if TextField is in password content mode
As the title says, the keybord will flicker when I use .textContentType(.password). I have no idea what is going on and this is very distractive for the users.
It only happens in real devices and not ...
0
votes
1
answer
35
views
Change the Background of Pickers/Toggle in SwiftUI
I'm creating a basic app for meditation to continue learning SwiftUI. I am unsure how to get the Picker and Toggle views to have the same background as is being used within the Form, that is, not the ....
0
votes
0
answers
33
views
Using .navigationBarTitleDisplayMode(.inline) makes .searchable() initially visible, how to initially hide search bar until user scrolls up?
The default behavior in the absence of .navigationBarTitleDisplayMode(.inline), the search bar is not visible until the user scrolls up.
When .navigationBarTitleDisplayMode(.inline) is applied, ....
0
votes
0
answers
54
views
SwiftUI disable simultaneous gesture
I have an app that needs audio input, and the button gesture needs to recognize long press.
The View is like
VStack {
ScrollView
InputButton
}
The gesture modify is
....
0
votes
1
answer
99
views
SwiftUI layout doesn't look the same on all devices
I have installed my test code on two of my phones. I have an iPhone XS Max and an iPhone 11. The app looks different on each phone and I am not sure how to fix it so it looks the same.
I have attached ...
0
votes
1
answer
54
views
SwiftUI doesn't update when variable is changed in appDelegate
I am trying to have the app check for whether notification access is available, then display ContentView if it is, or NotificationView if it isn't. What I have does this great, when it runs it checks ...
0
votes
1
answer
210
views
Unable to process stripe payment using Apple pay. The payment method type apple_pay is invalid
I am trying to add stripe payment processor to my apple swiftui code. When I am trying to make the payment I keep getting the following error in my console.
Server side error:
Received data: {'amount':...
-1
votes
1
answer
77
views
Camera preview with transparent area
I want to create a fullscreen camera preview where the middle of the view is a rectangle. Everything inside the rectangle should be opaque and everything outside should be semi-transparent:
The solid ...
0
votes
1
answer
165
views
SwiftUI: Floating Textfield placeholder is not animate as expected
I really need your help with this. The placeholder of the password field does not animate until I start typing something. However, the email address label animation works fine as expected. When I tap ...