1. 屏幕转动问题
- 找了一些,觉得这篇文章的比较好 http://www.jianshu.com/p/c973817d40c8
2. VVDocumenter安装不成功
- 现在Xcode自带了VVDocument功能
- 快捷键command + Option + /
3. PrefixHeader.pch使用时需要配置
- 改完两处后Clean项目
4. 设置UserAgent
- 设置的按钮会失效
self.webView = [[WKWebView alloc] initWithFrame: CGRectMake(0, buttonBar.frame.size.height + 20, screen.size.width, screen.size.height - 120)];
[self.webView evaluateJavaScript:@"navigator.userAgent" completionHandler:^(id result, NSError *error) {
__strong typeof(weakSelf) strongSelf = weakSelf;
NSString *userAgent = result;
NSString *newUserAgent = [userAgent stringByAppendingString:@" emiaoqian"];
NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:newUserAgent, @"UserAgent", nil];
[[NSUserDefaults standardUserDefaults] registerDefaults:dictionary];
strongSelf.webView = [[WKWebView alloc] initWithFrame:strongSelf.view.bounds];
// After this point the web view will use a custom appended user agent
[strongSelf.webView evaluateJavaScript:@"navigator.userAgent" completionHandler:^(id result, NSError *error) {
NSLog(@"%@", result);
}];
}];
- 这样设置则不会,但这种设置会变为全局修改
// 获取默认User-Agent
UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectZero];
NSString *oldAgent = [webView stringByEvaluatingJavaScriptFromString:@"navigator.userAgent"];
// 给User-Agent添加额外的信息
NSString *newAgent = [NSString stringWithFormat:@"%@;%@", oldAgent, @"extra_user_agent"];
// 设置global User-Agent
NSDictionary *dictionnary = [[NSDictionary alloc] initWithObjectsAndKeys:newAgent, @"UserAgent", nil];
[[NSUserDefaults standardUserDefaults] registerDefaults:dictionnary];
5. release报错
release报错- 解决方法,把release相关检查关闭
6. 不显示隐藏文件
显示Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles -bool true
隐藏Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles -bool false
或者
显示Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles YES
隐藏Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles NO
之后重启Finder
7. 引用文件找不到报错
http://www.jianshu.com/p/747e6005a89c
http://blog.csdn.net/alan00000/article/details/45921217
header路径设置问题
library路径设置问题
8. ARC问题
http://blog.csdn.net/luckypeng/article/details/50957532
网友评论