如何删除警告notifyWhenInteractionEndsUsingBlock已过时

问题描述 投票:-1回答:1

代码具有notifyWhenInteractionEndsUsingBlock的实现,并且已过时,它发出警告。

我添加了新方法notifyWhenInteractionChangesUsingBlock,删除不推荐使用的方法,然后弹出另一个警告,

类不符合协议'UIViewControllerTransitionCoordinator'。添加存根以缺少协议要求。

如果单击修复按钮,它将再次实现不推荐使用的方法。

ios objective-c ios13
1个回答
0
投票

您不应该声明符合UIViewControllerTransitionCoordinator。您不是协调员。协调员是协调员。您是视图控制器。 notifyWhenInteractionEndsUsingBlock不是您要实现的;这是你所说的。虽然说实话,但我从未找到理由来称呼它。

也许您是说UIViewControllerTransitioningDelegate吗?

或UIViewControllerAnimatedTransitioning吗?

或两者皆是?

© www.soinside.com 2019 - 2024. All rights reserved.