Adrian Krzyżowski Adrian Krzyżowski - 1 month ago 17
iOS Question

SWIFT: Clear textview using button of external device connected via headphone jack

Is there any way to clear texView's text by clicking the button of, for example, selfie stick or +/- iPhone's volume button? I'm going to write an application that calculates total and partial trip. After clicking an external button, I want the partial trip to be reseted.

If it's possible, please tell me, which library should I use. Thanks!

Answer

As I found out, it's not possible - through external device's button we are able to access only +/- phone's volume button (which is also responsible, for example, for taking pictures if camera application is launched) but no any other self-implemented functions.