title: Type '()' cannot conform to 'View'; only struct/enum/class types can conform to protocols; calling functions with SwiftUI
body: <p>I have a Swift UI struct called MyWatchView with this stack.</p>
  
  <pre><code>        VStack (alignment: .center)
          {
              HStack
              {
                  Toggle(isOn: $play)
                  {
                      Text("")
  
  
                  }
                  .padding(.trailing, 30.0)
                  .hueRotation(Angle.degrees(45))
                  if play
                  {
                      MyWatchView.self.playSound()
                  }
              }
          }
  </code></pre>
  
  <p>It also has @State private var play = false; And a function playSound like this:</p>
  
  <pre><code>static private func playSound()
  {
      WKInterfaceDevice.current().play(.failure)
  }
  </code></pre>
  
  <p>I am getting an error of Type '()' cannot conform to 'View'; only struct/enum/class types can conform to protocols I think this is probably something that I am not understanding in the way structs work in Swift.
   I am trying to use a timer to trigger the play sound function. This is my code in my View Controller Class from my iOS storyboard app <code>timer = Timer.scheduledTimer(timeInterval: interval, target: click class, selector: #selector(clickClass.repeatSound), userInfo: clickClass, repeats: switchView.isOn)</code></p>