iOS: when not set onclick on view, should passthrough touch event
This commit is contained in:
parent
f175a94b28
commit
875f3a5066
@ -21,8 +21,9 @@
|
||||
#import "DoricFlexNode.h"
|
||||
#import "DoricExtensions.h"
|
||||
#import <YogaKit/UIView+Yoga.h>
|
||||
#import "DoricUIView.h"
|
||||
|
||||
@interface DoricFlexView : UIView
|
||||
@interface DoricFlexView : DoricUIView
|
||||
@end
|
||||
|
||||
@implementation DoricFlexView
|
||||
|
@ -22,10 +22,11 @@
|
||||
|
||||
#import "DoricHLayoutNode.h"
|
||||
#import "DoricExtensions.h"
|
||||
#import "DoricUIView.h"
|
||||
|
||||
@implementation DoricHLayoutNode
|
||||
- (UIView *)build {
|
||||
return [[UIView new] also:^(UIView *it) {
|
||||
return [[DoricUIView new] also:^(DoricUIView *it) {
|
||||
it.doricLayout.layoutType = DoricHLayout;
|
||||
}];
|
||||
}
|
||||
|
@ -22,11 +22,12 @@
|
||||
|
||||
#import "DoricStackNode.h"
|
||||
#import "DoricExtensions.h"
|
||||
#import "DoricUIView.h"
|
||||
|
||||
@implementation DoricStackNode
|
||||
|
||||
- (UIView *)build {
|
||||
return [[UIView new] also:^(UIView *it) {
|
||||
return [[DoricUIView new] also:^(DoricUIView *it) {
|
||||
it.doricLayout.layoutType = DoricStack;
|
||||
}];
|
||||
}
|
||||
|
9
doric-iOS/Pod/Classes/Shader/DoricUIView.h
Normal file
9
doric-iOS/Pod/Classes/Shader/DoricUIView.h
Normal file
@ -0,0 +1,9 @@
|
||||
//
|
||||
// Created by pengfei.zhou on 2022/12/6.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
|
||||
@interface DoricUIView : UIView
|
||||
@end
|
18
doric-iOS/Pod/Classes/Shader/DoricUIView.m
Normal file
18
doric-iOS/Pod/Classes/Shader/DoricUIView.m
Normal file
@ -0,0 +1,18 @@
|
||||
//
|
||||
// Created by pengfei.zhou on 2022/12/6.
|
||||
//
|
||||
|
||||
#import "DoricUIView.h"
|
||||
|
||||
|
||||
@implementation DoricUIView
|
||||
- (nullable UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
|
||||
UIView *target = [super hitTest:point withEvent:event];
|
||||
if (self.gestureRecognizers.count == 0 && target == self) {
|
||||
return nil;
|
||||
} else {
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
@ -22,11 +22,12 @@
|
||||
|
||||
#import "DoricVLayoutNode.h"
|
||||
#import "DoricExtensions.h"
|
||||
#import "DoricUIView.h"
|
||||
|
||||
@implementation DoricVLayoutNode
|
||||
|
||||
- (UIView *)build {
|
||||
return [[UIView new] also:^(UIView *it) {
|
||||
return [[DoricUIView new] also:^(DoricUIView *it) {
|
||||
it.doricLayout.layoutType = DoricVLayout;
|
||||
}];
|
||||
}
|
||||
|
@ -30,6 +30,7 @@
|
||||
#import "DoricPromise.h"
|
||||
#import "DoricFlexNode.h"
|
||||
#import "DoricErrorHintNode.h"
|
||||
#import "DoricUIView.h"
|
||||
|
||||
@interface AnimationCallback : NSObject <CAAnimationDelegate>
|
||||
@property(nonatomic, strong) NSMutableDictionary *dictionary;
|
||||
|
Reference in New Issue
Block a user