UIViewController calling each other's delegate

后端 未结 3 1276
臣服心动
臣服心动 2021-01-14 19:47

I have two UIViewController, each has it\'s delegate and is calling one or the other. One class is called TopicViewController and the other is MentionViewController, the cod

3条回答
  •  无人共我
    2021-01-14 20:10

    I think your intuition is correct.

    You should be able to solve this problem by declaring the 2 protocols in a header file of their own, then import this file from your .m files. This will break the cycle.

提交回复
热议问题