swift中的 isKindofClass
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了swift中的 isKindofClass相关的知识,希望对你有一定的参考价值。
参考技术A The proper Swift operator isis:if touch.view is UIPickerView
// touch.view is of type UIPickerView
Of course, if you also need to assign the view to a new constant, then theif let ... as? ... syntax is your boy, as Kevin mentioned. But if you don't need the value and only need to check the type, then you should use the is operator.
来自网址
以上是关于swift中的 isKindofClass的主要内容,如果未能解决你的问题,请参考以下文章