Following are data types that the developers mostly use in Objective – C :
BOOL : Represents a Boolean value that is either true or false. Both the _Bool
or BOOL
keywords is valid.
Example :
_Bool flag = 0;
BOOL secondflag = 1;
NSInteger : Represents an Integer.
Example :
typedef long NSInteger;
typedef int NSInteger;
NSUInteger : Represents an unsigned integer.
Example :
typedef unsigned long NSUInteger;
typedef unsigned int NSUInteger;
NSString : Represents a string.
Example :
NSString *greeting = @"Hello";