Skip to content

Releases: ra1028/Carbon

1.0.0 Release Candidate 6

30 Oct 06:22
57db8c9
Compare
Choose a tag to compare

Fix

  • Failed to link SwiftUI when launching app for iOS12 or lower (#63)

Breaking Chage

  • Drop support for Swift5.0 and Xcode10 (#63)

1.0.0 Release Candidate 5

23 Oct 08:58
d697d02
Compare
Choose a tag to compare

Enhancement

  • Add support for SwiftUI compatibility 🎉 (#58)
struct HelloMessage: Component, View {
    ...
}

struct ContentView: View {
    var body: some View {
        ScrollView {
            VStack {
                Text("GREET")
                    .font(.title)
                    .padding(.horizontal, 16)

                HelloMessage("World")
                    .frame(height: 60)
                    .background(Color.red)
            }
        }
    }
}
  • Add Group.init without elements (#50)

Breaking Changes

  • Add Component.intrinsicContentSize(for:) to get intrinsic content size for content to infer size of the UIView in SwiftUI (#58)

1.0.0 Release Candidate 4

13 Sep 07:28
Compare
Choose a tag to compare

Enhancement

  • Fix Package.swift (#49)

1.0.0 Release Candidate 3

11 Sep 20:18
94b684c
Compare
Choose a tag to compare

This version Carbon supports both Swift 5.0 and Swift 5.1.

Breaking Changes

  • Declarative syntax with function builder (#46)
  • Make isAnimationEnabledWhileScrolling set false by default (#47)
  • Make keepsContentOffset set true by default (#48)

1.0.0 Release Candidate 2

04 Sep 19:11
0cffa13
Compare
Choose a tag to compare

This version Carbon supports both Swift 5.0 and Swift 5.1.

Breaking Changes

  • Make Adapter.alwaysRenderVisibleComponents true by default. (#37)
  • Make Component.shouldContentUpdate returns false by default. (#37)
  • Constraints of type parameters Adapter in UITableViewUpdater is now changed to UITableViewAdapter. (#37)
- class CustomUpdater<A: Adapter & UITableViewDataSource & UITableViewDelegate>: UITableViewUpdater<A> {...}
  class CustomUpdater<A: UITableViewAdapter>: UITableViewUpdater<A> {...}
  • Constraints of type parameters Adapter in UICollectionViewUpdater is now changed to UICollectionViewAdapter. (#37)
- class CustomUpdater<A: Adapter & UICollectionViewDataSource & UICollectionViewDelegate>: UICollectionViewUpdater<A> {...}
  class CustomUpdater<A: UITableViewAdapter>: UITableViewUpdater<A> {...}
  • Adapter.skipReloadComponents is now obsolete. (#37)
  • Make referenceSize(in bounds:) returns nil by default. (#38)
  • Refactor method signature and responsibility of the UITableViewUpdater/UICollectionViewUpdater. (#40)
    You can now intercepts arbitrary processes before or after updates, for example:
- override func performDifferentialUpdates(target: UITableView, adapter: A, data: [Section], stagedChangeset: StagedDataChangeset, completion: (() -> Void)?) {
}
  super.performDifferentialUpdates(target: target, adapter: adapter, stagedChangeset: stagedDataChangeset)
open func performDifferentialUpdates(target: UITableView, adapter: Adapter, stagedChangeset: StagedDataChangeset) {
    super.performDifferentialUpdates(target: target, adapter: adapter, stagedChangeset: stagedDataChangeset)

    if stagedChangeset.allSatisfy({ $0.hasChanges }) {
        let y = target.contentSize.height - (target.bounds.height - target.adjustedContentInset.bottom)
        let contentOffset = CGPoint(x: target.contentOffset.x, y: y)
        setContentOffset(contentOffset, animated: true)
    }
}
  • Remove completion from Renderer. (#40)
- renderer.completion {
-     // do something
- }

  renderer.updater.completion {
      // do something
  }
  • Change constraints of type parameters Adapter of UITableViewReloadDataUpdater/UICollectionReloadDataViewUpdater to UITableViewAdapter/UICollectionViewAdapter. (#40)
  • Closure style render function and section initializer are now deprecated. (#42)

Enhancement

  • Adds support for Swift Package Manager (by @robcas3 #25)
  • UICollectionViewUpdater. renderVisibleComponents supports custom supplementary elements. (#37)
  • Add completion to UITableViewUpdater/UICollectionViewUpdater. (#40)

1.0.0 Release Candidate 1

29 Jul 17:36
70d345c
Compare
Choose a tag to compare

This version Carbon supports both Swift 5.0 and Swift 5.1.

Features

  • Add support for use custom container cell/header/footer class (#21)
  • Add closure style initializer for Section (#28)
  • Add a render function with closure style builder (#28)
  • Add completion closure property to Renderer (#28)

Breaking Changes

  • Remove UITableViewCellContent, UITableViewHeaderFooterViewContent, UICollectionViewCellContent and UICollectionReusableViewContent (#21)
  • Remove UITableViewAdapter.Config and UICollectionViewAdapter.Config (#21)
  • Remove the completion parameter from each render functions (#28)

0.3.0

13 May 17:59
571fdfa
Compare
Choose a tag to compare

This version Carbon supports both Swift 4.2 and Swift 5.

Features

  1. Add isAnimationEnabledWhileScrolling option for disable animation while scrolling (#17)
  2. Initializing Renderer without passing the target instance (#18)
let renderer = Renderer(
    adapter: UITableViewAdapter(),
    updater: UITableViewUpdater()
)

renderer.target = tableView

Deprecation

  1. Renderer.init(target:adapter:updater:) is now deprecated. Use Renderer.init(adapter:updater:) instead (#18)

0.2.0

28 Mar 14:42
a9a8d5e
Compare
Choose a tag to compare

This version Carbon supports both Swift 4.2 and Swift 5.

Xcode 10.2 Support

  1. Swift 5.0 and Xcode 10.2 support (#8)

Features

  1. Add new updater's option to keeping content offset after diffing updates (#9)

0.1.0 - Initial public release

12 Feb 10:34
Compare
Choose a tag to compare

Initial public release of Carbon 🚴