How to print() to Xcode console in SwiftUI?

后端 未结 9 1908
刺人心
刺人心 2020-12-14 00:24

So I tried to put a print statement while debugging in a SwiftUI View.

print(\"landmark: \\(landmark)\")

In the following body.

<         


        
9条回答
  •  一生所求
    2020-12-14 00:51

    You can not print in body structure i.e. a structure which is some view type.For print you need to make function out of body structure and call it using button or something else.

提交回复
热议问题