Objective C scope problem
问题 I have the following Obj C function that works properly: NSString* myfunc( int x ) { NSString *myString = @"MYDATA"; return myString; } However if I add code to update a UIImage the compile fails with image1 being unknown. image1 is valid: it's set up in the .h, synthesized and that exact line of code works in a method below this function. Only when I move the line of code up to this function does it fail. NSString* myfunc( int x ) { NSString *myString = @"MYDATA"; image1.image = [UIImage