We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20f72b8 commit cd34d94Copy full SHA for cd34d94
Pod/Classes/SSSnackbar.m
@@ -101,8 +101,13 @@ - (void)drawRect:(CGRect)rect {
101
}
102
103
- (void)show {
104
+ UIViewController *topController = [UIApplication sharedApplication].keyWindow.rootViewController;
105
+ while (topController.presentedViewController) {
106
+ topController = topController.presentedViewController;
107
+ }
108
+
109
+ UIView *superview = topController.view;
110
- UIView *superview = [UIApplication sharedApplication].delegate.window.rootViewController.view;
111
BOOL shouldReplaceExistingSnackbar = currentlyVisibleSnackbar != nil;
112
113
if (shouldReplaceExistingSnackbar) {
0 commit comments