1

I am trying to get my brain around what I can and can't reasonably do UI-wise in a multi-platform app. Initially we are only concerned about iOS and Android, but may need a mobile Windows version eventually.

The specific question is: How do I replicate the Android ExpandableListView functionality in iOS? I've tried a few searches, but haven't found a hint. The key I need is collapsible sections. Is that doable with an iOS listview? If so, do you have/know of an example?

The related non-specific question is: What advice do you have for someone just starting out developing in multimobilemono? I've been working from Greg Shackles' excellent book, "Mobile Development in C#" (which has been wildly helpful!), so I've got some basics. But I'm sure there are some hidden landmines when you get into more complex UI design. Any advice would be greatly appreciated.

Thank you!

Karen Cate
  • 272
  • 3
  • 15

2 Answers2

1

You can use the UITableView, and merely change the size of your cell to display more content as needed.

Let us discuss DialogViewController (part of MonoTouch.Dialog) which simplifies the setup of a UITableView.

What you could do is create a UIView that contains both the content, and the expanded content. It would be controller with some property, for example:

  bool expanded;
  public bool Expanded { get { return expanded; }}
       set { 
          if (expanded == value)
               return;
          Frame = ComputeSize (value);
          expanded = value;
       }
  }

Then, create a UIViewElement:

new RootElement ("My Root") {
    new Section () {
        new UIViewElement (new MyView ());
    }
}
miguel.de.icaza
  • 32,654
  • 6
  • 58
  • 76
-1

For your first question, perhaps you could try : https://github.com/OliverLetterer/SLExpandableTableView

  • Thank you for the suggestion. I'm developing using the Xamarin (MonoTouch) toolkit, so objective C components are difficult to incorporate. It might help someone else, though! – Karen Cate May 26 '15 at 21:19