第一个问题: 我有一个自定义TableViewCell与一个标签和两个按钮在其中。与UIButton和UILabel自定义TableView单元格
public override void ViewDidLoad()
{
base.ViewDidLoad();
this.btnChecked.TouchUpInside+= HandleBtnCheckedhandleTouchUpInside;
this.btnNotChecked.TouchUpInside += HandleBtnNotCheckedhandleTouchUpInside;
}
而且这里的活动
void HandleBtnNotCheckedhandleTapGestureRecognizerDelegateTouchUpInside (object sender, EventArgs e)
{
Console.WriteLine("ButtonClicked");
}
但是,如果我在UITableCell在UIButton的点击我的事件不需额外得到提升。
第二个问题:如何在代码后面更改UILabel的FontSize?
好的改变标签字体现在工作,但事件不起作用。 – Alex 2012-03-13 11:30:24
你是如何将按钮放入单元格的?你把它添加为一个子视图?尝试这样做:在GetCell去和配置像cell.ContentView.AddSubview(controller.yourbutton) – alecnash 2012-03-13 11:38:38
我在界面生成器中构建它像这个教程:http://blog.theunical.com/databases/mysql/simon-says -monotouch-lets-build-a-custom-uitableviewcell/ – Alex 2012-03-13 11:47:01