Post

Replies

Boosts

Views

Activity

Reply to How to solve the error: Type '()' cannot conform to 'View' when the problem is inside "if"
like an example, if the only thing I need to do is use "print()" if I do: func one() -> some View { print("Hello") return Text("One") } it will print("Hello") and return Text("One") is there a way return "nothing" ?, just print() because if I try to use something like this: func one() { print("Hello") } I have the same error.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’22