Draw in View from Controller

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

  1. i.yalovecky macrumors member

    Joined:
    Feb 24, 2010
    #1
    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 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    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

    Joined:
    Feb 24, 2010
    #3

Share This Page