|
@@ -132,8 +132,9 @@
|
|
|
NSInteger counter = 0;
|
|
NSInteger counter = 0;
|
|
|
for (UIView *contentView in self.contentViews) {
|
|
for (UIView *contentView in self.contentViews) {
|
|
|
contentView.userInteractionEnabled = YES;
|
|
contentView.userInteractionEnabled = YES;
|
|
|
- UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(contentViewTapAction:)];
|
|
|
|
|
- [contentView addGestureRecognizer:tapGesture];
|
|
|
|
|
|
|
+
|
|
|
|
|
+ NSLog(@"contentView gesture count %d",contentView.gestureRecognizers.count);
|
|
|
|
|
+
|
|
|
CGRect rightRect = contentView.frame;
|
|
CGRect rightRect = contentView.frame;
|
|
|
rightRect.origin = CGPointMake(CGRectGetWidth(self.scrollView.frame) * (counter ++), 0);
|
|
rightRect.origin = CGPointMake(CGRectGetWidth(self.scrollView.frame) * (counter ++), 0);
|
|
|
|
|
|
|
@@ -158,6 +159,13 @@
|
|
|
if (self.fetchContentViewAtIndex) {
|
|
if (self.fetchContentViewAtIndex) {
|
|
|
[self.contentViews addObject:self.fetchContentViewAtIndex(previousPageIndex)];
|
|
[self.contentViews addObject:self.fetchContentViewAtIndex(previousPageIndex)];
|
|
|
[self.contentViews addObject:self.fetchContentViewAtIndex(_currentPageIndex)];
|
|
[self.contentViews addObject:self.fetchContentViewAtIndex(_currentPageIndex)];
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ UIView* currentView =self.fetchContentViewAtIndex(_currentPageIndex);
|
|
|
|
|
+ currentView.gestureRecognizers= nil;
|
|
|
|
|
+ UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(contentViewTapAction:)];
|
|
|
|
|
+ [self.fetchContentViewAtIndex(_currentPageIndex) addGestureRecognizer:tapGesture];
|
|
|
|
|
+
|
|
|
[self.contentViews addObject:self.fetchContentViewAtIndex(rearPageIndex)];
|
|
[self.contentViews addObject:self.fetchContentViewAtIndex(rearPageIndex)];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|