Skip to content
New issue

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

Add target on ControlNode not working #220

Closed
garrettmoon opened this issue May 2, 2017 · 2 comments
Closed

Add target on ControlNode not working #220

garrettmoon opened this issue May 2, 2017 · 2 comments

Comments

@garrettmoon
Copy link
Member

From @Ghana93 on April 16, 2017 11:41

i added this code in LikeNode (in init method) of social app example,but its not working

[self addTarget:self action:@selector(likeTapped:) forControlEvents:ASControlNodeEventTouchUpInside];

-(void)likeTapped:(id)sender {
 NSLog(@"Like Button Pressed");
}

Please help
Thank you,
Gaurav

Copied from original issue: facebookarchive/AsyncDisplayKit#3276

@garrettmoon
Copy link
Member Author

@Ghana93 it looks like it's because the PostNode is changing it to be layer backed. In the latest master we've added an assert that prevents this. So now the example asserts on load when the PostNode tries to make it layer backed.

@iOS-GauravK
Copy link

Yes,By Removing code from line 186 to 188 in PostNode.m,

  for (ASDisplayNode *node in self.subnodes) {
        node.layerBacked = YES;
   }

i was able to perform action task..
Thank You

garrettmoon added a commit to garrettmoon/Texture that referenced this issue May 3, 2017
Adlai-Holler pushed a commit that referenced this issue May 4, 2017
* Fixes assertion on startup found when investigating #220

* Update license in header
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants