http://blog.youkuaiyun.com/freewaywalker/article/details/45623433
强调的一个技巧是,通过使用expr 表达式
可实现在运行时修改变量的值
expr username = @"username"
expr password = @"badpassword"
通过上面的代码段,变量username
和password
分别被重新赋值。
宏定义打印信息
#ifdef
DEBUG #define DMLog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__])
#else#define DMLog(...) do { } while (0)