一 iOS宏输出
不改变系统的NSLog函数
//如果release状态就不执行NSLog函数 __OPTIMIZE__是来标识是否是release的
#ifndef __OPTIMIZE__
#define NSLog(...) NSLog(__VA_ARGS__)
#else
# define NSLog(...) {}
#endif
二 WKWebView调用系统文件时,webview会直接退出
调用系统文件后,点击选项会出现如下错误
Warning: Attempt to present UIImagePickerController: 0x12d192200 on My.WebViewController: 0x12e2883e0 whose view is not in the window hierarchy!
解决办法:
在进入首页的时候,将首页设为App的根视图;代码如下:
[UIApplication sharedApplication].keyWindow.rootViewController = self.tabBarController;