Skip to content
Guest Big Announcement

Featured Replies

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???

Solved by Tommy

  • Solution

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

Featured Content

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.