Change from CALayer to UIView and from .position to CGAffineTransformMakeTranslation for moving square