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 caging area #3

Merged
merged 5 commits into from Oct 29, 2014
Merged

Add caging area #3

merged 5 commits into from Oct 29, 2014

Conversation

jrmsklar
Copy link
Contributor

This pull request adds the functionality a caging area for the draggable view, in which the view can not be dragged out of.

To add a caging area, set the cagingArea property on the view:

[view enableDragging];
CGRect cagingArea = <some CGRect>;
view.cagingArea = theCagingArea;

and to disable the caging functionality, set the cagingArea to CGRectZero:

view.cagingArea = CGRectZero;

This also adds a UISwitch to the demo project to showcase this behavior. In this demo, the caging area is the frame of the FPViewController's view.

caging

@andreamazz
Copy link
Owner

Hi @jrmsklar
Thanks for your contribution, great job 👍

andreamazz added a commit that referenced this pull request Oct 29, 2014
@andreamazz andreamazz merged commit fe62a5d into andreamazz:master Oct 29, 2014
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

Successfully merging this pull request may close these issues.

None yet

2 participants