mirror of
https://github.com/HackPlan/IQKeyboardManager.git
synced 2026-03-29 08:47:51 +08:00
Added explicit check for _UIQueuingScrollView for UIPageViewController
This commit is contained in:
@@ -41,13 +41,14 @@ IQ_LoadCategory(IQUIViewHierarchy)
|
||||
@implementation UIView (IQ_UIView_Hierarchy)
|
||||
|
||||
//Special textFields,textViews,scrollViews
|
||||
Class UIAlertSheetTextFieldClass;
|
||||
Class UIAlertSheetTextFieldClass_iOS8;
|
||||
Class UIAlertSheetTextFieldClass; //UIAlertView
|
||||
Class UIAlertSheetTextFieldClass_iOS8; //UIAlertView
|
||||
|
||||
Class UITableViewCellScrollViewClass;
|
||||
Class UITableViewWrapperViewClass;
|
||||
Class UITableViewCellScrollViewClass; //UITableViewCell
|
||||
Class UITableViewWrapperViewClass; //UITableViewCell
|
||||
Class UIQueuingScrollViewClass; //UIPageViewController
|
||||
|
||||
Class UISearchBarTextFieldClass;
|
||||
Class UISearchBarTextFieldClass; //UISearchBar
|
||||
|
||||
+(void)initialize
|
||||
{
|
||||
@@ -58,6 +59,7 @@ Class UISearchBarTextFieldClass;
|
||||
|
||||
UITableViewCellScrollViewClass = NSClassFromString(@"UITableViewCellScrollView");
|
||||
UITableViewWrapperViewClass = NSClassFromString(@"UITableViewWrapperView");
|
||||
UIQueuingScrollViewClass = NSClassFromString(@"_UIQueuingScrollView");
|
||||
|
||||
UISearchBarTextFieldClass = NSClassFromString(@"UISearchBarTextField");
|
||||
}
|
||||
@@ -155,8 +157,7 @@ Class UISearchBarTextFieldClass;
|
||||
|
||||
while (superview)
|
||||
{
|
||||
//UITableViewWrapperView
|
||||
if ([superview isKindOfClass:[UIScrollView class]] && ([superview isKindOfClass:UITableViewCellScrollViewClass] == NO) && ([superview isKindOfClass:UITableViewWrapperViewClass] == NO))
|
||||
if ([superview isKindOfClass:[UIScrollView class]] && ([superview isKindOfClass:UITableViewCellScrollViewClass] == NO) && ([superview isKindOfClass:UITableViewWrapperViewClass] == NO) && ([superview isKindOfClass:UIQueuingScrollViewClass] == NO))
|
||||
{
|
||||
return (UIScrollView*)superview;
|
||||
}
|
||||
|
||||
BIN
KeyboardTextFieldDemo/.DS_Store
vendored
BIN
KeyboardTextFieldDemo/.DS_Store
vendored
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -112,15 +112,15 @@
|
||||
{
|
||||
if (textField.isAskingCanBecomeFirstResponder == NO)
|
||||
{
|
||||
UIAlertController* actionSheet = [UIAlertController alertControllerWithTitle:@"test" message:nil preferredStyle:UIAlertControllerStyleActionSheet];
|
||||
[actionSheet addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"cancel", nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
|
||||
}]];
|
||||
[self presentViewController:actionSheet animated:YES completion:nil];
|
||||
// UIAlertController* actionSheet = [UIAlertController alertControllerWithTitle:@"test" message:nil preferredStyle:UIAlertControllerStyleActionSheet];
|
||||
// [actionSheet addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"cancel", nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
|
||||
// }]];
|
||||
// [self presentViewController:actionSheet animated:YES completion:nil];
|
||||
|
||||
//// //Do your work on tapping textField.
|
||||
// UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"IQKeyboardManager" message:@"Do your custom work here" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
|
||||
//// alertView.alertViewStyle = UIAlertViewStylePlainTextInput;
|
||||
// [alertView show];
|
||||
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"IQKeyboardManager" message:@"Do your custom work here" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
|
||||
// alertView.alertViewStyle = UIAlertViewStylePlainTextInput;
|
||||
[alertView show];
|
||||
}
|
||||
|
||||
return NO;
|
||||
|
||||
Reference in New Issue
Block a user