wxr
2021-11-30 e75ccccb370b47305c6eadb321efb27c86cdd28b
SiriIntentsUI/IntentViewController.cs
@@ -2,6 +2,7 @@
using CoreGraphics;
using Foundation;
using HDLSceneSiri;
//using HDLSceneSiri;
using Intents;
using IntentsUI;
@@ -55,26 +56,14 @@
            //if (@available(iOS 12.0, *))
            {
                //HDLRunSceneIntentResponse rsp = interaction.IntentResponse as HDLRunSceneIntentResponse;
                //if (rsp.Code == HDLRunSceneIntentResponseCode.Success)
                //{
                //    this.messageLabel.Text = rsp.SuccessMessage;
                //}
                //else if (rsp.Code == HDLRunSceneIntentResponseCode.Failure || rsp.Code == HDLRunSceneIntentResponseCode.Error)
                //{
                //    this.messageLabel.Text = rsp.ErrorMessage;
                //}
                //else
                {
                    //messageLabel.Text = "执行成功";// rsp.SuccessMessage;
                }
            }
            CGSize size = new CGSize(DesiredSize().Width, 80);
                HDLRunSceneIntentResponse rsp = interaction.IntentResponse as HDLRunSceneIntentResponse;
            this.lblMsg.Text = rsp.SuccessMessage;
            this.lblMsg.TextColor = UIColor.Black;
            this.lblMsg.Frame = new CGRect(0, 0, DesiredSize().Width, 100);
            CGSize size = new CGSize(DesiredSize().Width, 100);
            //if (completion != null)
            if (completion != null)
                completion(true, parameters, size);