Hi,
I am having problems using a string variable within a method statement. The code works fine no issues if i use it a a stand alone method, but i have 6 methods using the same code the only differences are an int value which i am ok with and the 'myImage' name or string value which is the bit i cant seem to work out.
This part of the code works fine as a standalone method:
So i am trying to use one method and pass variables to it. But when i pass the parameters of v_myImageName as a string it keeps coming up with the error 'No visible interface for ViewController declares the selector v_myImageName. I think it cannot see the variable within the v_myImageName and is looking for an image / layer called v_myImageName.
Any advice will be welcomed.
Thanks in advance.
Daz...
I am having problems using a string variable within a method statement. The code works fine no issues if i use it a a stand alone method, but i have 6 methods using the same code the only differences are an int value which i am ok with and the 'myImage' name or string value which is the bit i cant seem to work out.
This part of the code works fine as a standalone method:
Code:
[[[self myImage] layer] setValue:imageRotation.toValue forKey:imageRotation.keyPath];
So i am trying to use one method and pass variables to it. But when i pass the parameters of v_myImageName as a string it keeps coming up with the error 'No visible interface for ViewController declares the selector v_myImageName. I think it cannot see the variable within the v_myImageName and is looking for an image / layer called v_myImageName.
Code:
-(void) testMethod: (int)v_Number myImageName: (NSString *)v_myImageName
{
//other code
[[[self v_myImageName] layer] setValue:imageRotation.toValue forKey:imageRotation.keyPath];
//other code
}
Any advice will be welcomed.
Thanks in advance.
Daz...
Last edited by a moderator: