customSwitchButton.h 558 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // customSwitchButton.h
  3. // 双子星云手机
  4. //
  5. // Created by xd h on 2026/1/5.
  6. //
  7. #import <UIKit/UIKit.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. @interface customSwitchButton : UIView
  10. @property (nonatomic, assign, getter=isOn) BOOL on;
  11. @property (nonatomic, assign, getter=isEnabled) BOOL enabled;
  12. @property (nonatomic,copy) void (^didClickSwitchButtonFun)(BOOL isOn);
  13. // 初始化方法
  14. - (instancetype)initWithFrame:(CGRect)frame
  15. onText:(NSString *)onText
  16. offText:(NSString *)offText;
  17. @end
  18. NS_ASSUME_NONNULL_END