Try this in your .m file if you want to use this in your class.
#import "yourimport";
static const NSInteger DELETE = -1;
@implementation YourClass
If you want that it would be global variable you should do this in.h file
extern NSInteger *const DELETE;
In order to do this
//ClassA.h
extern int const kMyConstant;
//ClassA.m
int const kMyConstant = @"my constant";
switch (messagetype) {
case kMyConstant: //Can't set const value here
}
You should create ENUM in .h:
#import <AVFoundation/AVFoundation.h>
typedef NS_ENUM(NSInteger, YourType) {
YourTypeConstant1 = 0,
YourTypeConstant2,
};
@interface YourViewController : ViewController
And then:
NSNumber *number = @(YourTypeConstant1);
switch (number) {
case YourTypeConstant1:
//your code
break;
case YourTypeConstant1:
//your code
break;
default:
//your default code
break;}