Reputation: 912
I'm looking for some general tips on how to solve a problem. Without going into too much detail on the app idea, the basics of it are as such: I want to create a graph with two axes that describe a timeline, with a few curves being plotted on the graph.
The timeline is essentially "infinite", while the curves are generated based on user input, so that the X-axis described the time and/or date, with the origin of the graph being the current time/date. The original concept was to have the graph act as a SlideView, such that the user could swipe through the graph as far into the future as they wanted.
I have very little experience with custom views and how they work, so I'm basically looking for advice on how this might be accomplished. An experienced iOS developer friend of mine thinks that an actual SlideView won't get the job done, due to the "infinite" nature of the graph and how I wouldn't be able to define the bounds of the SlideView. Once the SlideView was ruled out, I was considering something along the lines of Google Maps's "tile" approach, where new tiles are loaded as they needed, so some sort of lazy loading principle.
This seems like a workable approach, but I don't know how one might implement it... My friend pitched the idea of using a CollectionView, queuing and dequeuing new cells as needed. Anybody think this would work very well?
As I said, I am grossly unfamiliar with custom views, so I don't really know how I would generate a new cell's image. I've already planned out the graphing of the curves themselves, just plotting points and drawing lines between them. But might the axis be drawn in the same way?
This is a somewhat rambling question, but all I'm looking for is a bit of general guidance. Any tips of bits of wisdom would be greatly appreciated, thanks!
Upvotes: 0
Views: 622
Reputation: 27381
Consider using Core Plot. It's very flexible and can do what you need. Take a look at the included example apps for inspiration, especially the Plot Gallery.
Upvotes: 1