Skip to content

Commit 6e710f0

Browse files
committed
fix: add class check on dismissing
1 parent 5d36b37 commit 6e710f0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

ios/SlackBottomSheet.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,12 @@ - (void)setVisible:(BOOL)visible {
181181
}
182182
self.transitionDuration = [[NSNumber alloc] initWithDouble: 0];
183183
UIViewController *rootViewController = [UIApplication sharedApplication].delegate.window.rootViewController;
184+
UIView* pview = [[[[rootViewController presentedViewController] view] superview] superview];
185+
NSString *s = NSStringFromClass([pview class]);
186+
if ([s isEqualToString:@"reactnativeslackbottomsheet.PossiblyTouchesPassableUIView"]) {
187+
[pview performSelector:NSSelectorFromString(@"makeOldClass")];
188+
}
189+
184190
[[rootViewController presentedViewController] dismissViewControllerAnimated:!self->_isHiding completion:^{
185191
self.transitionDuration = oldTransitionDuration;
186192
}];

ios/UIViewController+PanModalPresenter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class PossiblyTouchesPassableUIView: UIView {
6464
}
6565
}
6666

67-
func makeOldClass() {
67+
@objc func makeOldClass() {
6868
if self.oldClass != nil {
6969
let oldClassMem = self.oldClass!
7070
self.oldClass = nil

0 commit comments

Comments
 (0)