EN VI
Posts (0)
Questions (16)
2024-03-16 02:30:07
You could just use a VStack with a hidden copy of the blue rectangle above the red one: struct ContentView: View { private var blueRectangle: some View { Rectangle() .fill...
2024-03-16 04:00:08
To solve this with a @Query you first need to update your models by fully defining the relationship between them. Add a reference to TaskItems in Item, the property needs to be optional since the oth...
Tags: swift swiftui swift-data
2024-03-16 05:00:09
You might need to pass ContentView in preview: #Preview { ContentView() }
Tags: swift swiftui
2024-03-16 21:00:07
You can use a FocusState to track which button is currently selected by keyboard navigation. Using this, you can write a custom ButtonStyle that creates your custom focus effect when the button is foc...
Tags: swift macos swiftui
2024-03-17 00:30:05
No, it's correct. Although you passed the punti parameter on the init function, you didn't use this field directly. You recalculated it with vinte and pareggiate fields. Try to drag a debug point on s...
2024-03-17 06:00:10
The following is another approach and the code works on both macOS as well as iOS. The compiler directive addresses the NSImage/UIImage difference. The code works with images placed in the assets cata...
Tags: image swiftui

Login


Forgot Your Password?

Create Account


Lost your password? Please enter your email address. You will receive a link to create a new password.

Reset Password

Back to login