swift tag

599 questions


1 answers
445 views
0
When you want to use NavigationLink to transition to the screen.

If you use the following code when you want to transition with NavigationLink, you will get an error.Why?error messages:Cannot convert value of type 'String' to expected argument type'()->Label'Cur...

1 years ago

1 answers
431 views
0
I want to empty the value of the guard array.

We are developing task applications using UserDefaults.I want to implement the All Deleted feature, which removes all TableView contents, and I want to empty the saveList of the variable that contains...

1 years ago

1 answers
421 views
0
Do not use UserDefaults such as data storage

How should I use CoreData?Also, how do I save it?I checked, but what is the item?

1 years ago

1 answers
430 views
0
I want to change the background color of the cell.

struct ContentView:View { @State var color=false varbody:someView { List {…}.listBackground (color?.white:.black) Toggle (text, isOn:$color) }}does not change the color.I wonder if the writing meth...

1 years ago

1 answers
383 views
0
Changing the Color of Cells

List{Text (Text).listRowBackground (Color.black)}in The color does not change.

1 years ago

1 answers
327 views
0
I want to keep the TextField characters in the app even if I do a task kill (restart the app).

I'm a beginner studying Swift.I created a memo widget app by referring to YouTube videos.The feature is that when you type characters in the TextField in the app, the widget displays the characters yo...

1 years ago

1 answers
439 views
0
swiftui alert type 'CGFloat' has no member 'main'

In swiftuiTextEditor(text:$text).frame (width:.main.bounds.width*0.8, height:200)If so, Type 'CGFloat' has no member 'main' The alert appears.Before that, I had UISscreen.I also got an alert with UIKi...

2 years ago

1 answers
292 views
0
swiftui alert Cannot use instance member '$text' with in property initializer; property initializers run before 'self' is available

In swiftuiTrying to instantiate TextEditorCannot use instance member '$text' with in property initializer; property initializers run before 'self' is available The alert appears.let textEditor=TextEdi...

2 years ago

1 answers
449 views
0
swiftui alert 'navigationBarLeading' is unavailable in macOS

When I try to add a bar item in swiftui, I get the following alert: 'navigationBarLeading' is unavailable in macOSI thought it was an update, but it didn't go away.Is the bar item marked differently?

2 years ago

1 answers
305 views
0
swiftui Alert Missing argument for parameter 'text' in call

When swiftui tries to navigate from ContentView to the side menu, SideMenuView (isOpen:$isOpenSideMenu)If you write Missing argument for parameter 'text' in calland Insert', text:<#Binding<Strin...

2 years ago
- 1 - »

© 2024 OneMinuteCode. All rights reserved.