UIViewController+TFPresent.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // UIViewController+TFPresent.h
  3. // trueface
  4. //
  5. // Created by Apple on 2019/10/12.
  6. // Copyright © 2019 jie. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. typedef NS_ENUM(NSInteger,TFDirection)
  10. {
  11. TFDirectionCenter = 0,
  12. TFDirectionTop,
  13. TFDirectionLeft,
  14. TFDirectionRight,
  15. TFDirectionBottom
  16. };
  17. NS_ASSUME_NONNULL_BEGIN
  18. typedef void(^PresentCompletion)(void);
  19. static char unAllowTouched;
  20. @interface UIViewController (TFPresent)
  21. - (BOOL)TF_unAllowTouched;
  22. -(void)TF_setunAllowTouched:(BOOL)disAllowTouch;
  23. -(void)TFPresentVC:(UIViewController *)viewControllerToPresent completion:(nullable PresentCompletion)completion;
  24. -(void)TFPresentViewController:(UIViewController *)viewControllerToPresent presentSize:(CGSize)presentSize direction:(TFDirection)direction completion:(PresentCompletion)completion;
  25. -(void)TFPresentViewControllerUnTouched:(UIViewController *)viewControllerToPresent presentSize:(CGSize)presentSize direction:(TFDirection)direction completion:(PresentCompletion)completion;
  26. -(void)TFDismissViewController;
  27. @end
  28. NS_ASSUME_NONNULL_END