-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathCollectionAndTableViewCompatible.podspec
45 lines (35 loc) · 2.16 KB
/
CollectionAndTableViewCompatible.podspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#
# Be sure to run `pod lib lint CollectionAndTableViewCompatible.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = 'CollectionAndTableViewCompatible'
s.version = '0.2.2'
s.summary = 'A set of Swift protocols and Xcode snippets that will make it easy to do clean UICollectionView and UITableView code.'
s.swift_version = '5.0'
# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
s.description = <<-DESC
The project consists of three protocols:
- `TableViewCompatible`
- `Configurable`
- `TableViewSection`
Create a view model that conforms to the `TableViewCompatible` protocol. The view model could either be a separate class or an extension to your existing model obejct. Your choice.
The create a `UITableViewCell` subclass that conforms to the `Configurable` protocol. Make the function `configureWithModel` take an instance of your view model as parameter.
Finally create a class or struct that conforms to the `TableViewSection` protocol and let your `UITableViewDataSource` data model be an array of `TableViewSection`.
For a more detailed explaination see this [blog post](https://blog.jayway.com/2016/11/15/clean-table-view-code-using-swift-protocols/)
DESC
s.homepage = 'https://github.com/jayway/CollectionAndTableViewCompatible'
s.license = { :type => 'Apache Version 2.0', :file => 'LICENSE' }
s.author = { 'Jimmie Jensen' => 'jimmie.jensen@jayway.com' }
s.source = { :git => 'https://github.com/jayway/CollectionAndTableViewCompatible.git', :tag => s.version.to_s }
s.ios.deployment_target = '9.0'
s.source_files = 'Sources/**/*'
s.frameworks = 'UIKit'
end