MvvmCross and Xcode Storyboard
Asked Answered
C

2

6

The storyboard xcode are supported in mvvmcross v3?

If yes, how? There is an example?  

Thanks

Cultch answered 1/5, 2013 at 17:8 Comment(0)
Q
3

MvvmCross doesn't really fit that well with Storyboards

The reason is because Storyboards have some logic in them (eg Segue navigation) which really belongs inside actions in the MvvmCross ViewModels.

With that said... if you just want to take advantage of data-binding then you can... just:

  • add the MvvmCross assembly references
  • modify your Storyboard app so it runs some minimal setup code
  • use the Mvx*ViewController base classes instead of the UI*ViewController classes
  • and similarly use MvxTableViewCell (or similar) for the base class for any TableViewCell's you use.

There's no documentation around for this at the moment... but there is one sample - posted under the very odd title of 'eh' - https://github.com/slodge/eh - it's just a simple master-detail pair of views and it needs to be built against recent binaries - e.g from https://github.com/slodge/MvvmCross-Binaries/tree/master/XS-iOS-Mac

Qp answered 1/5, 2013 at 17:24 Comment(1)
Solved! It works very well. Thank you very much. The framework is really nice.Cultch
T
2

Not sure if this is really the SO way but Stuart and others have a better answer IMHO to this question when it was asked at a later date. See the answers to this question MVVMCross support for Xamarin.iOS Storyboards

I am answering here just to tie up the Q&A

UPDATE MVVMCross 3.5.1 Now has a FromStoryboard attribute so that you can have some views which are Storyboard based. See http://slodge.blogspot.co.uk/2015/05/351-release.html

Thanks

Pat

Tricotine answered 17/12, 2014 at 10:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.