我对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)
| 归档时间: |
|
| 查看次数: |
1682 次 |
| 最近记录: |