Replying to @crawforb: "The suggested code works great, except I can’t get it to update continuously. It will load perfectly, call draw once, then not call it again unless I’m resizing the window. Is there anyway to call draw continuously?"
I had the same issue. The draw() function in coordinator was only called once. I am wondering if you have solved this problem. Thanks.
oops, solved the problem by adding mtkView.isPaused = false, and commenting other settings.
Post
Replies
Boosts
Views
Activity
Hi rthart, thanks for your response. I had exactly the same experience like you, and now it is working. Cheers!
Here is another resource regarding to UIKit Integration (available in YouTube) into SwiftUI by Stanford.
Thanks for sharing the code. But the code is not working for me, got errors like "Cannot find type NSViewRepresentable in scope".