Simple solution for interface issue

a tableVIew with content hidden behind the button

While developing this screen, which has a fixed button on the bottom as is standard throughout the app, I realised that the user might have a problem with the interface: the button is disabled by default, as it’s subject to agreeing with the terms of use — but the terms of use UISwitch, in this case, lies sneakily hidden under the button.

The user might then think that the app simply doesn’t work. Yikes!

After giving it some thought, I decided to change the button disabled behaviour for something that only seemed disabled but then could still listen to the tap gesture and react accordingly:

After setting the “fake disabled” implementation, now I check if the terms of use switch is checked and add an action to the button accordingly.

If the switch is off, it scrolls down to the TableFooterView in order to present the hidden switch. Otherwise it proceeds as expected.

The result is a simple and elegant animation presenting the entire footer.

Took me around 2 minutes to implement, but close to 10 minutes deciding about the approach.
Code often happens more inside the head than on the tip of the fingers.