val*_*ero 6 c# xamarin.ios ios monotouch.dialog
我将EntryElement子类化,并UILineBreakMode在GetCell方法中设置如下:
public class EntryElementEnhanced : EntryElement, IElementSizing
{
public EntryElementEnhanced(string caption, string placeholder, string value) : base (caption, placeholder, value) {}
public float GetHeight(UITableView view, NSIndexPath indexPath)
{
return 100.0f; //arbitrary number just for testing
}
public override UITableViewCell GetCell (UITableView tv)
{
var cell = base.GetCell (tv);
cell.TextLabel.LineBreakMode = UILineBreakMode.WordWrap;
cell.TextLabel.Lines = 0;
return cell;
}
}
Run Code Online (Sandbox Code Playgroud)
这似乎不会使输入单元格的文本被包装.我应该把它放在其他地方吗?
如果有人知道更好的方法,我想在更高层次上完成的是我想在MonoTouch.Dialog中创建相当于UITextArea的东西.