6

The storyboard xcode are supported in mvvmcross v3?

If yes, how? There is an example?  

Thanks

Stuart
  • 66,722
  • 7
  • 114
  • 165
user2283924
  • 61
  • 1
  • 2

2 Answers2

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

Stuart
  • 66,722
  • 7
  • 114
  • 165
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

Community
  • 1
  • 1
Pat Long - Munkii Yebee
  • 3,592
  • 2
  • 34
  • 68