We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is it possible to include a method for listening to multiple objects at the same time?
example:
listenFor:@"something" fromObjects:(NSArray *)anArrayOfObjects andRunMethod: ...
Might be handy...
The text was updated successfully, but these errors were encountered:
Added
-(void)listenFor:(NSString *)notification fromObjects:(NSArray *)objectArray andRunMethod:(NSString *)methodName;
and
-(void)stopListeningFor:(NSString *)methodName objects:(NSArray *)objectArray;
The following code works:
#import "C4WorkSpace.h" @implementation C4WorkSpace { C4Shape *r1, *r2, *r3; } -(void)setup { CGPoint p; r1 = [C4Shape rect:CGRectMake(0, 0, 50, 50)]; p = self.canvas.center; p.x -= 100; r1.center = p; [self.canvas addShape:r1]; r2 = [C4Shape rect:CGRectMake(0, 0, 50, 50)]; p = self.canvas.center; r2.center = p; [self.canvas addShape:r2]; r3 = [C4Shape rect:CGRectMake(0, 0, 50, 50)]; p = self.canvas.center; p.x += 100; r3.center = p; [self.canvas addShape:r3]; [self listenFor:@"touchesBegan" fromObjects:[NSArray arrayWithObjects:r1,r3, nil] andRunMethod:@"test"]; } -(void)test { C4Log(@"test"); } @end
Sorry, something went wrong.
No branches or pull requests
is it possible to include a method for listening to multiple objects at the same time?
example:
Might be handy...
The text was updated successfully, but these errors were encountered: