PDA

View Full Version : call user defined method




iphonejudy
Apr 9, 2009, 01:41 AM
Hi,

I need to call the user defined method.But i got error,whats the syntax?


//declaration
-(void) news;

//definition
-(void) news
{
----------
---------

}

calling function

myclass:news;//got error

}



CocoaPuffs
Apr 9, 2009, 02:20 AM
[self oughtaReadABook];

- (void)oughtaReadABook {
//pick up a damn book and read if you're stuck on the basic.

}

iphonedevelop18
Apr 9, 2009, 10:54 PM
Wherever you want to access the method inside the .m put this piece of code.

[self news];