Passing float "byref" in Objective C? -


Is there a way to pass a float by "byref" by a method in Objective-C? I have an overview of what I have:

Method Signature:

  - (zero) MerryPad: (Float *) Minimum Max: (Float *) Max;  

Method:

  - (zero) MyMethod: (float *) minimum maximum: (float *) max {}  

Try applying it:

  float min1 = 0; Float max 1 = 0; [Myself Method: Minimum: Maximum 1 Max: & amp; Maximum 1];  

I get the following warning, and the code flows when trying to implement MyMethod:

Warning: 'MyClass': MyMethod: min: max:

  -   

The signature for your method has been announced < / P> (empty) MyMethod: (Float *) Minimum Max: (Float *) Maximum

But you can call it

  - MyMethod: min: max :  

... which contains an extra 'min:' which is not in the declaration.

Try changing your calling code

  float min 1 = 0; Float max 1 = 0; [Self Mymath & amp; Min 1 Max: & amp; Max 1];  

And see if things improve.

However, I see that your error message complains about the signature '+ MyMethod: min: max:', which also suggests you class class < I-> Example instead of trying to send the message; You have to improve it.

Finally, in Objective-C code, the method selector usually starts with a lower case; You may want to read on normal.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -