ObjecTips

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

NSAssert

functionで NSAssert を使う

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