How to check if a UIViewController is of a particular sub-class in objective c?

I want to be able to check the type of a UIViewController to see if it is of a certain type like this

c code

if (typeof(instance1) == customUIViewController) 
{
  customUIViewController test = (customViewController)instance1;

  // do more stuff
}
21
задан Pål Brattberg 16 May 2011 в 15:20
поделиться