Search code examples
uiscrollviewipad-2uiscrollviewdelegateios5

cannot swipe a UIScrollView on iPad2


as topic shows, i am unable to swipe an UIscrollView.

Now the problem is: only NOT swipeable on iPad2.

it works well on every iPad and iPhone - except for ipad2.

Now - these information are few and meta - but is there any idea what i can possibly have broken? i dont have any iPad2-recognition or rule, etc.

i figured out, that

 -(void) scrollViewWillBeginDragging:(UIScrollView *)scrollView

is not called by the scrollview. its delegate is set properly:

scrollView.pagingEnabled = YES;

scrollView.contentSize = CGSizeMake(scrollView.frame.size.width * numberOfPages, scrollView.frame.size.height);

scrollView.showsHorizontalScrollIndicator = NO;
scrollView.showsVerticalScrollIndicator = NO;

scrollView.scrollsToTop = NO;
scrollView.scrollEnabled = YES;

scrollView.delegate = self;

however, touchesMoved method is called in the scrollView-Contents, but not on the UIviewController whose view holds the scrollview etc.

The "fun"thing is: when i rotate the device at least one time, i can swipe. i have no did/willRotate logic implemented. scrollViewWillBeginDragging: is called then!

Any ideas? Sorry for giving that few information, but i guess pasting the complete app would not fit either ;)

Best Regards.


Solution

  • okay it seemed like i had some problems with the multicores, since some actions where fired in different order than on other devices or something. however, fixing that calls for ipad2 only works fine.

    in case anybody sees this thread, and wonders how to find out if device is ipad2:

       BOOL isIPad2 = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad &&
                [UIImagePickerController isSourceTypeAvailable:    UIImagePickerControllerSourceTypeCamera]);