Why cant I see all available methods or properties present in a Class in XCode?

3.2k Views Asked by At

I am noob to XCode and Obj-C world, so pardon me for my naive question.

Following a tutorial, I was writing a basic program in Cocos2D that would accept touch input.
And one of the task was to add implement ccTouchBegan method, but that would not show up in XCode's code sense.
I wanted to implement this method
-(BOOL) ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event
but I would find only this one (related to touch began)
-(BOOL) ccTouchesBeganWithEvent:(*)event

Now that I a noob, how do I explore list of all available methods and properties for a particular Class?enter image description here

The image shows list of available methods that starts with ccT. ccTouchBegan and ccTouchEnded showed up because I have implemented them already. Else, they would not show just like ccTouchCancelled and ccTouchMoved events didn't show up.

How do I see all available methods & properties of a Class or Object?

4

There are 4 best solutions below

0
On

Just press Backspace 3 times to delete the ccT you typed in. The list will increase with every character you erase. The full list not only shows methods, as you will see.

0
On

Option+Click on the object (in this case, that would be the delegate name in the header file between the < >). A small help popup will appear. Click the blue text inside the popup and the Organizer window will open at the documentation for the Class. The Documentation has all methods and properties you can use.

0
On

Maybe it does not show up because you have already defined it in your code? That would be logical, as double implementation would lead to a compiler error.

0
On

To see all the available methods & properties just press Ctrl+Space