Harley-xk / MaLiang

iOS painting and drawing library based on Metal. 神笔马良有一支神笔(基于 Metal 的涂鸦绘图库)
MIT License
1.47k stars 208 forks source link

Embedding the Canvas in a Swift UI View? #119

Open tprasad23 opened 3 years ago

tprasad23 commented 3 years ago

Hi, I was curious if anyone has been able to embed this into a Swift UI view ? I'm unable to get the drawing function working.

X901 commented 2 years ago

I tried but to convert it to SwiftUI view but I got error with Canvas 'Canvas' is ambiguous for type lookup in this context it looks like Swiftui doesn't see Canvas and View !