diff --git a/Carbon.podspec b/Carbon.podspec index 1ed311c..213144a 100644 --- a/Carbon.podspec +++ b/Carbon.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'Carbon' - spec.version = '0.2.0' + spec.version = '0.3.0' spec.author = { 'ra1028' => 'r.fe51028.r@gmail.com' } spec.homepage = 'https://github.com/ra1028/Carbon' spec.documentation_url = 'https://ra1028.github.io/Carbon' @@ -9,7 +9,7 @@ Pod::Spec.new do |spec| spec.source_files = 'Sources/**/*.swift' spec.license = { :type => 'Apache 2.0', :file => 'LICENSE' } spec.requires_arc = true - spec.swift_version = '4.2' + spec.swift_versions = ['4.2', '5.0'] spec.ios.deployment_target = '10.0' spec.dependency 'DifferenceKit/Core', "~> 1.1" spec.ios.frameworks = 'UIKit' diff --git a/Gemfile b/Gemfile index d6d1149..9074cfb 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ source "https://rubygems.org" -gem 'cocoapods', '1.6.1' +gem 'cocoapods', '1.7.0.rc.1' gem 'jazzy', '0.9.4' diff --git a/Gemfile.lock b/Gemfile.lock index 3d15ae1..fa394b7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,11 +9,11 @@ GEM tzinfo (~> 1.1) atomos (0.1.3) claide (1.0.2) - cocoapods (1.6.1) + cocoapods (1.7.0.rc.1) activesupport (>= 4.0.2, < 5) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.6.1) - cocoapods-deintegrate (>= 1.0.2, < 2.0) + cocoapods-core (= 1.7.0.rc.1) + cocoapods-deintegrate (>= 1.0.3, < 2.0) cocoapods-downloader (>= 1.2.2, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-search (>= 1.0.0, < 2.0) @@ -27,12 +27,12 @@ GEM molinillo (~> 0.6.6) nap (~> 1.0) ruby-macho (~> 1.4) - xcodeproj (>= 1.8.1, < 2.0) - cocoapods-core (1.6.1) + xcodeproj (>= 1.8.2, < 2.0) + cocoapods-core (1.7.0.rc.1) activesupport (>= 4.0.2, < 6) fuzzy_match (~> 2.0.4) nap (~> 1.0) - cocoapods-deintegrate (1.0.3) + cocoapods-deintegrate (1.0.4) cocoapods-downloader (1.2.2) cocoapods-plugins (1.0.0) nap @@ -74,18 +74,18 @@ GEM redcarpet (3.4.0) rouge (3.3.0) ruby-macho (1.4.0) - sass (3.7.3) + sass (3.7.4) sass-listen (~> 4.0.0) sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - sqlite3 (1.4.0) + sqlite3 (1.4.1) thread_safe (0.3.6) tzinfo (1.2.5) thread_safe (~> 0.1) xcinvoke (0.3.0) liferaft (~> 0.0.6) - xcodeproj (1.8.1) + xcodeproj (1.9.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) @@ -96,7 +96,7 @@ PLATFORMS ruby DEPENDENCIES - cocoapods (= 1.6.1) + cocoapods (= 1.7.0.rc.1) jazzy (= 0.9.4) BUNDLED WITH diff --git a/Makefile b/Makefile index 100ed65..492f9d8 100644 --- a/Makefile +++ b/Makefile @@ -11,4 +11,4 @@ lib-lint: bundle exec pod lib lint pod-release: - bundle exec pod trunk push + bundle exec pod trunk push --allow-warnings diff --git a/README.md b/README.md index 3b99af6..5639656 100644 --- a/README.md +++ b/README.md @@ -17,16 +17,16 @@ in UITableView and UICollectionView.
++Made with ❤️ by Ryo Aoyama +
+ --- |Declarative|Component-Based|Non-Destructive| |:----------|:--------------|:--------------| |Provides a declarative design with power of diffing algorithm for building list UIs.|Declare component once, it can be reused regardless kind of the list element.|Solves the various problems by architecture and algorithm without destructing UIKit.| --Made with ❤️ by Ryo Aoyama -
- --- ## Introduction @@ -37,7 +37,7 @@ This make it painless to build and maintain the complex UIs. Uses [DifferenceKit](https://github.com/ra1028/DifferenceKit) which is highly optimized based on Paul Heckel's paper for diffing. Declarative design and diffing algorithm make your code more predictable, debugging easier and providing beautiful animations to users. -Our goal is similar to [IGListKit](https://github.com/Instagram/IGListKit) and [Epoxy](https://github.com/airbnb/epoxy), we respect those library as pioneers. +Our goal is similar to [Instagram/IGListKit](https://github.com/Instagram/IGListKit) and [airbnb/Epoxy](https://github.com/airbnb/epoxy), we respect those library as pioneers. --- @@ -75,7 +75,7 @@ renderer.render( #### Build for Development -```bash +```sh $ git clone https://github.com/ra1028/Carbon.git $ cd Carbon/ $ make setup @@ -134,7 +134,7 @@ ViewNode(HelloMessage(name: "Vincent")) `CellNode` is a node representing cell. Unlike in the ViewNode, this needs an `id` which `Hashable` type to identify from among a lot of cells. -The `id` is used to find the same component in the list data before and after changed, then calculate the following kind of diff. +The `id` is used to find the same component in the list data before and after changed, then calculate the all kind of diff. - deletes - inserts - moves @@ -154,7 +154,7 @@ CellNode(HelloMessage(name: "Jules")) `Section` has a header, a footer and a group of cells. A group of cells can be contains nil, then skipped rendering of it cell. -This also needs to specify `id` for identify from among multiple sections, then can be calculate the several kind of diff. +This also needs to specify `id` for identify from among multiple sections, then can be calculate the all kind of diff. - section deletes - section inserts - section moves @@ -246,6 +246,10 @@ renderer.render( ) ``` ++Made with ❤️ by Ryo Aoyama +
+-Made with ❤️ by Ryo Aoyama -
-Uses DifferenceKit which is highly optimized based on Paul Heckel’s paper for diffing.
Declarative design and diffing algorithm make your code more predictable, debugging easier and providing beautiful animations to users.
Our goal is similar to IGListKit and Epoxy, we respect those library as pioneers.
+Our goal is similar to Instagram/IGListKit and airbnb/Epoxy, we respect those library as pioneers.
CellNode
is a node representing cell.
Unlike in the ViewNode, this needs an id
which Hashable
type to identify from among a lot of cells.
-The id
is used to find the same component in the list data before and after changed, then calculate the following kind of diff.
id
is used to find the same component in the list data before and after changed, then calculate the all kind of diff.
Section
has a header, a footer and a group of cells.
A group of cells can be contains nil, then skipped rendering of it cell.
-This also needs to specify id
for identify from among multiple sections, then can be calculate the several kind of diff.
id
for identify from among multiple sections, then can be calculate the all kind of diff.
You can add methods of Delegate
, DataSource
by inheriting each adapter.
-Furthermore, it can be customized the class of the elements(cell/header/footer) which becomes the container of component by setting it to config
.
You can add methods of delegate
, dataSource
by subclassing each adapter.
class CustomTableViewdapter: UITableViewAdapter {
+ func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
+ return "Header title for section\(section)"
+ }
+}
+
+let renderer = Renderer(
+ adapter: CustomTableViewAdapter(),
+ updater: UITableViewUpdater()
+)
+
+
+Furthermore, it can be customized the class of the elements(cell/header/footer) which becomes the container of component by setting it to config
.
let config = UITableViewAdapter.Config(
+ cellClass: CustomCell.self,
+ headerViewClass: CustomHeaderView.self,
+ footerViewClass: CustomFooterView.self
+)
+let adapter = UITableViewAdapter(config: config)
+
Add the following to your Podfile
:
use_frameworks!
-
-target 'TargetName' do
- pod 'Carbon'
-end
+pod 'Carbon'
Carthage
diff --git a/scripts/install_swiftlint.sh b/scripts/install_swiftlint.sh
deleted file mode 100755
index 75cb143..0000000
--- a/scripts/install_swiftlint.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-set -e
-
-SWIFTLINT_PKG_PATH="/tmp/SwiftLint.pkg"
-SWIFTLINT_PKG_URL="https://github.com/realm/SwiftLint/releases/download/0.30.1/SwiftLint.pkg"
-
-wget --output-document=$SWIFTLINT_PKG_PATH $SWIFTLINT_PKG_URL
-
-if [ -f $SWIFTLINT_PKG_PATH ]; then
- echo "Installing SwiftLint package..."
- sudo installer -pkg $SWIFTLINT_PKG_PATH -target /
-else
- echo "Compiling SwiftLint from source..." &&
- git clone https://github.com/realm/SwiftLint.git /tmp/SwiftLint &&
- cd /tmp/SwiftLint &&
- git submodule update --init --recursive &&
- sudo make install
-fi
\ No newline at end of file