I would suggest do not change the position of buttons rather what you can do is change the currentTitle property of the buttons randomly and once the user clicks the button ; you can get the currentTitle of the button and check if it is the correct answer or not.