support resize and updateUI