This version contains important breaking changes. Especially, ComponentDisplayable
needing
a ComponentController
must implement Wrapped
. If you don't and ViewController is created from Storyboard/Xib,
then it won't get a reference to ViewModel.
- [Controller] Added
SceneController
protocol.
- [View]
ComponentDisplayable
is a specialization ofDisplayable
. Replacebindings(_:viewModel:)
withbindings(_:params viewModel:)
in your code. - [View] Renamed
Displayable.Props
asDisplayable.Parameters
. Replacebindings(_:props:)
withbindings(_:params:)
in your code. - [Controller] To use
ComponentController
, your view needs to conform toWrapper
!
- [Controller] Removed
ComponentRouter
.
- [View] Added
Wrapped
protocol.
- [Controller]
observer
is instantiated before callingdidLoadComponent
- [View] Deprecated
componentControllerClass
. Replaced byWrapped
protocol. - [Container] when binding viewmodels, adjacent controller is created only if implementing
Wrapped
protocol.
- Support for Swift4
- [Component] Added
Displayable
protocol.
- [Component] Protocol
ComponentView
has been renamedComponentDisplayable
. - [Table] All DataSource/Delegate methods from UITableView/UICollectionView are marked open inside
CollectionViewAdapter
andTableViewAdapter
.
- [Observer]
ViewObserver
is a dedicated class. - [Collection] Replaced data sources with one unique
DataSource
protocol. - [Collection] Removed template system. Just use regular register(cell) method from tableview/collectionview.
- [Component] fixed
ComponentView.componentControllerClass
not called when creating component.
- [Component] Added
anyViewModel()
getter onComponentController
. - [Command] Allowed
AsyncCommand.completed
closure to escape.
- [Component] Removed
ComponentViewController
. Replace it withUIViewController, ComponentController
. - [View]
ComponentView.bindings(_:viewModel:)
is now generic.
- Swift 3 support. - viteinfinite
- Moved Bond dependency into a subspec (still included by default).
Command
now expects data instead than the control itself.
- Fixed some mispelled delegate methods of
UICollectionViewDelegate
.
- [View] You can access
componentLifecycle
fromComponentView
. - [Collection] You can now reload a row/section. Just make your
ComponentViewModel
conform to newUpdatable
protocol. - [ViewModel] Added
router
property onComponentViewModel
. Use it to navigate btw your controllers. - [Command] Added
AsyncCommand
.
- [Binding] Simplified internal code, which should be easier to understand.
- [ViewModel] Replaced
ComponentItemViewModel
withSelectable
andUnselectable
.
- [View] Fixed
componentControllerClass
could not be overriden. - [Command] Fixed
updateCanExecute
not called into init
TL;DR Drastically simplified DataSource protocols for UITableView and UICollectionView.
Now you only have DataSource*
protocols to use.
- [Wrapper] added method
convert(_: (Element -> NewElement))
for simple conversions.
- [Controller] Changed method
didLoad
todidLoadComponent
. Additionally this method is called every time the ViewModel is setted. - [DataSource] Removed
ComponentCollectionView
andComponentTableView
. - [DataSource] Removed
ComponentCollectionViewModel
. Methods moved toDataSource
. - [DataSource] Removed
DataType
typealias
- [Controller] Fixed a crash with lifecycle when not allocated
TL;DR Support binding with CollectionView was added. Some important features are missing and will be added in beta 3. API is globally stable but some changes might happen in further betas.
- [Collection] Support for CollectionView binding.
- [Template] Support for template coming from storyboard. You can now use enum
Nib(nib)
,StoryboardId(id)
orFile()
to load a template from a source.
- [DataSource]
ItemIdentifier
andSectionIdentifier
now need to conform toRawStringRepresentable
instead ofRawStringRepresentable
. Just addRawStringRepresentable
to your String enum declaration to make it automatically conform to the protocol. - [Layout] Uniformized
UICollectionView
andUITableView
by adding alayout
attribute to the later one. - [DataSource] Changed signature of method
tableViewSectionTemplate
. - [Layout] Renamed
CollectionLayout
andCollectionAutoLayout
asTableViewLayout
andTableViewFlowLayout
. - [Observer] Allow to return an attribute of an observed property to bind with. Use
observe(observable:attribute:)
method. - [Converter] Allow to use a
Converter
expectingA
with aOptional<A>
. - [Framework] Added Carthage support - viteinfinite #PR8
- [Doc] Documentation was improved - viteinfinite #PR10 #PR11
- [Layout] Fixed
TemplateView
init not marked as public. - [Component] Fixed crash with optional lifecycle.
- [DataSource] Fixed
DataType
not marked as implicitly unwrapped optional.
TL;DR Support for binding with TableView was added. Some important features are missing and will be added in beta 2.
- [Collection] DataSource protocol for table views. It is very similar to the one provided by Apple while emphasis it
- [Collection] View Models protocols to interact with a collection dataset.
- [Collection] TableView templates to register
ComponentViewModel
instances onUITableView
- [Collection] TableView layout system
- [Binding] Added
bindTo
on optionalCommand
- Renamed
ViewModel
asComponentViewModel
for consistency with other related protocols (ComponentView
andComponentController
)
Akane is now compatible with Xcode 7.1+.
- All protocols were re-written in Swift
- ViewComponent was renamed ComponentView
- Presenter was renamed ComponentController
0.12.0 requires iOS8+ and Swift 2.0+.
Also note that due to a bug into Cocoapods 0.39, Akane is not compatible with Xcode 7.1+.
- "Native" binding. Use the new method
bindings:viewModel
fromViewComponent
protocol. - Command pattern support to communicate between View and ViewModel. Use
RelayCommand
or a custom one withCommand
protocol. - Binding converters.
- Removed deprecated methods. Some are still available and will be removed in future beta releases.
- Made Akane compatible with Swift only.