How to print() to Xcode console in SwiftUI?

后端 未结 9 1903
刺人心
刺人心 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 01:01

    You can't because you're in a computed property. You need for example a button and in the action you define the print. Or work with breakpoints

提交回复
热议问题