set fromViewController when switching index