Jump to content

+(BOOL) & -(BOOL)


Go to solution Solved by Tommy,

4 posts in this topic

Recommended Posts

Posted

What's the difference?

 

I think if:

Traget method = -(BOOL)isJailbroken

And = +(BOOL)isJailbroken

 

Then the return value shouldn't be False for both

Maybe one false and one true

 

Any idea???

  • Solution
Posted (edited)

Methods prefixed with - are instance methods. This means they can only be invoked on an instance of a class, eg:

[myStringInstance length];

 

Methods prefixed with + are class methods. This means they can be called on Classes, without needing an instance, eg:

[NSString stringWithString:@"Hello World"];

 

 

http://stackoverflow.com/questions/2238584/difference-between-and-methods-in-objective-c

Updated by Tommy

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines