I’d like to be able to draw a graph using just the Apple Framework.
Is this possible using just CoreGraphics, or do I need to use any other framework?
I don’t want to use any third party framework for drawing the graph.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, of course it is possible. A graph like that is just a line. You can use a UIBezierPath or CGPath to draw this. Typically you’d have an array of the points on your graph, then just add lines to each point when building your path.
WWDC 2011 session 129 goes through how the graph in the Stocks app is drawn and made “fancy”, all using core graphics.