How large number can I use for enum in Objective-C?
Same as NSInteger?
typedef enum {
myEnumA = -1000,
myEnumB = 1000,
myEnumC = 2000
} myEnum;
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since ObjC is based on C, you’ll probably find it matches the standard for that language:
From:
c90 3.5.2.2 Enumeration specifiers(a)c99 6.7.2.2 Enumeration specifiersc11 6.7.2.2 Enumeration specifiers(a): C90 actually says “integral” rather than “integer” but it means the same thing.