objc_msgSend 报错
Posted claireyuancy
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了objc_msgSend 报错相关的知识,希望对你有一定的参考价值。
NSMutableArray * mutableArray = [NSMutableArray arrayWithArray:array]; objc_msgSend(mutableArray,@selector(insertObject:atIndex:),@"0",0);
今天写了这么一段代码,妈的。报了错,错误提示是:too many arguments to function call,expected 0,have 4
一查。原来是一个东西没打开,仅仅要
选中项目 - Project - Build Settings - ENABLE_STRICT_OBJC_MSGSEND 将其设置为 NO 就可以
![https://image.cha138.com/20210609/44bf88f5a4ba404593593a2489ebad8c.jpg](https://image.cha138.com/20210609/44bf88f5a4ba404593593a2489ebad8c.jpg)
以上是关于objc_msgSend 报错的主要内容,如果未能解决你的问题,请参考以下文章
id objc_msgSend(id self, SEL op, ...)
错误记录Flutter 混合开发获取 BinaryMessenger 报错 ( FlutterActivityAndFragmentDelegate.getFlutterEngine() )(代码片段