OGeek|极客世界-中国程序员成长平台

标题: c# - MonoTouch.Dialog - 响应 DetailDisclosureButton Taps [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-13 09:46
标题: c# - MonoTouch.Dialog - 响应 DetailDisclosureButton Taps

Element 类有一个 Tapped 事件,可用于响应元素的点击。

但是,当一个元素的附件设置为 DetailDisclosureButton 时,它似乎无法响应 DetailDisclosureButton 的点击。

使用MonoTouch.Dialog,我们如何响应DetailDisclosureButton点击?



Best Answer-推荐答案


现在看来,如果不编辑或 更好DialogViewController 继承,因为 UITableViewSource (或 UITableViewDelegate) 方法 AccessoryButtonTapped 不会被 MonoTouch.Dialog 本身覆盖。

要解决这个问题,您可以覆盖 DialogViewController.CreateSizingSource 以返回您自己的Source 覆盖 AccessoryButtonTapped.

IMO 这应该是 MonoTouch.Dialog 的一部分,因此欢迎您向 Miguel 发送 pull 请求(或者我稍后会自己做)。

更新 patch立即享受

关于c# - MonoTouch.Dialog - 响应 DetailDisclosureButton Taps,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8186831/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4