萤石云 iOSSDK,移植跨平台相关工程
JLChen
2021-01-29 2b77dde1f45abb7ef820ce91e9aedaabe8f7e20b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System;
 
using UIKit;
 
namespace ezxamairn.iOS
{
    public partial class ItemNewViewController : UIViewController
    {
        public ItemsViewModel ViewModel { get; set; }
 
        public ItemNewViewController(IntPtr handle) : base(handle)
        {
        }
 
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
 
            btnSaveItem.TouchUpInside += (sender, e) =>
            {
                var item = new Item
                {
                    Text = txtTitle.Text,
                    Description = txtDesc.Text
                };
                ViewModel.AddItemCommand.Execute(item);
                NavigationController.PopToRootViewController(true);
            };
        }
    }
}