Understanding apple's Documentation


#1

Is there a tutorial or info file some where to help understand Apple’s developer Library. I’ve read Cocoa® Programming through
and mostly get it but when I look at Apple’s docs My brain melts and flows out my ears. :laughing:

is there help interpreting this sort of stuff into actual code for application/apps?

[code]gestureRecognizers
The gesture recognizers that are receiving the touch object.

@property(nonatomic,readonly,copy) NSArray *gestureRecognizers
Discussion
The objects in the array are instances of a subclass of the abstract base class UIGestureRecognizer. If there are no gesture recognizers currently receiving the touch objects, this property holds an empty array.

Availability
Available in iOS 3.2 and later.
Declared In
UITouch.h
[/code]

basically I need a course on apple speak or something…
Sorry if this is a stupid question but moving beyond the books have proven difficult…

thanks
Ian


#2

That is a great question. Learning to read and understand the documentation is key to developing past the book. When I read the text that you copied into your post i see a few things.

  1. whatever class we are looking in has an instance variable called gestureRecognizers. At this point i don’t know much about it other than its name and that brief description given. Ill get more info on the next line.

  2. the class provides a “property” for that instance variable. If you think back to when we discussed properties in the book you will remember that this means there exist methods which interact with this object. These methods are commonly called “setters and getters” or sometimes “accessors and mutators” in languages like Java. What that means is one of these methods will allow you to get (or access) the value of the object, and the other will allow you to set (or mutate) the value of the object. Lets keep reading.

  3. the property is declared as non atomic. for the sake of simplicity we are going to skip this term. When you feel more comfortable with Obc-C you can tackle that. For now, know that its a good idea to include it. Moving on.

  4. readonly. what could that mean? well remember those Setters and Getters. well this term means that only a Getter will be created. You will be able to get at the value in the object. but you won’t be able to SET it. meaning you can’t change the value.

  5. “copy”. this value determines how the memory will be managed for this object. i won’t go into detail here, as memory management takes a full chapter on its own. but open the book back to the chapter on memory management if you don’t remember the difference between copy, retain, and assign.

  6. NSArray tells us the object type. gestureRecognizers is an instance of NSArray

  7. This next paragraph just tells us a bit more about the object.
    "The objects in the array are instance of a subclass of the abstract base class UIGestureRecognizer"
    This is simply telling us what the NSArray gestureRecognizer should contain. It should contain instances of a subclass of UIGestureRecognizer.
    The last sentence in the paragraph is fairly self explanatory.

and finally, the availability as well as the location where this is declared in code.

if you know this is not available before 3.2 you can decide to use it or not in your code. for example, if you wanted your App to be able to be run on the first iPhone running 2.0 (i don’t know why you would want this, but if you did) then you would know not make reference to this object. this is not such a big deal i it says 3.2 or later, as almost everyone has 3.2 or later. but if it were to say “Available in iOS 5.0 or later” you might want to ask yourself about your target demographic before including it.

i hope this answer helped. but please feel free to message or email me if you have any more questions. I suggest simply reading a bunch of documentation. it will start to come together.


#3

Thanks that helps…

Copy that, Study more docs, do actual projects !
thanks
Ian