During the development process, when invoking a system method, you can often see that the method has been deprecated, such as:
Feel particularly dazzling, check the information, if you want to achieve the following results, only need to use the system of the following several keywords added to the method name after it can be:
Ns_deprecated_ios (2_0, 7_0, "USE-TURNNILTOSTR:") __tvos_prohibited;
The implementation uses the following methods:
If there's a way
-(NSString *) Judenilstr: (NSString *) STR is used to determine if the string is nil, and if nil it returns @ ""; but now this method does not want to use, want to use
-(NSString *) Turnniltostr: (NSString *) str this method;
Then the implementation method is as follows:
-(NSString *) Judenilstr: (NSString *) str ns_deprecated_ios (2_0, 7_0, "USE-TURNNILTOSTR:") __tvos_prohibited;-( NSString *) Turnniltostr: (NSString *) str;
Among them, Ns_deprecated_ios (2_0, 7_0, "USE-TURNNILTOSTR:") __tvos_prohibited in the "User xxxxxx" of the XXXX represents the new method name.
It is important to note that the keywords are written in front of the ";" and no one works.
To try it, very interesting, occasionally installed force, why not?
IOS-Setting up a system similar way to discard warnings