Comments (5)
Hi.
I'd need more info to evaluate your issue. Are you using DRPageScrollView? If so, did you enable page reuse?
from popsicle.
Hey @hsavit1 did you finally get around with this issue?
from popsicle.
Yea I never figured it out actually.
The Button loses its functionality on the second and third pages of the
view pager. Will keep you posted if I come up with something
On Monday, June 8, 2015, David RomΓ‘n [email protected] wrote:
Hey @hsavit1 https://github.com/hsavit1 did you finally get around with
this issue?β
Reply to this email directly or view it on GitHub
#13 (comment)
.
Sent from Gmail Mobile
from popsicle.
Oh my. I just came up with what that's about. Since the page view where the button is contained is out of bounds but the button is still visible, it won't receive touch events. It's a default behavior every UIView component has: they ignore touch events when they're out of bounds from their parent superviews.
Check out this official document from Apple where they explain how to get around it: https://developer.apple.com/library/ios/qa/qa2013/qa1812.html
If for some reasons the existing layout has to be maintained, you can change the hit-testing behavior of the parent view so that it doesn't ignore the touch events. This can be done by overriding the -(UIView *)hitTest:withEvent: method of the parent view's class.
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
// Convert the point to the target view's coordinate system.
// The target view isn't necessarily the immediate subview
CGPoint pointForTargetView = [self.targetView convertPoint:point fromView:self];
if (CGRectContainsPoint(self.targetView.bounds, pointForTargetView)) {
// The target view may have its view hierarchy,
// so call its hitTest method to return the right hit-test view
return [self.targetView hitTest:pointForTargetView withEvent:event];
}
return [super hitTest:point withEvent:event];
}
from popsicle.
hey, forgot to respond to this
looks neat! will check out
from popsicle.
Related Issues (20)
- Change podspec to support iOS 6.0 HOT 1
- Cocoapods issue HOT 2
- Use as Intro. HOT 1
- Auto Layout support HOT 1
- The future of DRDynamicSlideShow HOT 1
- DRDynamicSlideShow gone? HOT 10
- Remove old pod from cocoapods HOT 3
- Documentation
- Interpolable CATransform3D
- TouchView HOT 2
- Swifty version
- Unit Tests + CI HOT 2
- .
- Abstract `filteredObjectAndKeyPath` HOT 1
- .
- widthConstraint and heightConstraint cause a crash HOT 6
- Use Swift 3's `#keyPath` HOT 1
- Swift 3.0 compatibility
- Leverage new smart keypaths feature in Swift 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from popsicle.