How to test the type of an Objective-c Object ? something similar to is with Object?

我只是一个虾纸丫 提交于 2021-01-28 11:22:21

问题


How to test the type of an Objective-c Object ? something similar to is with TObject? To cast we have wrap but I don't find how to test


回答1:


I remembered that I'm actually using object_getClass in my own code :-)

This is an example from DW.Notifications.iOS.pas :

if request.trigger.isKindOfClass(objc_getClass('UNPushNotificationTrigger')) then


来源:https://stackoverflow.com/questions/59070640/how-to-test-the-type-of-an-objective-c-object-something-similar-to-is-with-obj

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!