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

@interface for 'UIAttachmentBehavior' declares the selector 'initWithItem:point:attachedToAnchor:' #3

Open
pxbin opened this issue Apr 6, 2014 · 1 comment

Comments

@pxbin
Copy link

pxbin commented Apr 6, 2014

In Chapter2 Attaching Multiple Dynamic Items to Each Other
self.attachmentBehavior = [[UIAttachmentBehavior alloc]
initWithItem:self.squareView
point:self.squareViewAnchorView.center
attachedToAnchor:self.anchorView.center];

No visible @interface for 'UIAttachmentBehavior' declares the selector 'initWithItem:point:attachedToAnchor:'

@pxbin
Copy link
Author

pxbin commented Apr 6, 2014

fix "No visible @interface for 'UIAttachmentBehavior' declares the selector 'initWithItem:point:attachedToAnchor:'"
UIOffset offset = UIOffsetMake(self.squareViewAnchorView.center.x, self.squareViewAnchorView.center.y);
self.attachmentBehavior = [[UIAttachmentBehavior alloc] initWithItem:self.squareView
offsetFromCenter:offset
attachedToAnchor:self.anchorView.center];

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

No branches or pull requests

1 participant