I have a `UIWebView` which shows static content and reacts to various swipe gestures through its controller. 

The text selection has been disabled but now I am working on a new feature to allow text selection and present a custom context menu. 

Now I need to be able to detect when the text selection is active so that I can turn off the swipe gestures. 

The only method I can think of is to check if there is selected text using JS in the swipe handler methods. Any other ideas? Does anybody know how to do this better? 

Thanks.