ObjecTips

Swift & Objective-C で iOS とか macOS とか

2015-04-02から1日間の記事一覧

functionで NSAssert を使う

NSAssert をfunction内で使おうとすると Use of undeclared identifier '_cmd'; did you mean 'rcmd'? Use of undeclared identifier 'self' という2つのエラーが起きる。 function内で使える NSCAssert というマクロがあるのでそちらを使う。