I am building a game in which there are lots of square blocks floating around the screen, bouncing off each other, walls, etc until they get destroyed.  Currently, I have a master UIGravityBehavior and I add each square (a UIView class called SquareView) as it's created, then remove it when it's destroyed. But I think I should be doing this inside the SquareView object.  Here's the relevant code:
class ViewController: UIViewController, UICollisionBehaviorDelegate  {
    var gravity: UIGravityBehavior!
...
// next sequence adds a square
let newSquare = SquareView()
newSquare.createSquare(touch.locationInView(view).x, y: touch.locationInView(view).y)
view.addSubview(newSquare)
gravity.addItem(newSquare)
...
// this removes a square
gravity.removeItem(currentSquare)
So I believe I should be moving this code outside of the ViewController into my definition of my SquareView class:
func createSquare(x: CGFloat, y: CGFloat){
    self.backgroundColor = color[touchCount]
    self.frame = CGRect(x: x, y: y, width: size[touchCount], height: size[touchCount])
}
Incidentally, I do the same thing with UICollisionBehavior and assume that's not optimal as well.
Any help would be great!