Comments (4)
Hi,
I would need exactly the same behaviour when i click on the description and on the button.
Is there any way to do that ?
Regards,
Morgan
from lgplusbuttonsview.
I fixed this function now
`- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
UIView *view = nil;
for (LGPlusButton *button in _buttonsArray)
{
CGPoint newPoint = [self convertPoint:point toView:button];
view = [button hitTest:newPoint withEvent:event];
if (view) break;
}
if(!view){
for (LGPlusButtonDescription *description in _descriptionsArray)
{
CGPoint newPoint = [self convertPoint:point toView:description];
view = [description hitTest:newPoint withEvent:event];
if (view) break;
}
}
if (!view && _coverColor && !_coverView.isHidden)
{
CGPoint newPoint = [self convertPoint:point toView:_coverView];
view = [_coverView hitTest:newPoint withEvent:event];
}
return view;
}`
By Adding these code, then you can add UITapGestureRecognizer function on the Description label with userInteractionEnabled = YES
from lgplusbuttonsview.
Thank you!
Le 3 mars 2016 à 17:55, johnny51925 [email protected] a écrit :
I fixed this function now
`- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
//NSLog(@"\nself = %@\nsuper = %@\nsubviews = %@\nsupersubviews = %@\n\n", self, [super hitTest:point withEvent:event], self.subviews, self.superview.subviews);UIView *view = nil;
for (LGPlusButton *button in _buttonsArray)
{
CGPoint newPoint = [self convertPoint:point toView:button];view = [button hitTest:newPoint withEvent:event]; if (view) break;
}
if(!view){
for (LGPlusButtonDescription *description in _descriptionsArray)
{
CGPoint newPoint = [self convertPoint:point toView:description];view = [description hitTest:newPoint withEvent:event]; if (view) break; }
}
if (!view && _coverColor && !_coverView.isHidden)
{
CGPoint newPoint = [self convertPoint:point toView:_coverView];view = [_coverView hitTest:newPoint withEvent:event];
}
return view;
}`
By Adding these code, then you can add UITapGestureRecognizer function on the Description label with userInteractionEnabled = YES
—
Reply to this email directly or view it on GitHub.
from lgplusbuttonsview.
Hi,
Will you make an update of the POD with that fix ?
Regards,
from lgplusbuttonsview.
Related Issues (20)
- Horizontal Expand HOT 5
- UIVisualEffectView/UIBlurEffect for overlay
- Setting all buttons to same size produces unwanted offset HOT 1
- Buttons offset should automatically adjust according to observed scroll view's scroll insets
- Easy way to center the button? HOT 1
- Scrollable Vertical
- Carthage support is wrong
- Collaborators WANTED HOT 4
- How can i add button whereever i want? HOT 2
- How to add LGPlusButton view as subview to tab bar HOT 3
- Tappable area (hotspot) bigger than initial "Plus" button
- When I hide the LGPlusButtonsView but still can touch the button. HOT 2
- Issue in the Demo code
- Floating button as simple button HOT 1
- Custom View for Button
- How to add a UITextField
- iPhone X, XS, XR bug - Buttons overlap HOT 1
- Cannot hide button atIndex with iPhone X
- pleading swift
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 lgplusbuttonsview.