开发者

UIPickerViewModel.GetView in MonoTouch - how to use it?

I'm trying to get hold of the current 'middle' row as a UIPickerView is spinning. I am trying out the t开发者_Python百科echnique from this question here: UIPickerView: Get row value while spinning?

However, I'm not really sure how to use this override in MonoTouch - I can't call the base, as it's not implemented, and I the fourth parameter (UIView) is always null. Any ideas?

public override UIView GetView(UIPickerView picker, int row, int component, UIView view)
{
    // now what to return?
}


You can never call the "base" method in [Model] classes. This is why you get a descriptive exception that says "Do not call the base method".

All you have to do is not call the base method :-)

Return the last view parameter that is passes as the method return value.


I found this code that Miguel wrote that answers the question. Posted for future reference: http://primates.ximian.com/~miguel/tmp/monocatalog/pickercustom.cs

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜