Last active
March 24, 2016 10:40
-
-
Save Akhrameev/117b02ef07881df7cdf8 to your computer and use it in GitHub Desktop.
huntedSubviewWithClassName: method missed in http://stackoverflow.com/questions/28082852/tableviewcell-does-not-contains-uitableviewcellreordercontrol-in-ios/28082967#28082967 Need place it in UIView category as in https://github.com/Akhrameev/CircuitTimer/blob/master/Circuit%20Timer/SubviewFinder.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (UIView *) huntedSubviewWithClassName: (NSString *) className | |
{ | |
if ([[[self class] description] isEqualToString: className]) | |
{ | |
return self; | |
} | |
for (UIView *subview in self.subviews) | |
{ | |
UIView *huntedSubview = [subview huntedSubviewWithClassName: className]; | |
if (huntedSubview != nil) | |
{ | |
return huntedSubview; | |
} | |
} | |
return nil; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment