V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
acumen
V2EX  ›  iDev

iOS11 适配发现一个问题

  •  
  •   acumen ·
    acumen1005 · 2017-10-10 19:39:38 +08:00 · 5298 次点击
    这是一个创建于 2361 天前的主题,其中的信息可能已经有所发展或是发生改变。

    本来在 iOS11 之前 UITableViewCell 中的 UITextView 就不能 点击穿透 (在点击 UITextView 时 UITableView 的 didselected 的代理方法不能触发)。然后我们发现在 Cell 上加一个 Tap 手势自己来管理这个 Cell 的点击事件可以绕过 不能点击穿透 的坑。效果还不错。
    问题来了,在 iOS11 之后发现这个 Tap 手势时间也被 UITextView 阻断了。深深感到之前的曲线救国是个坑。

    随便问一下大佬们,有没有比较优秀的解决方案。

    尝试过:

    1. point(inside:) 的事件响应链的方法,发现模拟不出 upinside 这样的事件状态, point(inside:) 方法在用户 touch 到 UITextView 的时候就直接触发了,体验不是很好!
    第 1 条附言  ·  2017-12-05 16:43:44 +08:00
    https://acumen1005.github.io/2017/11/21/adout-uitextview.html

    算是解决了,如果有更好的方案,欢迎评论
    3 条回复    2017-10-10 23:30:23 +08:00
    tpphha
        1
    tpphha  
       2017-10-10 20:38:00 +08:00
    在 UITextView 上面添加 tap 手势
    acumen
        2
    acumen  
    OP
       2017-10-10 20:54:24 +08:00 via iPhone
    @tpphha 目前我也想到这个,只是在项目 UITextView 比较多,工作量比较大。
    eminemcola
        3
    eminemcola  
       2017-10-10 23:30:23 +08:00 via Android
    @acumen extension textview
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1409 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 23:46 · PVG 07:46 · LAX 16:46 · JFK 19:46
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.