iPhone how to check the type of an Object?

iphone, uiview, uiviewcontroller

Solution

if([some_object isKindOfClass:[A_Class_Name class]])
{
    // do somthing
}

Problem

I want to check the type of an Object. How can I do that? The scenario is I'm getting an object. If that object is of type A then do some operations. If it is of type B then do some operations. Currently the type of the object is C that is parent of A and B. I have two classes `AViewController` and`BViewController`. The object I'm getting in `UIViewController`. Now how to check whether the object is `AViewController` or `BViewController`?

Original source

Related problems