Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I am using a function in a class as below

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

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

Why that comes ?

Screenshot for example

like image 392
Arun Iphone Avatar asked Aug 15 '13 06:08

Arun Iphone


2 Answers

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.

like image 152
dpassage Avatar answered Oct 13 '22 20:10

dpassage


Because you haven't separately specified the parameter name and the selector definition. Basically, you're missing a space and/or a word. Try:

-(void)uploadMorePictures:(NSDictionary *)pics withFile:(NSData *)file

Which separately names and specifies both parameters to the method.

like image 32
Wain Avatar answered Oct 13 '22 21:10

Wain