Is there a way to get the number of ancestors for an instance of a class? For instance. a class of type UITouch would be level 2, since it inherits from NSObject.
int level = 1; Class cls = [UITouch class]; while (cls = [cls superclass]) ++ level; return level;
Source: https://habr.com/ru/post/1741093/More articles:When should I choose to use WCF and WCF data services - wcfparsing list in python - pythonObject Moved Error Using Web Service - asp.netHow to drag items from 2 sorted lists using jQuery? - javascriptResponse.Redirect not working in .net 4 - .netC toLowerCase function does not work - access violation - cplace the Silverlight control on asp.net - asp.netNSString potential leak - memory-leaksWhat errors apply to various FindBugs report parameters? - findbugsHow to create custom button in DetailsView in ASP.NET? - sql-serverAll Articles