【发布时间】:2025-12-08 17:10:01
【问题描述】:
所以我有这个代码:
if view.isKindOfClass(classType){...}
这在 Swift 2 中运行良好,但现在我在 Swift 3 中,我收到此错误:
UIView 类型的值没有成员 isKindOfClass
如何在 Swift 3 中进行测试?
【问题讨论】:
-
在 Swift 中,您通常会使用
is运算符,请参阅 *.com/questions/24019707/…。