在Objective C中退出Sub等价物?

Jus*_*tin 0 objective-c

我对Objective C很新,但我在Visual Basic方面有一些经验.如果条件不满足,还是等于Exit Sub语句停止执行代码?我正在谈论

If Some.Condition.Is.Not.Met Then
    Exit Sub //Please don't execute any more code in this method
Run Code Online (Sandbox Code Playgroud)

这是使其正常工作的正确方法吗?

-(BOOL)methodThatQuitsOut {
    [SomeCode GoesHere];
    Other.code = Goes.here;
    if (condition != present) {
        return NO;
    }
    Does this code continue to run?;
}
Run Code Online (Sandbox Code Playgroud)

Ed *_* S. 6

从函数返回就是这样; 它返回,控制权传递回call-e.所以不,返回下面的代码不会执行.

我会注意到这需要大约30秒来测试自己.