What do %new and %class mean in terms of MobileSubstrate tweaks? For instance:
%class TPBottomLockBar;
and
%new(v@:)
Sorry for double question!
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.
These are both Logos constructs.
%newis for adding new methods to a class at runtime, and its syntax is%new(typeencoding); you can get information on Objective-C type encodings in Apple’s Objective-C runtime documentation. Note that the first two arguments to these methods are always id and SEL, so the second two characters of your type encoding have to be “@:“. The first character is the return type, and anything else is your set of custom arguments.As an example, here is a pretty un-useful method:
(this will actually probably not work as NSString is a class cluster, but it serves as an example no less!)
%classis a deprecated directive for forward-declaring a class to be used at runtime; It’s been replaced with%c(ClassName), which is to be used inline.For example,