Choose between joystick and gyro

Hello everyone,

I am creating mobile game and I want player to be able to choose in options menu between joystick or gyro (motion) mode. Obviously when choosing gyro mode, joystick should be removed and when choosing joystick motion controls (tilt and gravity) should be disabled with joystick appearing.
What is the way to do this?