How to enable pointer interaction in the Identity inspector

I am wondering if there is a way to enable pointer interaction in the IB's Identity inspector? For a UIButton, I can see an option to enable user interaction but not pointer interaction. Is pointer interaction implicitely enabled through some of the other options? It would also be great to have pointer interaction enabled by default in the future.


I am currently using Xcode 11.5 GM Seed (11E608c).

Accepted Reply

In the Attributes inspector in Xcode 11.5, I just noticed the option to enable Pointer Interaction for a UIButton. The checkbox can be found underneath the button's "Default Symbol Configuration". I must have missed it before.

Replies

There is nothing specific in IB.

Just enable user interaction.


Then you handle pointer in code, by adding pointer interaction to some views (as a button) in viewDidLoad:

https://developer.apple.com/documentation/uikit/pointer_interactions


Maybe they could do similar to gestures, but I have not seen so far.


Could file an enhancement request.

Thanks for the quick reply.

If you get it to work, don't forget to close the thread. Good luck.

In the Attributes inspector in Xcode 11.5, I just noticed the option to enable Pointer Interaction for a UIButton. The checkbox can be found underneath the button's "Default Symbol Configuration". I must have missed it before.