File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,9 +87,20 @@ -(void)showInViewController:(UIViewController *)viewController atPosition:(CGPoi
8787 [self .tableView reloadData ];
8888
8989 // present style
90- self.modalPresentationStyle = UIModalPresentationCustom;
91- self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
90+ if (floor (NSFoundationVersionNumber ) >= NSFoundationVersionNumber_iOS_8_0) {
91+ // iOS8+
92+ self.modalPresentationStyle = UIModalPresentationCustom;
93+ self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
94+ }else {
95+ // iOS7
96+ UIViewController *root = viewController;
97+ while (root.parentViewController ) {
98+ root = root.parentViewController ;
99+ }
100+ root.modalPresentationStyle = UIModalPresentationCurrentContext;
101+ }
92102
103+ self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
93104 [viewController presentViewController: self animated: YES completion: nil ];
94105}
95106
You can’t perform that action at this time.
0 commit comments