Skip to content

Commit 9a718f6

Browse files
committed
Updated readme and version.
1 parent 3d62377 commit 9a718f6

5 files changed

Lines changed: 26 additions & 18 deletions

File tree

25 KB
Loading

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import PackageDescription
55
let package = Package(
66
name: "SPDiffable",
77
platforms: [
8-
.iOS(.v12)
8+
.iOS(.v13)
99
],
1010
products: [
1111
.library(

Readme.md

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@
22

33
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.
44

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:
66

77
<p float="left">
8-
<a href="https://github.com/ivanvorobei">
9-
<img src="https://github.com/ivanvorobei/Readme/blob/main/Buttons/follow-me-ivanvorobei.svg">
10-
</a>
118
<a href="https://opensource.ivanvorobei.by">
129
<img src="https://github.com/ivanvorobei/Readme/blob/main/Buttons/more-libraries.svg">
1310
</a>
@@ -34,31 +31,33 @@ If you like the project, don't forget to `put star ★` and follow me on GitHub:
3431

3532
## Installation
3633

37-
Ready for use on iOS 12+. Works with Swift 5+. Required Xcode 12.0 and higher.
34+
Ready for use on iOS 13+. Works with Swift 5+. Required Xcode 12.0 and higher.
3835

39-
<img align="right" src="https://github.com/ivanvorobei/SPDiffable/blob/main/Assets/Readme/spm-install-preview.png" width="520"/>
36+
<img align="right" src="https://github.com/ivanvorobei/SPDiffable/blob/main/Assets/Readme/spm-install-preview.png" width="550"/>
4037

4138
### Swift Package Manager
4239

43-
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.
4441

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`.
4643

47-
```ogdl
48-
https://github.com/ivanvorobei/SPDiffable
44+
```swift
45+
dependencies: [
46+
.package(url: "https://github.com/ivanvorobei/SPDiffable.git", .upToNextMajor(from: "1.6.0"))
47+
]
4948
```
5049

5150
### CocoaPods:
5251

53-
[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`:
5453

5554
```ruby
5655
pod 'SPDiffable'
5756
```
5857

5958
### Manually
6059

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`.
6261

6362
## Usage
6463

@@ -213,7 +212,7 @@ In class available ready-use cell providers for menu item and header section. Fo
213212
```swift
214213
override func viewDidLoad() {
215214
super.viewDidLoad()
216-
setCellProviders([SPDiffableCollectionCellProviders.sideBar], sections: content)
215+
setCellProviders(SPDiffableCollectionCellProviders.sideBar, sections: content)
217216
}
218217
```
219218

@@ -275,17 +274,26 @@ Now in project you can find this ready-use models:
275274

276275
#### For Table:
277276

277+
Here provided models:
278+
278279
- `SPDiffableTableRow` it native item for table cell. Support all basic styles and action for tap event.
279280
- `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.
280282
- `SPDiffableTableRowStepper` item for table cell with stepper. Has maximum value and minimum, also incuded action with passed value.
281283
- `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:
283286

284287
- `SPDiffableTableViewCell` basic table cell with detail text right side.
285288
- `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.
286292

287293
#### For Collection:
288294

295+
Provided only models, becouse for most items using list registration and no need specific cell class.
296+
289297
- `SPDiffableCollectionActionableItem` actionable item for collection view.
290298
- `SPDiffableSideBarItem` menu item in side bar. Support accessories and actions.
291299
- `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:
296304
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.
297305

298306
```swift
299-
let item = SPDiffableWrapperItem(identifier: "unqi-identifier", model: LocationRowModel(city: "Minsk"))
307+
let item = SPDiffableWrapperItem(identifier: "uniq-identifier", model: LocationRowModel(city: "Minsk"))
300308
```
301309

302310
## Сontribution

SPDiffable.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
Pod::Spec.new do |s|
22

33
s.name = 'SPDiffable'
4-
s.version = '1.6.0'
4+
s.version = '1.6.1'
55
s.summary = 'Extenshion of Diffable API which allow not duplicate code and use less models.'
66
s.homepage = 'https://github.com/ivanvorobei/SPDiffable'
77
s.source = { :git => 'https://github.com/ivanvorobei/SPDiffable.git', :tag => s.version }
88
s.license = { :type => 'MIT', :file => "LICENSE" }
99
s.author = { 'Ivan Vorobei' => 'hello@ivanvorobei.by' }
1010

1111
s.swift_version = '5.1'
12-
s.ios.deployment_target = '12.0'
12+
s.ios.deployment_target = '13.0'
1313

1414
s.source_files = 'Sources/SPDiffable/**/*.swift'
1515

0 commit comments

Comments
 (0)