Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6165021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:05:35+00:00 2026-05-23T22:05:35+00:00

What do %new and %class mean in terms of MobileSubstrate tweaks? For instance: %class

  • 0

What do %new and %class mean in terms of MobileSubstrate tweaks? For instance:

%class TPBottomLockBar;

and

%new(v@:)

Sorry for double question!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T22:05:35+00:00Added an answer on May 23, 2026 at 10:05 pm

    These are both Logos constructs. %new is 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:

    %hook NSMutableString
    %new(v@:)
    - (void)appendAwesomeThings {
        [self appendString:@"Awesome."];
    }
    %end
    

    (this will actually probably not work as NSString is a class cluster, but it serves as an example no less!)

    %class is 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,

    [[%c(NSString) alloc] initWithString:@"Cool."];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to transfer a new class instance (python class that inherits
When I create a new class file in Flex 3 it warns me that
Whenever I write a new class and add some internal fields, I use an
I created a new class in VS. For some reason Tortoise is not picking
I'm creating a new class that inherits from UIView. I remember that xcode 3
The new Android 2.1 SDK (version 7) has a new class called SignalStrength: http://developer.android.com/reference/android/telephony/SignalStrength.html
Where do I put a new class file, and how do I import it
I am trying to create a new class Dog that inherits via prototypical inheritance
In Visual Studio when you add a new class, it always created with no
I have subclassed UIViewController into a new class, PageViewController (I'm writing a simple book

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.