iOS开发bug消灭之:Generic parameter 'ResultType' could not be inferred
来源:互联网 发布:网络调研报告 编辑:程序博客网 时间:2024/05/10 12:43
错误:Generic parameter ‘ResultType’ could not be inferred
swift版本:3.0
Xcode版本:8.0
错误原因:声明NSFetchRequest类型的时候没能指定其类型
错误源码:
let fetchRequest:NSFetchRequest = NSFetchRequest(entityName: "Person")
修正源码:
let fetchRequest:NSFetchRequest = NSFetchRequest<NSFetchRequestResult>(entityName: "Person")
简洁版:
let fetchRequest = NSFetchRequest<NSFetchRequestResult>(entityName: "Person")
参考:
https://forums.developer.apple.com/thread/49162
0 0
- iOS开发bug消灭之:Generic parameter 'ResultType' could not be inferred
- 【iOS】Swift3中NSFetchRequest报错:Generic parameter 'ResultType' could not be inferred
- iOS开发bug消灭之:Could not cast value of type 'UINavigationController' to 'RedShirt.AddEmployeeTableVi...
- iOS开发bug消灭之:Your application has presented a UIAlertController of style ...
- iOS开发bug消灭之:Invalid update: invalid number of rows in section 0.
- iOS开发问题之the file “XXX” could not be opened because you don't have permission to view it
- iOS开发bug消灭之:Implicit use of 'self' in closure; use 'self.' to make capture semantics explicit
- 【iOS开发】The resource could not be loaded because the App Transport Security policy。。。
- could not locate named parameter
- could not locate named parameter
- could not locate named parameter
- Could not find parameter map
- iOS开发 - 报错处理 - Error: Error #3219: The NativeProcess could not be started. ‘launch path not accessib
- mybatis使用bug:org.apache.ibatis.builder.IncompleteElementException: Could not find parameter map java
- iOS:SVN问题 the operation could not be completed
- ios真机调试 The application could not be verified.
- ios bitcode bundle could not be generated because 'UserszhaoxiaoluHuiLianHuiLianHuiLianLibsJhtMarque
- JNI开发:Class android.content.Context could not be found
- 字符串-面试题4-替换空壳
- Android 6.0上的权限申请解析
- Hdu 5909 Tree Cutting(fwt优化异或卷积)
- Kmalloc Vmalloc alloc 之间的关系
- UE4服务器模式
- iOS开发bug消灭之:Generic parameter 'ResultType' could not be inferred
- linux c++编程中vim与命令行中中文乱码问题的应对
- 按字节交换内容,贼6
- 数据类型
- UE4服务器登录流程
- UML学习五 建模图表(三)
- MySQL 主外键关系
- 线程
- UE4网络代码分析