(1) methods in the class are converted into sel variables for storage.
(2) place a class to declare an object. When an object calls a method, the system converts the method to SEL and then uses this sel to perform matching in the class method.
(3) We can manually convert the method to Sel, and then use this sel to find the method.
# Import <Foundation/Foundation. h> # import "person. H "int main (INT argc, const char * argv []) {@ autoreleasepool {person * P1 = [[person alloc] init]; // normal method, you need to convert an eat to a sel, and then match and search for [P1 eat]; // use sel to convert the eat to a sel by ourselves, then use this sel to find sel [email protected] (EAT); [P1 performselector: AAA]; // merge and write it as [P1 performselector: @ selector (EAT)];} return 0 ;}
[OC enhancement] simple knowledge points of SEL data types-related to methods