SwiftUI UITextView Coordinator not working

前端 未结 2 673
盖世英雄少女心
盖世英雄少女心 2021-01-12 18:38

I have wrapped a UITextView in a UIViewRepresentable and included a Coordinator as UITextViewDelegate, but the events are

2条回答
  •  心在旅途
    2021-01-12 19:14

    You have to add textView.delegate = context.coordinator to makeUIView to register the coordinator to receive updates from UITextView.

提交回复
热议问题