Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with custom views #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion DAKeyboardControl/DAKeyboardControl.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ @implementation UIView (DAKeyboardControl)

+ (void)load
{
#if !TARGET_INTERFACE_BUILDER
// Swizzle the 'addSubview:' method to ensure that all input fields
// have a valid inputAccessoryView upon addition to the view heirarchy
SEL originalSelector = @selector(addSubview:);
Expand All @@ -57,6 +58,7 @@ + (void)load
class_getMethodImplementation(self, swizzledSelector),
method_getTypeEncoding(swizzledMethod));
method_exchangeImplementations(originalMethod, swizzledMethod);
#endif
}

#pragma mark - Public Methods
Expand Down Expand Up @@ -747,4 +749,4 @@ - (BOOL)keyboardWillRecede
return touchLocationInKeyboardWindow.y >= thresholdHeight && velocity.y >= 0;
}

@end
@end