How to cast an object in Objective-C

后端 未结 5 768
死守一世寂寞
死守一世寂寞 2020-12-04 09:14

Is there a way to cast objects in objective-c much like the way objects are cast in VB.NET?

For example, I am trying to do the following:

// create t         


        
5条回答
  •  自闭症患者
    2020-12-04 09:42

    Casting for inclusion is just as important as casting for exclusion for a C++ programmer. Type casting is not the same as with RTTI in the sense that you can cast an object to any type and the resulting pointer will not be nil.

提交回复
热议问题