Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MvvmCross and Xcode Storyboard

The storyboard xcode are supported in mvvmcross v3?

If yes, how? There is an example?  

Thanks

like image 334
user2283924 Avatar asked May 01 '13 17:05

user2283924


1 Answers

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

like image 145
Stuart Avatar answered Oct 03 '22 17:10

Stuart