
Untitled
By: a guest on
Aug 10th, 2012 | syntax:
None | size: 0.52 KB | hits: 33 | expires: Never
Can a method definition specify that a parameter must be a constant?
+ (void) replace_text_with: (NSString *) const predefined_text_style;
typedef enum {
FOOMy1stValue,
FOOMy2ndValue,
FOOMy3rdValue
} FOOEnum;
NSString *FOOGetStringFromEnum(FOOEnum e) {
static NSString *strings[] = {
@"My first value",
@"My second value",
@"My third value"
};
return strings[e];
}
void FOORestrictedInput(FOOEnum e) {
NSLog(@"Restricted string: %@", FOOGetStringFromEnum(e));
}