updated rotate iOS code