Code Monkey home page Code Monkey logo

objc-graphplotter-part1's Introduction

objc-GraphPlotter: Part I

Objective

More practice with Core Graphics

Instructions

Draw a line on a view that has the following array of coordinates:

(-1,0)
(-5,2)
(4,-2)
(10,-1)
(-2,-2)
(-1,-1)
(10,-5)
(5,5)
(5,6)
(-6,1)

Requirements:

  1. Let's start by considering the center of your UIView the "origin" of the graph.

  2. Make sure all points are on screen.

  3. Make sure that your line is drawn without turning back on itself (like a graph!) and also as a rule we'll draw coordinates that have the same X value from lower Y value to higher Y value.

  4. Make the color and width of the line able to be changed by the user of your view class without them having to inspect the implementation code in detail.

  5. Make it possible for the user to add more lines to the view using an NSArray of lines.

  6. Add a graph background gradient. Make the colors also easily changed by the user. Ideally, make them updateable from the Storyboard Attributes Inspector and the gradient render in your storyboard.

Here is what your output should look like when you are finished:

Resources

If you need a reminder on how to make objects IBInspectable and views IB_DESIGNABLE, check out an article.

Hints

  • Helper methods might be useful to create to save you some time with repetitive tasks!

  • Don't forget to release references you create yourself!

objc-graphplotter-part1's People

Contributors

fislabstest avatar zdrossman avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.