NewsBlur-viq/clients/ios/Other Sources/UIViewController+HidePopover.m
Nicholas Riley f01ec1c008 iOS: Fix popover interaction with keyboard support.
Use the same popover creation code in more places, which adds Escape and
Command-. to dismiss popovers.

Ensure that popovers both get and can accept first responder, preventing
keyboard input from leaking through to an underlying view controller.
Without this, it can be confusing as, for example, you can navigate to a
different story while you’ve got a ‘mark read’ popover shown for another
story.
2016-03-19 13:22:02 -04:00

18 lines
386 B
Objective-C

//
// UIViewController+Dismiss.m
// NewsBlur
//
// Created by Nicholas Riley on 3/19/16.
// Copyright © 2016 NewsBlur. All rights reserved.
//
#import "UIViewController+HidePopover.h"
#import "NewsBlurAppDelegate.h"
@implementation UIViewController (HidePopover)
- (void)hidePopover {
[(NewsBlurAppDelegate *)[UIApplication sharedApplication].delegate hidePopover];
}
@end