Saturday, August 11, 2012

Methods General and passing argument.....

No Argument Methods

Declaring The Method
- (void)SomeMethodName;
Coding The Method
- (void)SomeMethodName
{

}
Calling The Method
        [self SomeMethodName];

Single Argument Methods

Declaring The Method
- (int)SomeMethodName:(int)Value1;
Coding The Method
- (int)SomeMethodName:(int)Value1
{

        return 18;
}
Calling The Method
        [self SomeMethodName:34];

Multiple Argument Methods

Declaring The Method
- (void)FileDownloaderCallback:(NSMutableData *)FileData
                                          fileURL1:(NSString *)fileURL;
Coding The Method
- (void)FileDownloaderCallback:(NSMutableData *)FileData
                                          fileURL1:(NSString *)fileURL
Calling The Method
        [self FileDownloaderCallback:fileData fileURL1:DownloadingFileURL];



No comments:

Post a Comment