基础库
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

31 lines
792 B

  1. //
  2. // ZhiyingCommNativeResult.h
  3. // hairuyi_flutter_comm
  4. //
  5. // Created by Weller on 2020/5/16.
  6. //
  7. #import <Foundation/Foundation.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. #define NativeCommandSuccess(msg) [[ZhiyingCommNativeResult alloc] initWithMsg:msg success:YES]
  10. #define NativeCommandFailed(msg) [[ZhiyingCommNativeResult alloc] initWithMsg: msg success: NO]
  11. #define NativeCommandNotImp [[ZhiyingCommNativeResult alloc] initWithMsg: @"native调用失败" success: NO]
  12. @interface ZhiyingCommNativeResult : NSObject
  13. // 状态
  14. @property (nonatomic, assign) BOOL success;
  15. // 消息
  16. @property (nonatomic, copy) NSString *msg;
  17. @property (nonatomic, strong) NSDictionary* data;
  18. - (instancetype)initWithMsg: (NSString*)msg success: (BOOL) success;
  19. - (NSDictionary*)toDict;
  20. @end
  21. NS_ASSUME_NONNULL_END