EN VI
Posts (0)

No data results!

Please check back again in feature!

Questions (16)
2024-03-10 09:30:04
There are two main issues with the code: When you declare your Timer as a let property on the View, whenever that View gets re-evaluated, the Timer gets recreated. If you want the Timer to continue t...
Tags: swiftui
2024-03-10 19:00:08
This problem is happening because the GeometryReader is inside a ScrollView, which stops it from being as greedy as usual. Consequently, the height of the GeometryReader is very small. Since you know...
Tags: ios swiftui vstack
2024-03-10 19:30:06
You can use View Extractor to get views out of a ViewBuilder. Do note that this uses unstable APIs. Here is an example: struct ContentView: View { @State private var selectionIndex: Int = 2...
Tags: swiftui picker viewbuilder
2024-03-11 15:00:12
Since the loadMainScene() static function was marked with the @MainActor annotation, which means this function will perform on the main thread. So, you also need to add @MainActor to your init functio...
2024-03-12 01:30:04
Do you mean, the overlay is not extending into the safe area? A pre-requisite for this to be possible is that the view the overlay is being applied to must be in contact with the safe area insets. The...
Tags: swiftui
2024-03-12 09:00:08
Try this example code, fixing some minor code issues, compiles for me. struct YourRoutines: View { @State private var days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "S...
Tags: swift swiftui foreach
2024-03-13 01:30:06
You should not use tag for identifying views. tag is very hard to read. The view trait key for it is an internal type, so you'd need to use Mirror. You can use the environment instead. Create an envir...
Tags: ios swiftui viewmodifier
2024-03-13 10:00:05
The overlay modifier takes an alignment argument which defaults to .center. Try passing .topLeading instead of using .offset: Button { } label: { Image(systemName: "\(item).circle.fill")...
Tags: ios swiftui overlay
2024-03-15 14:30:04
try replacing your Text( "" ) with VStack{}, works for me.
Tags: swiftui toolbar
2024-03-16 00:30:06
The error is pointing out that the API returns an array of Plant, i.e. [Plant], so change the method signature accordingly: func fetchPlantsFromAPI() async throws -> [Plant] {…} Then change the @Stat...
Tags: swift 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