- July 30, 2025
- Mins Read
UIView category that adds dragging capabilities.
pod 'UIView+draggable'
to your Podfilepod install
open App.xcworkspace
github “andreamazz/UIView-draggable”
Import UIView+draggable.h
in your controller’s header file
If you are using use_frameworks!
in your Podfile, use this import:
import UIView_draggable
Call enableDragging
on a UIView instance
// Enable dragging
[self.view enableDragging];
view.enableDragging()
The movement area can be restricted to a given rect:
view.cagingArea = CGRectMake(0, 0, 200, 200)
The movement can be restricted over one coordinate:
view.shouldMoveAlongX = true
view.shouldMoveAlongY = true
The area where the dragging action starts can be configured:
view.handle = CGRectMake(0, 0, 20, 20)
PermissionsSwiftUI displays and handles permissions in SwiftUI. It is largely inspired by SPPermissions. The UI is highly customizable and resembles an Apple style. ...
Introduction PagerTabStripView is the first pager view built in pure SwiftUI. It provides a component to create interactive pager views ...
1. Taking Action When a Property Changes: Property Observers Swift lets you observe and respond to changes in a property’s ...