0
MyViewModel中有一个自定义按钮列表。Mvvmcross Touch如何在UIViewController中动态创建自定义控件列表
public class MyViewModel : MvxViewModel
{
...
public List<CustomButton> MyButtons;
}
在Android项目中,这些是通过axml添加和绑定的。
<Mvx.MvxLinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
local:MvxBind="ItemsSource MyButtons"
local:MvxItemTemplate="@layout/item_custom_button" />
在iOS项目中,我想将这些按钮水平放置在屏幕顶部并将它们绑定到MyButtons。
但我不确定如何动态创建这些按钮并将其绑定。
有什么建议吗?
相信有一个问题,其中该有已经被询问/回答(但我现在看不到它......) – Stuart 2014-12-05 07:26:48