Skip to content

Commit

Permalink
Another stash of debug changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kkafar committed Nov 14, 2023
1 parent f46811a commit efdd12f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ios/RNSScreen.mm
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,7 @@ - (instancetype)initWithView:(UIView *)view
_initialView = (RNSScreenView *)view;
#endif
}
NSLog(@"RNSScreen created at %p", self);
return self;
}

Expand Down Expand Up @@ -1153,6 +1154,7 @@ - (void)willMoveToParentViewController:(UIViewController *)parent
_previousFirstResponder = responder;
}
}
NSLog(@"RNSScreen %p moving to parent VG: %p", self, parent);
}

- (id)findFirstResponder:(UIView *)parent
Expand Down
14 changes: 13 additions & 1 deletion ios/RNSScreenStack.mm
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ @implementation RNSPanGestureRecognizer
@implementation RNSScreenStackView {
UINavigationController *_controller;
NSMutableArray<RNSScreenView *> *_reactSubviews;
NSMutableArray<RNSScreen *> *_modalsPresentedByOtherStack;
BOOL _invalidated;
BOOL _isFullWidthSwiping;
UIPercentDrivenInteractiveTransition *_interactionController;
Expand Down Expand Up @@ -148,6 +149,7 @@ - (void)initCommonProps
{
_reactSubviews = [NSMutableArray new];
_presentedModals = [NSMutableArray new];
_modalsPresentedByOtherStack = [NSMutableArray new];
_controller = [RNSNavigationController new];
_controller.delegate = self;
#if !TARGET_OS_TV
Expand Down Expand Up @@ -445,7 +447,7 @@ - (void)setModalViewControllers:(NSArray<UIViewController *> *)controllers
return;
}

NSLog(@"%p is presenting %p modally", previous, next);
NSLog(@"VC: %p is presenting VC: %p modally", previous, next);
[previous presentViewController:next
animated:shouldAnimate
completion:^{
Expand All @@ -468,8 +470,10 @@ - (void)setModalViewControllers:(NSArray<UIViewController *> *)controllers
// We dismiss every VC that was presented by changeRootController VC or its descendant.
// After the series of dismissals is completed we run completion block in which
// we present modals on top of changeRootController (which may be the this stack VC)
NSLog(@"StackView %p is dismissing all VCs on top of %p", self, changeRootController);
[changeRootController dismissViewControllerAnimated:shouldAnimate completion:finish];
} else {
NSLog(@"StackView %p is only presenting new modals", self);
finish();
}
}
Expand Down Expand Up @@ -1112,6 +1116,14 @@ @implementation RNSScreenStackManager {

RCT_EXPORT_VIEW_PROPERTY(onFinishTransitioning, RCTDirectEventBlock);

- (instancetype)init
{
if (self = [super init]) {
NSLog(@"RNSScreenStackManager instance created");
}
return self;
}

#ifdef RCT_NEW_ARCH_ENABLED
#else
- (UIView *)view
Expand Down

0 comments on commit efdd12f

Please sign in to comment.