美文网首页
iOS 报错

iOS 报错

作者: 想想8606 | 来源:发表于2017-07-26 20:29 被阅读0次

1、运行的时候,跳出弹窗,显示:unable to attch;

解决办法:关掉模拟器,再打开后运行项目,即可。

2、真机测试的时候,出现:“is busy: Processing symbol files”

解决办法:

A、数据线重新连一下(这个起作用的时候挺少的);

B、Xcode重启一下(一般都是这个比较管用);

3、控制器切换的时候,是push的,但是会卡顿一下。视觉上就是在从A界面Push到B界面的时候,页面已经到B界面了,但是A界面上的部分内容会显示一部分在B界面。

原因:第二个界面(即B界面),没有设置背景眼神,设个白色就解决了。

4、运行的时候,报错如下:

diff: /../Podfile.lock: No such file or directory

diff: /Manifest.lock: No such file or directory error: The sandbox is not in sync with the Podfile.lock.

Run 'pod install' or update your CocoaPods installation.

解决办法:关掉Xcode,把pod的流程重新走一遍,就好了。

5、在自定义一个代理的时候,写方法的时候,报警告:

used as the name of the previous parameter rather than as part of the selector

原因:写方法的时候,少了参数。

6、网络请求的时候,报错:

The data couldn’t be read because it isn’t in the correct format.

经查,原因是我写的是get请求,而后台要求所有的请求都要是post,所以把请求改成post就好了。

7、报错:

NSUnknownKey Exception Reason: [ setValue: forUndefinedKey:]: this class is not key value coding-compliant for the key

原因:我声明属性的时候写的是NSDictionary,然后又在后面,写了setValue: forKey:  

但是这个应该是针对可变字典 的操作,所以把属性的声明改成可变字典就好了。

相关文章

网友评论

      本文标题:iOS 报错

      本文链接:https://www.haomeiwen.com/subject/klnokxtx.html