Draw in View from Controller

Discussion in 'iOS Programming' started by i.yalovecky, Mar 29, 2010.

  1. i.yalovecky macrumors member

    Feb 24, 2010
    I started to create app that tests my geometrical function, so i make all calculation in Controller and need to draw some lines into view and i really don't want to subclass it. How can i do it? thanks.
  2. PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    The right way to do this is to subclass UIView and draw in its drawRect method.

    If you really don't want to do that for some reason you could draw into an image and use an image view to display the image.
  3. b0yax macrumors newbie

    Feb 24, 2010

Share This Page