Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ios): can not show fullscreen modal windows anymore #11267

Merged
merged 9 commits into from
Oct 14, 2019
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#import "TiLayoutQueue.h"
#import "TiSharedConfig.h"
#import "TiUtils.h"
#import "TiViewController.h"

#ifdef FORCE_WITH_MODAL
@interface ForcingController : UIViewController {
Expand Down Expand Up @@ -824,6 +825,10 @@ - (void)showControllerModal:(UIViewController *)theController animated:(BOOL)ani
}
}
[self dismissKeyboard];
if ([theController isKindOfClass:[TiViewController class]]) {
TiViewController *controller = (TiViewController *)theController;
controller.presentationController.delegate = controller;
}
[topVC presentViewController:theController animated:trulyAnimated completion:nil];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ - (id)initWithViewProxy:(TiViewProxy *)window
{
if (self = [super init]) {
_proxy = window;
self.presentationController.delegate = self;
[self updateOrientations];
[TiUtils configureController:self withObject:_proxy];
}
Expand Down
6 changes: 3 additions & 3 deletions iphone/TitaniumKit/TitaniumKit/Sources/API/TiWindowProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -553,12 +553,12 @@ - (void)openOnUIThread:(NSArray *)args
if (style != -1) {
[theController setModalTransitionStyle:style];
}
style = [TiUtils intValue:@"modalStyle" properties:dict def:-1];
if (style != -1) {
UIModalPresentationStyle modalStyle = [TiUtils intValue:@"modalStyle" properties:dict def:-1];
if (modalStyle != -1) {
// modal transition style page curl must be done only in fullscreen
// so only allow if not page curl
if ([theController modalTransitionStyle] != UIModalTransitionStylePartialCurl) {
[theController setModalPresentationStyle:style];
[theController setModalPresentationStyle:modalStyle];
}
}

Expand Down