File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ @implementation UIViewController (PromiseKit)
15
15
16
16
- (AnyPromise *)promiseViewController : (UIViewController *)vc animated : (BOOL )animated completion : (void (^)(void ))block
17
17
{
18
- id vc2present = vc;
18
+ UIViewController * vc2present = vc;
19
19
AnyPromise *promise = nil ;
20
20
21
21
if ([vc isKindOfClass: NSClassFromString (@" MFMailComposeViewController" )]) {
@@ -72,8 +72,7 @@ - (AnyPromise *)promiseViewController:(UIViewController *)vc animated:(BOOL)anim
72
72
[self presentViewController: vc2present animated: animated completion: block];
73
73
74
74
promise.finally (^{
75
- // TODO can we be more specific?
76
- [self dismissViewControllerAnimated: animated completion: nil ];
75
+ [vc2present.presentingViewController dismissViewControllerAnimated: animated completion: nil ];
77
76
});
78
77
79
78
return promise;
You can’t perform that action at this time.
0 commit comments