Skip to content

Instantly share code, notes, and snippets.

@YGeorge
Created March 13, 2016 13:42
Show Gist options
  • Save YGeorge/8a9b72a5a98302b6cb2e to your computer and use it in GitHub Desktop.
Save YGeorge/8a9b72a5a98302b6cb2e to your computer and use it in GitHub Desktop.
UIView+YGUtilities
//
// NSDate+YGUtilities.m
// YGUtilities (https://github.com/YGeorge/YGUtilities)
//
// Created by George on 26.02.16.
// Copyright (c) 2016 George Ymydykov. All rights reserved.
//
#import "UIView+YGUtilities.h"
@implementation UIView (YGUtilities)
- (id)findFirstResponder
{
if (self.isFirstResponder) {
return self;
}
for (UIView *subView in self.view.subviews) {
if ([subView isFirstResponder]) {
return subView;
}
}
return nil;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment