TableView within a Custom Callout

1032
3
Jump to solution
03-13-2012 10:17 AM
DonSusini
New Contributor II
I've created a custom callout view that shows when the map is clicked.  I've populated an array of graphics (features) that were under that click, and would like to show them in a small, manicured TableView within the callout.  I'm having trouble getting the table view to even show.  I've tested my table view outside of the callout, so I know it works.  Once it's thrown into the callout, it will not show.

I've found that I can show other components within the callout: picker, date picker, a list of buttons, etc.  But, for some reason the table view won't show.  It also looks like the map view takes input precedent over any items within the callout (except buttons).  So, it would appear that scrolling a picker or table view within the callout would be out of the question (the map would scroll instead).

Ideally, I'd like the user to click the map, see a list of objects under their finger, click the object they actually wanted to select, highlight that graphic on the map, then allow them to click an accessory button to proceed with the workflow.

Any ideas?


Sorry for my long-winded post 😞
0 Kudos
1 Solution

Accepted Solutions
DonSusini
New Contributor II
Ok, so I think I figured out the issue I was having.  When creating the custom view for the callout in Xcode, I had fit everything into the width I wanted the callout to be (about 200px wide to be exact).  This worked fine for buttons, text and everything else; but for the table view, it was being scaled down to nothing.  Once I stretched the table view to take up the entire view, everything looked correct inside the callout.  Whatever the default scaling settings of the table view were, they were messing up its final size.

All looks good now :cool:

View solution in original post

0 Kudos
3 Replies
DonSusini
New Contributor II
Ok, so I think I figured out the issue I was having.  When creating the custom view for the callout in Xcode, I had fit everything into the width I wanted the callout to be (about 200px wide to be exact).  This worked fine for buttons, text and everything else; but for the table view, it was being scaled down to nothing.  Once I stretched the table view to take up the entire view, everything looked correct inside the callout.  Whatever the default scaling settings of the table view were, they were messing up its final size.

All looks good now :cool:
0 Kudos
BernardNtiamoah
New Contributor
Hi, I am trying to do something similar to what you've done. Can you share your callout code please?
0 Kudos
EktaAgrawal
New Contributor
Hi I am also trying to create something similar, I have a custom callout view which has a tableview. On clicking the pin, table view shows up but I cannot scroll the tableView. How did you get your tableView scrolling? Appreciate your help

Thanks
Ekta
0 Kudos