4

After a long time I have returned to this problem, but I have now completely rephrased the question with a (hopefully) better example.

I have an iOS splitview app with accounts and contacts. Each account can have multiple contacts. On the master view I show a list of accounts and on the detail view I display a DialogView with data like account number and address for the selected account. One row in the DialogView is called "Contacts" and when you press it I want to show a UIPopover with a list of all the account's contacts.

But where do I create the popover?

My thinking is to let the view call on its ViewModel like AccountViewModel.ShowContactsCommand()The ViewModel then calls ShowViewModel<ContactListViewModel>()and let the Presenter create the UIPopover.

But to create a UIPopover you need to give it a UIView for the arrow. The present has no knowledge of this.

Another alternative would be to create the popover from the view. It doesn't feel right, but I would then have access to the UIView that I need. I also don't know how to create the new ContactListView from here (the presenter usually do this task).

Decept
  • 87
  • 5
  • Where are you failing? Is it showing the UIPopoverController? Or showing the DialogViewController? Or some combination of the two? Or somewhere else? If it's just `how to create and show the popover.` then this might help - http://forums.xamarin.com/discussion/2728/monotouch-dialog-in-uipopover - if it's something more, then maybe include the code you've made so far or the problem/error you've hit. – Stuart Mar 10 '14 at 21:36
  • I changed my question a bit, it was poorly formulated, sorry. – Decept Mar 11 '14 at 12:02
  • I changed the question again with a better example – Decept Jan 14 '15 at 10:34
  • @Stuart the only problem we facing is while showing the popover is the arrow that comes with the popover. Everything else is working fine. – SARATH SASI Jun 16 '17 at 12:54

0 Answers0