Added explicit check for _UIQueuingScrollView for UIPageViewController

This commit is contained in:
hackiftekhar
2015-01-04 16:36:32 +05:30
parent 138b7231f8
commit fa07cd0afc
5 changed files with 4661 additions and 1196 deletions

View File

@@ -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;
}

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -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;