Objective-C: how to group a series of string constants?

后端 未结 4 1780
栀梦
栀梦 2020-12-16 19:14

I defined a series of string constants like below, in macro way,

#define EXT_RESULT_APPID  @\"appid\"
#define EXT_RESULT_ERROR_CODE  @\"errorcode\"
#define         


        
4条回答
  •  北荒
    北荒 (楼主)
    2020-12-16 19:33

    You may create a header file name "Constants.h". Then you need to import this header file where you want to use these constants like:

    #import "Constants.h"
    

提交回复
热议问题