title: Want to convert this code into Pure SwiftUI code. no autolayout, no UIViewRepresentable, no UIHostingController
body: <ul>
  <li>Code is working want to convert into Pure SwiftUI code. without UIViewRepresentable, UIHostingController please let me know how can I achieve. Thanks *</li>
  </ul>
  
  <p>struct PathAnimatingView: UIViewRepresentable where Content: View {</p>
  
  <pre><code>var path: Path
  let content: () -&gt; Content
  
  func makeUIView(context: UIViewRepresentableContext&lt;PathAnimatingView&gt;) -&gt; UIView {
  
      let view = UIView(frame: .zero)
  
      let animation = CAKeyframeAnimation(keyPath: #keyPath(CALayer.position))
      animation.duration = CFTimeInterval(10)
      animation.repeatCount = 10
      animation.path = path.cgPath
      animation.keyTimes = [0.0,0.5,1.0]
      animation.isRemovedOnCompletion = true
      animation.fillMode = .forwards
      animation.timingFunction = CAMediaTimingFunction(name: .linear)
  
      let sub = UIHostingController(rootView: content())
      sub.view.translatesAutoresizingMaskIntoConstraints = false
  
      view.addSubview(sub.view)
      sub.view.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true
      sub.view.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
  
      view.layer.add(animation, forKey: "snake")
      return view
  }
  
  func updateUIView(_ uiView: UIView, context: UIViewRepresentableContext&lt;PathAnimatingView&gt;) {
      print(uiView)
  }
  </code></pre>
  
  <p>}</p>