我正在使用 Tapku 库 ( https://github.com/devinross/tapkulibrary ) 中的日历视图并将其嵌入到 UIActionSheet - 现有 UIDatePicker 的替代方案。
我遇到的麻烦是当所选月份跨越 6 周时,底行没有从 中获取任何触摸touchesBegan
,而是在touchesEnded
和中获取它们touchesMoved
。
2013 年 5 月 - 5 周 http://imageshack.us/a/img62/6280/iossimulatorscreenshot2.png 2013 年 6 月 - 6 周 http://imageshack.us/a/img41/6280/iossimulatorscreenshot2.png 所以在上面的截图中从 6 月 30 日开始的行不会得到任何接触,除非它们起源于该行上方的某个位置,然后进入该行。
我认为边界或框架设置不正确,我尝试输出一些关于我在touchesEnded
最后一行收到的触摸的信息并得到:
$0 = 0x1f869670 <UITouch: 0x1f869670> phase: Ended tap count: 1
window: <_UIAlertOverlayWindow: 0x1e56b1e0; frame = (0 0; 320 568); layer = <UIWindowLayer: 0x1e56b300>>
view: <TKCalendarMonthTiles: 0x1f86b6d0;
frame = (0 1; 320 265); layer = <CALayer: 0x1f872fb0>>
location in window: {67, 551.5} previous location in window: {67, 550}
location in view: {67, 247.5} previous location in view: {67, 246}
目标视图的框架看起来是正确的,还有什么可能丢失?