I added the option in my tableview to sort/reorder cells. I used this tutorial: http://www.ioscreator.com/tutorials/reordering-rows-table-view-ios8-swift. Now I'd like to ask how I can save the sorting/order of the cells? I also use Core Data and the fetchedResultsController
.
相关问题
- Core Data lightweight migration crashes after App
- “Zero out” sensitive String data in Swift
- SwiftUI: UIImage (QRCode) does not load after call
- Get the NSRange for the visible text after scroll
- Custom UITableview cell accessibility not working
相关文章
- UITableView dragging distance with UIRefreshContro
- Using if let syntax in switch statement
- Enum with associated value conforming to CaseItera
- Swift - hide pickerView after value selected
- Is there a Github markdown language identifier for
- Popover segue to static cell UITableView causes co
- How can I vertically align my status bar item text
- Adding TapGestureRecognizer to UILabel in Swift
Add an extra attribute to your Core Data model object that is used to store the sort order. For example, you could have an
orderIndex
attribute:Then, use this attribute in your sort descriptor for your fetched results controller's fetch request:
And finally, update the
orderIndex
property in your UITableViewDataSource method: