0

I am following a code only approach for my Xamarin iOS app and can see how you can easily create control such as UILabel and UITextField in ViewDidLoad of a Controller. That is also where I can apply MVVMCross Fluent Binding.

I have seen Stuart's n19 where he creates a custom Circle View and one that creates a Custom Label.

  • The custom circle overrides the Draw method and draws a circle (Owner Draw)
  • The custom labels changes the Forecolor of the existing Label (Subclassed)

I don't feel that either of those works for me. I want to create a UIView that is made up of other controls, a composite control. Imagine a control that looked something like this. That would be an ImageView, and 4 labels with one of them clickable.

enter image description here

At what point in the life of the UIView would I create something like that. Is there an equivalent of ViewDidLoad?

3
  • Maybe try slodge.blogspot.co.uk/2013/06/… Commented Jan 11, 2015 at 15:39
  • Thanks Stuart, bang on as ever Commented Jan 12, 2015 at 11:49
  • @Stuart at 21m35s in N32 you say that MvxView is a quick and useful alternative to building a UserControl. Is there a UserControl alternative for Xamarin iOS? Commented Jan 12, 2015 at 17:33

1 Answer 1

1

As Stuart said in his comment, N=32 - ViewModels and MvxView on the iPad - N+1 days of MvvmCross is the MVVMCross tutorial you want.

For those that are happy with the idea of ViewModels being more than just a ViewModel per screen and understand Binding the bit around Custom Views starts at minute 20

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.