UITableView in Today Extension not accepting row taps

I have an iOS 8 app with the Today extension. The extension has a UITableView in it and it displays correctly. However, didSelectRowAtIndexPath does not seem to be reliably called. I assume this is due to the fact that the Notification Center is a UIScrollView and embeds the UITableView in those that cause some problems, but I'm not sure.

Does anyone know what might cause this problem?

+5
source share
3 answers

Workaround: Set the opacity to 0.01 as follows:

self.view.backgroundColor = [UIColor colorWithWhite:1 alpha:0.01]; 
+2
source

This worked for me in Swift 2.1 / iOS 9.1:

 self.view.backgroundColor = UIColor(red: (255.0/255.0), green: (255.0/255.0), blue: (255.0/255.0), alpha: 0.01) 
+1
source

I had a UITableView in extension. The height of the extension view was determined by the height constraint. Cells responded to taps only sporadically.

To solve this problem, preferredContentSize was set instead of using a constraint.

0
source

Source: https://habr.com/ru/post/1204457/


All Articles