我很确定这是一个简单的解决方法,但它太具体了,我不知道在哪里可以找到答案……我想创建一个方法,从执行它的对象中检索和使用 UIImage。
这是调用以 imageView 作为对象的方法的行。
[self performSelector:@selector(method:) withObject:self.imageView afterDelay:0.0];
这就是方法...
- (void) method:(UIImage *) image {
if ([image isEqual:image1]){
x = 1;
}
if ([image isEqual:image2]){
x = 2;
}
if ([image isEqual:image3]){
x = 3;
}
if ([image isEqual:image4]){
x = 4;
}
if ([image isEqual:image5]){
x = 5;
}
...我是否以正确的方式解决这个问题?谢谢!