What is NSAssert1?
问题 I am developing an application on iOS. I see there is a macro called NSAssert1 . What is it for? What are the differences in usage between NSLog and NSAssert1 ? Please guide me or suggest a tutorial where I can read about it. 回答1: NSAssert variants take a condition and a message. If the condition isn't met/true, then the assertion fails and NSAssert raises an exception with the message provided. For example, NSAssert((a == b), @"Error message"); will raise an exception when a is not equal to