开发者

Catching exceptions in objective-c

Is there some sort of开发者_如何学Python try/catch function in obj-c? I'm trying to load saved files from an array and would like to have some sort of message popping up instead of the app crashing in case the array is empty. Whats the best and optimal way to do this?


@try {
    //Code
} 
@catch (id theException) {
    //Code
} 
@finally {
    //Code
}

Or you can test if the array is empty ...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜