警告-用作前一个参数的名称而不是选择器的一部分 [英] Warning-used as the name of the previous parameter rather than as part of the selector

查看:33
本文介绍了警告-用作前一个参数的名称而不是选择器的一部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在类中使用一个函数,如下所示

I am using a function in a class as below

- (void) uploadMorePic:(NSDictionary *) MuliPics: (NSData *)file  

它显示警告 - MuliPics 用作前一个参数的名称而不是选择器的一部分

It shows the warning - MuliPics used as the name of the previous parameter rather than as part of the selector

为什么会这样?

推荐答案

这是一个糟糕的信息,但这是因为您没有为方法的第一个参数提供名称.试试这个:

It's a poor message, but it's because you didn't provide a name for the first parameter to your method. Try this:

-(void)uploadMorePic:(NSDictionary *)dict muliPics:(NSData *)file

我还修复了一个样式问题;方法名称的第二部分的名称应以小写字母开头.我不知道你的方法是做什么的,所以你可以想出一个更好的名字.

I also fixed a style issue; the name of the second part of the method name should start with a lower-case letter. I don't know what your method does, so you may be able to come up with a better name.

这篇关于警告-用作前一个参数的名称而不是选择器的一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆