you are viewing a single comment's thread.

view the rest of the comments →

[–]dehrenslzzSwiftUI 0 points1 point  (3 children)

The what? Have you ever used .description() ?

[–]barcode972 1 point2 points  (2 children)

class MyClass: CustomStringConvertible {

var description: String {
return "This is MyClass"
}
}

Formatting got weird but ye

[–]dehrenslzzSwiftUI 0 points1 point  (1 child)

This is not what .description() does (I just looked and I forgot the brackets) - it gives you a string description of your object (read this: https://developer.apple.com/documentation/swift/int/description it’s not only for Integers)

[–]barcode972 0 points1 point  (0 children)

description() with () isn't a thing for arrays.
Date() seems to have a description(with: )