You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Readme.md
+23-15Lines changed: 23 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,9 @@
2
2
3
3
Apple's diffable API requerid models for each object type. If you want use it in many place, you pass many time to implemenet and get over duplicates codes. This project help you do it elegant with shared models and special cell providers for one-usage models.
4
4
5
-
If you like the project, don't forget to `put star ★` and follow me on GitHub:
5
+
If you like the project, don't forget to `put star ★`<br>Check out my other libraries:
The [Swift Package Manager](https://swift.org/package-manager/) is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.
40
+
The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.
44
41
45
-
To integrate `SPDiffable` into your Xcode project using Xcode 12, specify it in `File > Swift Packages > Add Package Dependency...`:
42
+
Once you have your Swift package set up, adding as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.
[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate `SPDiffable` into your Xcode project using CocoaPods, specify it in your `Podfile`:
52
+
[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate using CocoaPods, specify it in your `Podfile`:
54
53
55
54
```ruby
56
55
pod 'SPDiffable'
57
56
```
58
57
59
58
### Manually
60
59
61
-
If you prefer not to use any of dependency managers, you can integrate `SPDiffable` into your project manually. Put `Sources/SPDiffable` folder in your Xcode project. Make sure to enable `Copy items if needed` and `Create groups`.
60
+
If you prefer not to use any of dependency managers, you can integrate manually. Put `Sources/SPDiffable` folder in your Xcode project. Make sure to enable `Copy items if needed` and `Create groups`.
62
61
63
62
## Usage
64
63
@@ -213,7 +212,7 @@ In class available ready-use cell providers for menu item and header section. Fo
@@ -275,17 +274,26 @@ Now in project you can find this ready-use models:
275
274
276
275
#### For Table:
277
276
277
+
Here provided models:
278
+
278
279
-`SPDiffableTableRow` it native item for table cell. Support all basic styles and action for tap event.
279
280
-`SPDiffableTableRowSubtitle` it native item for table cell with subtitle. Support all as before.
281
+
-`SPDiffableTableRowButton` item for table in style as button. Support table styles and action for tap.
280
282
-`SPDiffableTableRowStepper` item for table cell with stepper. Has maximum value and minimum, also incuded action with passed value.
281
283
-`SPDiffableTableRowSwitch` item for table with switch, included default state and action for change event.
282
-
-`SPDiffableTableRowButton` item for table in style as button. Support table styles and action for tap.
284
+
285
+
Here provided cells:
283
286
284
287
-`SPDiffableTableViewCell` basic table cell with detail text right side.
285
288
-`SPDiffableSubtitleTableViewCell` basic table cell with two lines of texts.
289
+
-`SPDiffableStepper` cell with stepper control. Using with `SPDiffableTableRowStepper` model.
290
+
-`SPDiffableSwitch` cell with switch. Using with `SPDiffableTableRowSwitch` model.
291
+
-`SPDiffableSlider` cell with slider.
286
292
287
293
#### For Collection:
288
294
295
+
Provided only models, becouse for most items using list registration and no need specific cell class.
296
+
289
297
-`SPDiffableCollectionActionableItem` actionable item for collection view.
290
298
-`SPDiffableSideBarItem` menu item in side bar. Support accessories and actions.
291
299
-`SPDiffableSideBarButton` button item in side bar. Color of title similar to tint.
@@ -296,7 +304,7 @@ Now in project you can find this ready-use models:
296
304
In project you can find class `SPDiffableWrapperItem`. Using it, when you don't want create custom item model for you diffable struct. You can pass any your model and uwrap it later in cell provider.
297
305
298
306
```swift
299
-
let item =SPDiffableWrapperItem(identifier: "unqi-identifier", model: LocationRowModel(city: "Minsk"))
307
+
let item =SPDiffableWrapperItem(identifier: "uniq-identifier", model: LocationRowModel(city: "Minsk"))
0 commit comments