I have a lot of object of different classes in a scrollView. While doing some operations, I want to print the the parent class of each objects. How can I do it?
+4
A:
-(NSString *) myClassName {
return NSStringFromClass( [self class] );
}
-(NSString *) parentClassName {
return NSStringFromClass( [super class] );
}
You can iterate through the subviews of a view like this:
for ( UIView *subview in theParentView.subviews ) {
NSLog( @"%@" , subview );
}
drawnonward
2010-07-13 05:43:07