Daniel Z.
Daniel Z.

Reputation: 324

MVVMCROSS ShowViewModel-Navigation Inherited Class

Is there a way to do ShoViewModel-Navigation with own inherited classes with mvvmcross? For example:

public class myviewcontroller:MvxViewController

Inherited ViewController:

public class myInheritedViewController:myviewcontroller

Problem is similiar to: MVVMCROSS Ios Binding ShowViewModel but base.viewdidload() won't solve the problem here.

Upvotes: 0

Views: 285

Answers (1)

Stuart
Stuart

Reputation: 66882

You can adapt any ViewController base class to allow binding by inheriting from it to provide the MvvmCross data-binding extensions.

For example, see how UIViewController itself is adapted in 2 layers of inheritance:

There's more on this in a few other questions here on StackOverflow - e.g. see Integrating third party controller with MVVMCross on MonoTouch

Upvotes: 1

Related Questions