def update(params, grid = nil)
      # Doing all of the updates to the Rect in singleton for performance.
      # It would be better to be done inside an actual Rect instance, but that
      # would require creating a lot of temporary objects.
      # TODO performance and see if there is any real loss bringing
      # object_to_cg_rect into Rect instance
      #
      # If we did it that way, then we'd create a new instance, then appy the
      # rect instance to the frame or bounds, like so:
      # Rect.new(params, view, grid).apply_to_frame
      cg_rect = RubyMotionQuery::Rect.object_to_cg_rect(params, @view, self.to_cgrect, grid)

      @left = cg_rect.origin.x
      @top = cg_rect.origin.y
      @width = cg_rect.size.width
      @height = cg_rect.size.height
    end
def update(params, grid = nil)
      # Doing all of the updates to the Rect in singleton for performance.
      # It would be better to be done inside an actual Rect instance, but that
      # would require creating a lot of temporary objects.
      # TODO performance and see if there is any real loss bringing
      # object_to_cg_rect into Rect instance
      #
      # If we did it that way, then we'd create a new instance, then appy the
      # rect instance to the frame or bounds, like so:
      # Rect.new(params, view, grid).apply_to_frame
      cg_rect = RubyMotionQuery::Rect.object_to_cg_rect(params, @view, self.to_cgrect, grid)

      @left = cg_rect.origin.x
      @top = cg_rect.origin.y
      @width = cg_rect.size.width
      @height = cg_rect.size.height
    end
<< self