Avoiding compiler warnings when doing message forwarding

后端 未结 2 837
既然无缘
既然无缘 2021-01-19 11:54

I created a class that wraps a UITextView and adds some ui elements. I want the new class\' API to be identical with UITextView, so I use message forwarding (listing below)

2条回答
  •  北恋
    北恋 (楼主)
    2021-01-19 12:32

    Simple solution is to use dynamic typing and declare aMyTextView as id, the warnings will go away.

提交回复
热议问题