AFNetworking和MJRefresh编译过程中遇到的几个小问题

来源:互联网 发布:unix 环境高级编程 3 编辑:程序博客网 时间:2024/05/16 04:45

1. objc_msgSend()报错Too many arguments to function call ,expected 0,have3

答案:Build Setting--> Apple LLVM 6.0 - Preprocessing--> Enable Strict Checking of objc_msgSend Calls  改为 NO

2.self.state = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(state))] integerValue];

错误是
assigning to 'AFOperationState' from incompatible type ‘NSInteger’ (aka 'long')

答案:因为修改了Apple LLVM 7.0-Language的sources As,将其修改成了Object-c++,该其改回According to File Type

3.编绎显示Unknown type name “CGFloat”  错误解决方法

答案:将Compile Sources As 改为 Objective-C++

如果是extern const 引起的,添加头文件UIkit

1 0
原创粉丝点击