FIRAuthUIDelegate.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright 2017 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import <Foundation/Foundation.h>
  17. #import <UIKit/UIKit.h>
  18. #import "FIRAuthSwiftNameSupport.h"
  19. NS_ASSUME_NONNULL_BEGIN
  20. /** @protocol FIRAuthUIDelegate
  21. @brief A protocol to handle user interface interactions for Firebase Auth.
  22. */
  23. FIR_SWIFT_NAME(AuthUIDelegate)
  24. @protocol FIRAuthUIDelegate <NSObject>
  25. /** @fn presentViewController:animated:completion:
  26. @brief If implemented, this method will be invoked when Firebase Auth needs to display a view
  27. controller.
  28. @param viewControllerToPresent The view controller to be presented.
  29. @param flag Decides whether the view controller presentation should be animated or not.
  30. @param completion The block to execute after the presentation finishes. This block has no return
  31. value and takes no parameters.
  32. */
  33. - (void)presentViewController:(UIViewController *)viewControllerToPresent
  34. animated:(BOOL)flag
  35. completion:(void (^ _Nullable)(void))completion;
  36. /** @fn dismissViewControllerAnimated:completion:
  37. @brief If implemented, this method will be invoked when Firebase Auth needs to display a view
  38. controller.
  39. @param flag Decides whether removing the view controller should be animated or not.
  40. @param completion The block to execute after the presentation finishes. This block has no return
  41. value and takes no parameters.
  42. */
  43. - (void)dismissViewControllerAnimated:(BOOL)flag completion:(void (^ _Nullable)(void))completion
  44. FIR_SWIFT_NAME(dismiss(animated:completion:));
  45. @end
  46. NS_ASSUME_NONNULL_END