I'm developing an app using version 100.2.1 of the ArcGIS iOS SDK. From my testing using simple (non-custom) callouts, it appears that the callout can only display static data while the callout is being shown. Is there a way to have a callout display real-time data that changes while the callout is open, for either non-custom or custom callouts?
For example, suppose a user taps on a stock symbol, causing a callout to open. The callout displays a stock's current price, and the price changes while the callout is open. It would be great if the user could see the new price and not worry that the information is stale. Can the callout be made to update its display to reflect the changing stock price in this scenario?
Solved! Go to Solution.
Hello Michael,
There are several different ways you could accomplish this. You could do so via the built-in callout's customView (which is essentially just a UIView), or just roll your own view (and optionally view controller). For example, we use a "bottom sheet" UIView which we animate on, up, and down the screen, while dynamically updating data as it changes via notification handler methods in the map view controller (though, we could just as easily have embedded another view controller in a container view, or presented another view controller over the map view controller context).
It is my experience that customers typically end up wanting more and more functionality that tends to push the bounds of basic classes like the AGSCallout. I recommend taking the only slightly greater effort (in the short-run) to create a custom view that gives you exactly what you need.
If you're interested, I'm happy to show you some sample code.
Cheers,
Jake
Hello Michael,
There are several different ways you could accomplish this. You could do so via the built-in callout's customView (which is essentially just a UIView), or just roll your own view (and optionally view controller). For example, we use a "bottom sheet" UIView which we animate on, up, and down the screen, while dynamically updating data as it changes via notification handler methods in the map view controller (though, we could just as easily have embedded another view controller in a container view, or presented another view controller over the map view controller context).
It is my experience that customers typically end up wanting more and more functionality that tends to push the bounds of basic classes like the AGSCallout. I recommend taking the only slightly greater effort (in the short-run) to create a custom view that gives you exactly what you need.
If you're interested, I'm happy to show you some sample code.
Cheers,
Jake
Hi Jake,
Thanks for your reply! Yes, if you could send me some sample code, that
would be extremely helpful.
Best regards,
Michael