Return to Snippet

Revision: 32607
at September 30, 2010 04:17 by arpit


Initial Code
- (UIView *)findFirstResonder:(UIView*)root
{
  if ([root isFirstResponder]) 
  {        
    return root;     
  }
  
  for (UIView *subView in root.subviews) 
  {
    UIView *firstResponder = [self findFirstResonder:subView];
    if (firstResponder != nil) 
    {
      return firstResponder;
    }
  }
  return nil;
}

Initial URL

                                

Initial Description

                                

Initial Title
Find the first responder

Initial Tags

                                

Initial Language
Objective C