2
可能有人请解释我是如何创造一个UIButton
,让我在这篇文章中的MonoTouch的的MonoTouch的UIButton,UIPickerView和压倒一切的只读InputView
http://nomtek.com/tips-for-developers/working-with-pickers/
我都试过了基础,这将无法编译 -
public class CustomUIButton : UIButton
{
public CustomUIButton()
{
}
public CustomUIButton(RectangleF rect): base(rect)
{
}
public override UIView InputView
{
get
{
return base.InputView;
}
[ADDED] set { base.InputView = ""; }**
}
}
感谢
嗨@poupou,谢谢,我已经使用上面的代码并重写了CanBecomeFirstResponder为true;但我的UIPickerView仍然没有出现在按钮上,就像UITextField一样,有什么想法我失踪了? – WickedW 2013-02-14 13:48:20
好吧,它现在很好用,拼图的最后一块是在按钮TouchUpInside处理程序中设置button.BecomeFirstResponder。 – WickedW 2013-02-14 14:08:27