Metal and SwiftUI

Hello everyone,

I’m curious to know if anyone has tested using a metal kit view in SwiftUI. I was thinking about experimenting to see if there are any performance or other issues. But I thought someone here might have given it a go already. I’d be interested to know your experience. Would be a good topic for the next edition.


It’s possible to use a Metal view using UIViewRepresentable and UIViewControllerRepresentable as with any other non-SwiftUI view. There’s no real direct support in the current version for metal other than the drawingGroup() modifier uses Metal to combine views into an offscreen image before display. It’s only useful for complex views.

I’m also hoping more direct support comes with the next version of SwiftUI.