Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
MonoTouch.Dialog:
使用自定义OwnerDrawnElement,我使用自定义Draw()创建元素
选择元素时会触发 Draw()。
如何判断 Draw() 是否由于用户选择它而被触发,以便我可以更改 UI 以指示Select?
在自定义OwnerDrawnElement的这个方法中,检查 Highlighted 状态:
public override void Draw (RectangleF bounds, CGContext context, UIView view) { bool highlighted = this.GetActiveCell().Highlighted; if(highlighted) .... }