问题
I am working on siri kit and try to create own datatype in Intents.intentdefinition. i refer soupchef demo project which was presented by apple on last WWDC 2019 and in that demo project toppings fields has a custom type. So how custom type is showing and come in datatype/dropdown list? see below
How can i create my custom type field? Thank you in advance.
回答1:
On the left in the screenshot there are OrderSoup
, Soup
, OrderType
, OrderDetails
. If you look in in the lower parts on the left, there is a search bar and on the left of that search bar there is a minus sign and a plus sign. Click the plus one and you can define your own custom type or custom enum. When defined they are then accessible in the dropdown menu in your screenshot.
来源:https://stackoverflow.com/questions/61614972/create-custom-type-parameter-in-sirikit