在同一类目标 C 中调用函数

use*_*935 1 iphone objective-c ios

我是 Objective C 的新手,我根本找不到关于这个主题的资源

假设我有一个名为 A 的函数和一个名为 B 的函数,它们都属于同一个类,我应该如何在函数 A 中调用函数 B ?假设它们都属于一个名为 C 的类

谢谢

Gab*_*iel 5

//other code inside your project

-(void) functionA
{
NSLog(@"Hello"); // not sure if the syntax for this is right, but it should be

}

-(void) functionB
{
[self functionA];
}
Run Code Online (Sandbox Code Playgroud)