Post

Replies

Boosts

Views

Activity

Touch on transparent points of custom keyboard extension are ignored
Inside a custom keyboard extension, I'm experiencing the following problem: touches on transparent points are completely ignored. As per documentation of the hitTest method, a view is ignored if its alpha is less than 0.01. However, in my case the view alpha is 1, it's just that its background color is set to clear. In my specific case I have a simple collection (similar to the emoji collection of the iOS keyboard) and if I tap/drag putting my finger on top of cells it all works well. However, if I drag from an empty space of the collection the touch is completely ignored. A simple workaround I adopted for now is to set the backgroundColor to white with a very low alpha. With this simple change the touch is recognized. In the end, it's like in the custom keyboard extension a touch on a transparent point is completely ignored, even if the touch falls into a view which alpha is not 0. Do you have any suggestions on why it's behaving like that?
0
2
407
Mar ’22
How to check if the selected asset is not available because my app has been put in restricted mode
Hello there 👋 I'm trying to use the new PHPickerViewController and I have a question: how can I detect if my app has been put in restricted mode and the user opens the picker to select an image that my app hasn't access to? To clarify: I know how to detect if I my app is limited mode, I would like to know if the selected image is not available. The point is that I use the picker in order to retrieve the corresponding PHAsset and if my user selects in the picker a photo for which I can't retrieve the corresponding PHAsset because my app doesn't have the permission, I would like to warn him about what's going on. Thanks in advance 🙏
3
0
1.3k
Aug ’20