• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Newbie: How to understand Xcode's documentation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie: How to understand Xcode's documentation


  • Subject: Re: Newbie: How to understand Xcode's documentation
  • From: "Dave DeLong" <email@hidden>
  • Date: Tue, 15 Jul 2008 16:28:22 -0600

Hi Phil,

You're right: the documentation can take some getting used to.

Here are some tips:

When you see a method declared with a "-" out in front, such as:
- (NSString *) substringWithRange:(NSRange)range;
That means that you can only use that method on an instance of the
class.  For example:
NSString * someString = [myTextField stringValue];
NSString * subString = [someString substringWithRange:NSMakeRange(0,4)];

Methods that begin with a "+" are class methods and are used as such:
NSString * someString = [NSString stringWithString:someOtherString];
(Notice that I'm calling stringWithString on NSString itself and NOT
an instance of NSString)

There are a ton of resources out there for familiarizing yourself with
Objective-C and Xcode and whatnot.  Our local CocoaHeads group just
had a meeting last week about Objective-C and transitioning to it from
other languages, and we've got a screencast of it at our site:
http://cocoaheads.byu.edu/videos

HTH,

Dave
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Newbie: How to understand Xcode's documentation (From: Phil Faber <email@hidden>)

  • Prev by Date: Re: Newbie: How to understand Xcode's documentation
  • Next by Date: Re: [[NSDate alloc] initWithString] crashes with valid string
  • Previous by thread: Re: Newbie: How to understand Xcode's documentation
  • Next by thread: Re: Newbie: How to understand Xcode's documentation
  • Index(es):
    • Date
    • Thread