Tuesday, December 3, 2013

Weak weak to ask, iphone how to call a custom method ...

posts by BcgBcr on 2012-06-27 16:23:31 Edit
Tried for a long time did not try it, alas ... I am asking this question speechless ......
Problem Description: If I created a new method - (BOOL) test;, or with reference method - (BOOL) test: (NSString *) NSSname; How do I call in another way? ? ?
For example, in:
 
- (Void) viewDidLoad
{
/ / Here call
[Super viewDidLoad];
/ / Do any additional setup after loading the view, typically from a nib.
}

Although very basic, hope to answer ....
Reply:
If it is a custom C functions can be called directly, if it is an object method, you can call
on the object with a common message syntax (grammar in parentheses)
BOOL b = [self test];
Reply:
cited a floor reply:
if it is a custom C functions can be called directly, if it is an object method, you can use ordinary objects in the message syntax ( bracket syntax) call
BOOL b = [self test];

Thank you very much ... whether it is another argument with bool b = [self test: @ "small"] it?

No comments:

Post a Comment