基础库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

25 lines
692 B

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