Hide button does not disable headgaze!
nbawe opened this issue · comments
Hello!
When hiding button:
myButton.isHidden = true
HeadGaze still recognizes touch.
How to overcome this?
Solved with constraints! The problem was in the button frame size!
Setting isHidden
to true
does not stop the sensor from tracking your head motion which is not power efficient. The GIF demo shows that it is possible to disable the head tracking, hence all the UI widgets fall back to the conventional. It is achieved by temporarily removing the member variable virtualCursorView
from the superview of type UIHeadGazeViewController
. Example code can be found in the code block here