如何在MonoTouch.Dialog标题部分放置UISegmentedControl
?
答案 0 :(得分:3)
是的,您可以像处理任何常规UIView一样操纵Section类的HeaderView成员:
public class SegmentedSection : Section
{
UISegmentedControl _SegmentedControl;
public SegmentedSection()
: base("")
{
InitializeSection();
}
private void InitializeSection()
{
_SegmentedControl = new UISegmentedControl();
// initialize _SegmenentedControl here...
// make sure to set Frame appropriate relative to HeaderView bounds.
this.HeaderView.AddSubview(_SegmentedControl);
}
}