【发布时间】:2021-04-22 12:48:12
【问题描述】:
请帮助我在 iPhone 上打开 txt 文件。
private async Task ExecuteOpenFileCommandAsync()
{
Device.BeginInvokeOnMainThread(async () =>
{
var customFileType =
new FilePickerFileType(new Dictionary<DevicePlatform, IEnumerable<string>>
{
{ DevicePlatform.iOS, new[] { "blablabla" } },
{ DevicePlatform.Android, new[] { "text/plain" } }
});
var options = new PickOptions
{
PickerTitle = "Please select a file",
FileTypes = customFileType,
};
await PickAndShow(options);
});
}
我不知道,我需要写什么来代替“blablabla”
谢谢。
【问题讨论】:
标签: ios xamarin.forms filepicker xamarin.essentials