Skip to content

Latest commit

 

History

History
38 lines (23 loc) · 1.45 KB

File metadata and controls

38 lines (23 loc) · 1.45 KB

MvvmCross UIStackView for iOS

UIStackView that can have a list of ViewModels bound such that Views can be dynamically added and removed from the ViewModel layer.

Setup

Usage

Bind to the source with a collection of MvxViewModels

set.Bind(MvxStackView).For(stackView => stackView.ItemsSource).To(vm => vm.Sections);

In order for this work each ViewModel must have an associated View through MvvmCross.

To provide a custom or wrapper view override GetView and return your view.

protected virtual UIView GetView(UIViewController controller)

Hooks are available to perform custom actions before/after adding and removing of views. These can be used to perform animations for example.

protected virtual void OnBeforeAdd(UIView view){}
protected virtual void OnAfterAdd(UIView view){}
protected virtual void OnBeforeRemove(UIView view){}
protected virtual void OnAfterRemove(UIView view){}

Contributions

Contributions are welcome! If you find a bug please report it and if you want a feature please report it.

If you want to contribute code please file an issue and create a branch off of the current dev branch and file a pull request.

License

Under MIT, see LICENSE file.