TUIFloatViewController.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // TUIFloatViewController.h
  3. // TIMCommon
  4. //
  5. // Created by wyl on 2023/1/16.
  6. // Copyright © 2023 Tencent. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. @protocol TUIFloatSubViewControllerProtocol <NSObject>
  11. @optional
  12. @property(nonatomic, copy) void (^floatDataSourceChanged)(NSArray *arr);
  13. - (void)floatControllerLeftButtonClick;
  14. - (void)floatControllerRightButtonClick;
  15. @end
  16. @interface TUIFloatTitleView : UIView
  17. @property(nonatomic, strong) UIButton *leftButton;
  18. @property(nonatomic, strong) UIButton *rightButton;
  19. @property(nonatomic, copy) void (^leftButtonClickCallback)(void);
  20. @property(nonatomic, copy) void (^rightButtonClickCallback)(void);
  21. @property(nonatomic, strong) UILabel *titleLabel;
  22. @property(nonatomic, strong) UILabel *subTitleLabel;
  23. - (void)setTitleText:(NSString *)mainText subTitleText:(NSString *)secondText leftBtnText:(NSString *)leftBtnText rightBtnText:(NSString *)rightBtnText;
  24. @end
  25. @interface TUIFloatViewController : UIViewController
  26. @property(nonatomic, strong) TUIFloatTitleView *topGestureView;
  27. @property(nonatomic, strong) UIImageView *topImgView;
  28. @property(nonatomic, strong) UIView *containerView;
  29. @property(nonatomic, strong) UIViewController<TUIFloatSubViewControllerProtocol> *childVC;
  30. - (void)updateSubContainerView;
  31. - (void)setnormalTop;
  32. - (void)setNormalBottom;
  33. - (void)appendChildViewController:(UIViewController<TUIFloatSubViewControllerProtocol> *)vc topMargin:(CGFloat)topMargin;
  34. - (void)floatDismissViewControllerAnimated:(BOOL)flag completion:(void (^)(void))completion;
  35. @end
  36. NS_ASSUME_NONNULL_END