iOS Today扩展表视图行仅检测标签上的点击 [英] iOS Today Extension Table View Rows only detects taps on a label

查看:91
本文介绍了iOS Today扩展表视图行仅检测标签上的点击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在iOS上的今日小部件上遇到了最奇怪的问题.

我有一个具有如下表格视图的简单小部件: https://grab.edr.io/2e557aa43a34b7460b1eac44cbcaf596.png a>

问题是,当我点击其中一个标签时,它仅对触摸(行仅被突出显示)做出响应,而对行的其余部分(空白)不做出响应.

这在设备和模拟器上都会发生.

我正在使用tableView:didSelectRowAtIndexPath:检测触摸,因此无法在其中看到问题.

这是我的故事板的屏幕截图: https://grab.edr.io/c2dc09db20ded2b471dc94ea339141b8.png

任何帮助或想法将不胜感激!

谢谢.

解决方案

从Apple开发人员支持处获得答案.

这是一个iOS 8错误.

一种解决方法是将窗口小部件的不透明度设置为0.01.

I am having the weirdest of problems with a today widget on iOS.

I have a simple widget with a table view like this: https://grab.edr.io/2e557aa43a34b7460b1eac44cbcaf596.png

The thing is, it only responds to touches (the rows only get highlighted) when I tap one of the labels, and not the rest of the row (which is blank).

This happens on both device and simulator.

I am detecting touches using tableView:didSelectRowAtIndexPath:, so I am not being able to see a problem there.

Here is a screenshot of my storyboard: https://grab.edr.io/c2dc09db20ded2b471dc94ea339141b8.png

Any help or idea would be greatly appreciated!

Thanks.

解决方案

Got an answer back from Apple's Developer Support.

It's an iOS 8 bug.

A workaround for it is to set the opacity of the widget to 0.01.

这篇关于iOS Today扩展表视图行仅检测标签上的点击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆