Question for beginners - do I have to separate my class into different classes?

advertisements

i have a UIViewController class that do the following:

  1. detect movement.

  2. array a bunch of images and do some orders manipulation.

  3. insert images to the view.

  4. animate some images.

    • btw there are a lot of objects in the class (60).

do i need to separate some of this steps to different classes ? if so why and to which class type.

tia.


I feel this is somewhat subjective, but personally I'd separate them as follows:

MODEL:

  • array a bunch of images and do some orders manipulation.

VIEW:

  • detect movement. (but only tell the controller, controller should react to the movement)
  • animate some images.

CONTROLLER:

  • insert images to the view.