### CocoaPods installation: pod 'SwiftReorder', '~> 7.2' Source: https://github.com/adamshin/swiftreorder/blob/master/README.md Add this line to your Podfile to integrate SwiftReorder via CocoaPods. ```ruby pod 'SwiftReorder', '~> 7.2' ``` -------------------------------- ### Setup: set reorder delegate in viewDidLoad Source: https://github.com/adamshin/swiftreorder/blob/master/README.md Add this line to your table view setup to set the reorder delegate. ```swift override func viewDidLoad() { // ... tableView.reorder.delegate = self } ``` -------------------------------- ### Carthage installation: github "adamshin/SwiftReorder" ~> 7.2 Source: https://github.com/adamshin/swiftreorder/blob/master/README.md Add this line to your Cartfile to integrate SwiftReorder via Carthage. ```plaintext github "adamshin/SwiftReorder" ~> 7.2 ``` -------------------------------- ### Setup: implement reorderRowAt delegate method Source: https://github.com/adamshin/swiftreorder/blob/master/README.md Implement the TableViewReorderDelegate method to update your data model when rows are reordered. ```swift extension MyViewController: TableViewReorderDelegate { func tableView(_ tableView: UITableView, reorderRowAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath) { // Update data model } } ``` -------------------------------- ### Setup: return spacer cell in cellForRowAt Source: https://github.com/adamshin/swiftreorder/blob/master/README.md Add this code to the beginning of your tableView(_:cellForRowAt:) to return the spacer cell when needed. ```swift func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { if let spacer = tableView.reorder.spacerCell(for: indexPath) { return spacer } // ... } ``` -------------------------------- ### Carthage build phase: add SwiftReorder.framework Source: https://github.com/adamshin/swiftreorder/blob/master/README.md Add these two lines to your Carthage build phase script to link the framework. ```plaintext $(SRCROOT)/Carthage/Build/iOS/SwiftReorder.framework ``` ```plaintext $(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/SwiftReorder.framework ``` -------------------------------- ### Customization: adjust shadow Source: https://github.com/adamshin/swiftreorder/blob/master/README.md Set shadowOpacity and shadowRadius to customize the shadow effect of the reordering cell. ```swift tableView.reorder.shadowOpacity = 0.5 tableView.reorder.shadowRadius = 20 ``` -------------------------------- ### Customization: add scaling effect Source: https://github.com/adamshin/swiftreorder/blob/master/README.md Set the cellScale property to add a scaling effect to the selected cell during reordering. ```swift tableView.reorder.cellScale = 1.05 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.