VLCSearchController.m 977 B

123456789101112131415161718192021222324252627282930
  1. /*****************************************************************************
  2. * VLC for iOS
  3. *****************************************************************************
  4. * Copyright (c) 2016 VideoLAN. All rights reserved.
  5. * $Id$
  6. *
  7. * Authors: Vincent L. Cone <vincent.l.cone # tuta.io>
  8. *
  9. * Refer to the COPYING file of the official project for license.
  10. *****************************************************************************/
  11. #import "VLCSearchController.h"
  12. @implementation VLCSearchController
  13. - (UIViewController *)targetViewControllerForAction:(SEL)action sender:(id)sender
  14. {
  15. return self;
  16. }
  17. - (void)showViewController:(UIViewController *)vc sender:(id)sender
  18. {
  19. // Setting to active to NO otherwise, it will perform a default presentation which led to an `NSInvalidArgumentException`.
  20. self.active = NO;
  21. [self.presentingViewController showViewController:vc sender:sender];
  22. [self dismissViewControllerAnimated:YES completion:nil];
  23. }
  24. @end