Skip to content

Commit

Permalink
fix(ios): can not show fullscreen modal windows anymore (#11268)
Browse files Browse the repository at this point in the history
Fixes TIMOB-27453
  • Loading branch information
vijaysingh-axway authored and sgtcoolguy committed Oct 14, 2019
1 parent 32da019 commit a341c1b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
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

0 comments on commit a341c1b

Please sign in to comment.