1. Quickly create NSNumber objects
NSNumber *number1 = @20; @ + constant
int a = 20;
NSNumber *number2 = @ (a); @ + (variable)
2. Quickly create a string object that converts the C-language string constant to OC
NSString *str1 = @ "Frank";
3. Quickly create Nsarry objects
Nsarray *arr1 = @[@ "AA", @ "Hu", @ "Ty", @ "FD"];
4. Quickly create Nsmutablearry objects
Nsmutablearray *ARR2 = [@[@ "DG", @ "Ji", @ "GT", @ "FG"] mutablecopy];
5. Quickly remove elements from the array according to subscript
NSString *str2 = arr1[0];
NSString *STR3 = arr2[3];
6. Quickly create Nsdictionary Dictionary objects
Nsdictionary *dic = @{@ "name": @ "Frank" @ "Age": @ "+" @ "gender": @ "man"};
7. Quickly create Nsmutabledictionary objects
Nsmutabledictionary *dic1 = [@{@ "name": @ "Frank" @ "Age": @ "+" @ "gender": @ "man"} Mutablecopy];
8. Quickly remove the corresponding value according to key
NSString *STR4 = dic[@ "name"];
NSString *srt5 = dic1[@ "Age"];
2. Converting NSNumber Data Objects to basic data types
NSNumber *number1 = @20;
NSNumber *number2 [email protected];
NSNumber *number3 = @NO;
NSNumber *number4 = @ ' m ';
int newNumber1 = [Number1 intvalue];
NSLog (@ "%d", newNumber1);
float NewNumber2 = [number2 floatvalue];
NSLog (@ "%.1f", newNumber2);
BOOL NewNumber3 = [Number3 boolvalue];
NSLog (@ "%d", newNumber3);
char newNumber4 = [Number4 charvalue];
NSLog (@ "%c", newNumber4);
Laugh grammar, grammar sugar----literal