xamarin.ios - Integrating third party controller with MVVMCross on MonoTouch -


i want use third party view controller inherits uiviewcontroller (https://bitbucket.org/thedillonb/monotouch.slideoutnavigation/src/f4e51488598b/monotouch.slideoutnavigation?at=master), how integrate mvvmcross?

i take source , change inherit mvxviewcontroller, guessing run other libraries.

do need implement interfaces mvxviewcontroller does? imvxtouchview? imvxeventsourceviewcontroller?

for particular case, don't want data-binding can use custom presenter - e.g. see @blounty's answer, or see project demo - https://github.com/fcaico/mvxslidingpanels.touch


if ever need convert third party viewcontroller base classes support data-binding, easiest way guessed:

  • inherit them provide eventsource-viewcontroller
  • inherit eventsource-viewcontroller add mvx bindingcontext

this technique how mvvmcross extends each of uiviewcontroller, uitableviewcontroller, uitabbarcontroller, etc in order provide data-binding.

for example, see:

note because c# doesn't have multiple-inhertiance or true mixin support, adaption of viewcontrollers involve little cut-and-paste, have tried minimise through use of event hooks , extension methods.

if helps, ios technique previous mvvmcross version discussed in integrating google mobile analytics mvvmcross (obviously out of date - general principles kind of remain same - adapt existing viewcontroller via inheritance)

in android, similar process followed activity base classes - see actionbarsherlock latest mvvmcross


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -