adjust update switch rect when view appear