Post

Replies

Boosts

Views

Activity

Reply to Custom color management
Hi, this is my code : import SwiftUI struct ColorManager { // create static variables for custom colors static let spotifyGreen = Color("SpotifyGreen") //... add the rest of your colors here} // Or you can use an extension// this will allow you to just type .spotifyGreen and you wont have to use ColorManager.spotifyGreenextension Color { static let spotifyGreen = Color("SpotifyGreen") // ... add the rest of your colors here}
Topic: App & System Services SubTopic: Core OS Tags:
Jan ’21
Reply to Color set has an unassigned color child.
Xcode version is 12.3 swift 5. I'm sure I chose the color as you write. Maybe it needs to type the right command in the terminal ? I named the color and selected the color in color settings, but it doesn't want to color with this color the little square next to appicon color(color name) is still white.
Topic: App & System Services SubTopic: Core OS Tags:
Jan ’21
Reply to Notifications with text field.
I am giving up on notifications, instead I would like to remove the code error: cannot use instance member 'number' within property initializer; property initializers run before 'self' is available from code: let number = "same number" let absolute = abs(number)
Topic: App & System Services SubTopic: Core OS Tags:
Jan ’21
Reply to Closure containing a declaration cannot be used with result builder 'ViewBuilder'
Again, the error appears : Closure containing a declaration cannot be used with result builder 'ViewBuilder' : struct ContentView_Previews: PreviewProvider { // <- error Closure containing a declaration cannot be used with result builder 'ViewBuilder' and  Struct 'ViewBuilder' declared here (SwiftUI.ViewBuilder)     static var previews: some View {         ContentView()     } }     static var previews: some View {         ContentView()     }        }
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’21