如何在MAUI iOS中使用1x、2x和3x .png图像?
我知道我们必须使用 .svg 图像格式而不是 1x,2x,3x .png 图像格式,MAUI 会处理它,但我目前正在将现有的 Xamarin Forms 应用程序迁移到 MAUI,并且很难转换.. .
如何在 iOS 上的 .NET MAUI 中增加 TabBar 菜单项的字体大小?
我正在使用 .NET MAUI Shell Tabbar,并且我正在尝试专门在 iOS 平台上增加 TabBar 菜单项的字体大小。您能否为此提供示例代码片段? 我很感激任何
在我的 Windows 10 上,我有使用 Visual Studio 2022 版本 17.11.5 的 Maui 应用程序 在 MacBook 上我有 Sequoia 15.1 和 Xcode 16.0 它与 mac 成功配对,但当我尝试使用 iPhone 构建时......
我的应用程序在启动时在 IOS 和 Android 上运行良好,但是当我尝试在 Android 上发布应用程序时,我收到所有这些错误: android 应用程序 .net maui 1>C:\Program Files\Microsoft Visual Studio�2\
无法在 Azure DevOps 中使用 Visual Studio 17.8.3 包发布 .Net Maui Asp.Net 7 或 8 iOS 应用程序
我的应用程序过去使用 Azure DevOps 发布得很好,当时它是一个面向 iOS 16.1 且支持 15.4 框架的 ASP.net 7 应用程序。我使用的是 Visual Studio Enterprise 2022 17.5.3 包。 我...
无法在 Azure DevOps 中使用 Visual Studio 17.8.3 包发布面向 iOS 的 ASP.NET 7 或 8 Maui 应用程序
我的应用程序过去使用 Azure DevOps 发布得很好,当时它是一个面向 iOS 16.1 并具有 15.4 支持框架的 ASP.NET 7 应用程序。我使用的是 Visual Studio Enterprise 2022 17.5.3 包。 我...
我有一个使用 MSAL 登录的 maui 应用程序,我可以在 android 和 ios 上登录。但我想在运行时将值分配给 DataScheme。我们正在管道中绑定这些值并采取...
我正在使用输入控件(.Net 7),键盘类型专门设置为数字,因为不需要输入字母文本,并且会导致问题,因为它将数据发送到 BT 设备并且是
.NET MAUI、ios UseSafeArea 不工作 StackLayout、VerticalStackLayout 和 Grid
<?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Test.Views.Activities.ActivityMapList" xmlns:maps="clr-namespace:Microsoft.Maui.Controls.Maps;assembly=Microsoft.Maui.Controls.Maps" xmlns:sensors="clr-namespace:Microsoft.Maui.Devices.Sensors;assembly=Microsoft.Maui.Essentials" xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls" ios:Page.UseSafeArea="False" Shell.NavBarIsVisible="False" Style="{StaticResource Key=DefaultPage}"> <ContentPage.Content> <StackLayout> <maps:Map VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand"> <x:Arguments> <MapSpan> <x:Arguments> <sensors:Location> <x:Arguments> <x:Double>36.9628066</x:Double> <x:Double>-122.0194722</x:Double> </x:Arguments> </sensors:Location> <x:Double>0.01</x:Double> <x:Double>0.01</x:Double> </x:Arguments> </MapSpan> </x:Arguments> </maps:Map> </StackLayout> </ContentPage.Content> </ContentPage> StackLayout 或 Grid 内的地图控件,iOS 的 SafeArea 为 false,如图所示。 你有什么解决办法吗? 我需要在地图上使用网格或堆栈布局 默认情况下.NET MAUI 将考虑安全区域。所以使用特定于平台的UseSafeArea就是禁用安全区域。目前,将 UseSafeArea 设置为 false 不会改变行为(尽管应该如此),这是一个错误。另请参阅 MAUI github 上的问题:https://github.com/dotnet/maui/issues/5856 您还可以设置 IgnoreSafeArea 属性来实现相同的目的。但是,它不再在 .NET 7 中工作,请参阅以下问题:https://github.com/dotnet/maui/issues/12823 要解决您的问题,您需要将 IgnoreSafeArea="True" 添加到您的 Grid 或 StackLayout 并将 ios:Page.UseSafeArea="False" 添加到您的页面。这应该不是必需的,但这是对我有用的解决方法。 有关在 iOS 上禁用安全区域的文档可以在此处找到:https://learn.microsoft.com/en-us/dotnet/maui/ios/platform-specifics/page-safe-area-layout?view=net-毛伊岛-7.0 您可以设置 Page Padding 值来实现。在OnAppearing方法中,设置页面的safeInsets,如下代码: protected override void OnAppearing() { base.OnAppearing(); DeviceSafeInsetsService d = new DeviceSafeInsetsService(); double topArea = d.GetSafeAreaTop(); double bottomArea = d.GetSafeAreaBottom(); var safeInsets = On<iOS>().SafeAreaInsets(); safeInsets.Top = -topArea; safeInsets.Bottom = -bottomArea; Padding = safeInsets; } 要获取 topArea 和 bottomArea 值,您应该编写平台代码。答案末尾附有有关此内容的更详细教程。 首先你可以在Project文件夹中生成一个新的类文件并将其更改为部分类。生成两个部分方法。 public partial class DeviceSafeInsetsService { public partial double GetSafeAreaTop(); public partial double GetSafeAreaBottom(); } 然后在iOS平台生成部分文件并实现。该文件位于 Project/Platform/iOS 文件夹中,我想提一下的是,该文件是一个部分文件,因此命名空间应与上面的文件相同。生成此文件时,请删除命名空间中的 .Platforms.iOS 后缀。 public partial class DeviceSafeInsetsService { public partial double GetSafeAreaBottom() { if (UIDevice.CurrentDevice.CheckSystemVersion(11, 0)) { UIWindow window = UIApplication.SharedApplication.Delegate.GetWindow(); var bottomPadding = window.SafeAreaInsets.Bottom; return bottomPadding; } return 0; } public partial double GetSafeAreaTop() { if (UIDevice.CurrentDevice.CheckSystemVersion(11, 0)) { UIWindow window = UIApplication.SharedApplication.Delegate.GetWindow(); var TopPadding = window.SafeAreaInsets.Top; return TopPadding; } return 0; } } 更多信息,您可以参考如何在.NET MAUI中编写特定于平台的代码和MauiPlatformCode示例代码 希望它对你有用。
Displayalert 未显示在 IOS .net Maui 的 MopupServices 弹出页面上
下面的代码没有在 iOS 的弹出页面上显示显示警报。 在android中它可以正常工作。 我正在使用 Mopups.Pages.PopupPage 我正在使用 mvvm。 下面的代码没有在 iOS 的弹出页面上显示显示警报。 在android中它可以正常工作。 我正在使用Mopups.Pages.PopupPage 我正在使用 mvvm。 <?xml version="1.0" encoding="utf-8" ?> <pages:PopupPage xmlns:pages="clr-namespace:Mopups.Pages;assembly=Mopups" xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:animations="clr-namespace:Mopups.Animations;assembly=Mopups" xmlns:ffimage="clr-namespace:FFImageLoading.Maui;assembly=FFImageLoading.Maui" xmlns:FFImgLoad="clr-namespace:FFImageLoading.Maui;assembly=FFImageLoading.Maui" x:Class="Gaibo.Pages.CostPopupPage" BackgroundColor="#80000000" > <pages:PopupPage.Animation> <animations:ScaleAnimation PositionIn="Center" PositionOut="Center" ScaleIn=".7" ScaleOut="0.7" EasingIn="Linear"/> </pages:PopupPage.Animation> <StackLayout HorizontalOptions="CenterAndExpand" Margin="10" VerticalOptions="CenterAndExpand"> <Button Grid.Row="3" CornerRadius="20" Padding="0" Text="Submit" VerticalOptions="CenterAndExpand" HeightRequest="45" Style="{StaticResource AllSubmitBtnStyle}" Command="{Binding SubmitCostCommand}"/> </StackLayout> </pages:PopupPage> SubmitCostCommand 命令的代码 public class CampaignDetailsViewModel { private async Task SubmitCostCommandClicked() { await App.Current.MainPage.DisplayAlert("", " Thank you for submitting Post Social Link/s.", "Ok"); } } 在cs文件中 public CostPopupPage (CampaignDetailslstData CampaignData) { InitializeComponent(); var vm = new CampaignDetailsViewModel(); } 这是 Mopups 的已知问题。为了在 mopup 顶部显示警报,您需要从 mopup 页面本身而不是主页调用警报。 private async Task SubmitCostCommandClicked() { var topPage = Mopups.Services.MopupService.Instance.PopupStack[^1]; await topPage.DisplayAlert("Confirm", "Are you sure you want to cancel?", "Yes", "No") }
iOS 显示与 Android .Net MAUI Telerik 不同
我有以下适用于 Android 和 iOS 的代码,但是当运行和显示它时,一切都变得不正常或移动,这是为什么? 我有以下适用于 Android 和 iOS 的代码,但是当运行和显示它时,一切都变得不正常或移动,这是为什么? <telerik:RadListView x:Name="listView" ItemsSource="{Binding SPagina}" Margin="10" BackgroundColor="LightGray"> <telerik:RadListView.ItemTemplate > <DataTemplate> <telerik:ListViewTemplateCell > <telerik:ListViewTemplateCell.View> <StackLayout Margin="0,0,0,10" BackgroundColor="LightGray"> <telerik:RadBorder BorderColor="#44185f" Margin="0,1,0,1" CornerRadius="5" BorderThickness="3" Background="White" Padding="7"> <Grid > <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="10"/> <RowDefinition Height="Auto"/> <RowDefinition Height="10"/> <RowDefinition Height="Auto"/> <RowDefinition Height="10"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Label Grid.Row="0" Grid.ColumnSpan="6" TextColor="#3A023A" Text="{Binding TituloPublicacion}" FontSize="16" FontAttributes="Bold" FontFamily="Arial"/> <Label Grid.Row="2" Grid.Column="0" Text="Tipo:" FontSize="14"/> <Label Grid.Row="2" Grid.Column="1" Text="{Binding Tipo}" FontSize="14"/> <Label Grid.Row="2" Grid.Column="2" Text="Año:" FontSize="14"/> <Label Grid.Row="2" Grid.Column="3" Text="{Binding Anio}" FontSize="14"/> <Label Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" Text="Congreso/Revista:" FontSize="14"/> <Label Grid.Row="4" Grid.Column="2" Grid.ColumnSpan="2" Text="{Binding RevistaCongreso}" FontSize="14"/> <Label Grid.Row="6" Grid.Column="0" Text="Autores: " FontSize="12"/> <Label Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="6" Text="{Binding Autores}" FontSize="12"/> </Grid> </telerik:RadBorder> </StackLayout> </telerik:ListViewTemplateCell.View> </telerik:ListViewTemplateCell> </DataTemplate> </telerik:RadListView.ItemTemplate> 问题是两个设备上的视图看起来不同。 我放置了以下示例图像。 安卓: iOS: 为什么会出现这种情况? ... RadListView 是他们的 ListView 版本,请改用他们的 CollectionView :https://www.telerik.com/maui-ui/collectionview <telerik:RadCollectionView x:Name="collectionView" ItemsSource="{Binding SPagina}" Margin="10" BackgroundColor="LightGray">
Microsoft MAUI:如何在 MAUI 中创建在新窗口中打开的报告?
如何在 MAUI 中创建在新窗口中打开的动态报告?
我在 .NET MAUI 应用程序中遇到 WebView 控件问题,导航事件在导航后不会触发。 场景如下: WebView 的 Source 属性设置为
如何在 .NET MAUI shell 应用程序中识别用户所在的页面? 为了提供更多背景信息,这就是我正在尝试做的事情: 我的 .NET MAUI 应用程序(使用 Shell)有相当多的页面,其中一些...
如何在ios推送通知内容中添加图标图片
Flutter iOS 构建失败 - iOS 平台构建期间出错
我在尝试为 iOS 构建 Flutter 应用程序时遇到了问题。 Android 构建工作正常,但 iOS 构建失败,并出现与 iOS 模拟器相关的错误。该应用程序是使用 Flu 构建的...
我试图弄清楚如何修改此处找到的 Foursquare iOS API“BZFoursquare”:https://github.com/baztokyo/foursquare-ios-api。 在他们的示例中,他们使用一体化 ViewContro...
.NET MAUI - 为什么推送通知在发布后无法正常工作?
因此,我有一个专门针对 Android 的 .NET MAUI 移动应用程序,它已使用 Intent 过滤器通过 OnMessageReceived() 方法和 OnNewToken() 实现了推送通知,并...
尝试使用 WebView 控件编写 MAUI 应用程序,以便我可以教学生如何解决复杂的数学问题。我选择使用 MathML,因为它支持大多数数学符号以包含自动调整...
我正在我的 MAUI 项目上使用开关。我在 Android 设备 10 和 11 上发现了样式问题,但在 Android 12 上,不存在样式问题。 以下是 Android 10 和 Android 11 的屏幕截图。 贝尔...
我正在寻找一种方法来检查手机的Wi-Fi是否在Dote NET MAUI中打开或关闭。互联网连接状态并不重要,但我只需要检查 Wi-Fi 状态。 我用的是“WifiMa...
我在 .NET MAUI 中遇到注入问题,有人可以帮助我吗?
我正在使用 .NET MAUI 使用 Web API 项目,实际上我对此很陌生,因此欢迎任何有关它或文档的建议:)。我想在后台代码 Login.xaml.cs 中实现我...
Control Maps Net Maui (net 8.0) for Windows
我正在使用 net 8.0,我想使用 Maui.Controls.Map。 MauiProgram.cs 中的代码是: 公共静态 MauiApp CreateMauiApp() { var builder = MauiApp.CreateBuild...
如何获取应用程序的屏幕空间或 MAUI 中顶部和底部栏的高度?
我在计算某些项目的位置时遇到问题,以及它们是否在 MAUI 的屏幕上可见,使用如下函数 public Point GetScreenCoords(VisualElement视图) { var 结果 = 新...
.NET MAUI:自定义Shell TitleView并绑定到当前页面标题
我想用我自己的自定义布局替换默认的 Shell 标头,如下所示: 我想用我自己的自定义布局替换默认的 Shell 标头,如下所示: <?xml version="1.0" encoding="UTF-8" ?> <Shell x:Class="MyNamespace.App.AppShell" xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:MyNamespace.App" xmlns:pages="clr-namespace:MyNamespace.App.Pages" BindingContext="{x:Static local:MainView.Instance}" Shell.FlyoutBehavior="{Binding ShellFlyoutType}" x:Name="shellMain"> <Shell.TitleView> <Grid ColumnDefinitions="*,200"> <Label BindingContext="{x:Reference shellMain}" Text="{Binding Path=CurrentPage.Title, Mode=OneWay}" FontSize="Large" TextColor="White" /> <ActivityIndicator IsRunning="{Binding IsBusy}" Color="Orange" Grid.Column="1" HorizontalOptions="End" /> </Grid> </Shell.TitleView> <ShellContent Title=" Login" ContentTemplate="{DataTemplate local:MainPage}" Route="login" FlyoutItemIsVisible="False" /> <ShellContent Title="Dashboard" ContentTemplate="{DataTemplate pages:DashboardPage}" Route="dashboard" /> </Shell> 我无法绑定当前页面标题。 我的 AppShell.xaml Shell 声明如下 <Shell ... x:Name="shellMain"> 作为替代方案,您可以在 OnNaviged 方法中设置 titleview : 在 AppShell.xaml 中,定义标签的名称 <Shell.TitleView> <Grid ColumnDefinitions="*,200"> <Label BindingContext="{x:Reference shellMain}" x:Name="mylabel" FontSize="Large" TextColor="White" /> <ActivityIndicator IsRunning="{Binding IsBusy}" Color="Orange" Grid.Column="1" HorizontalOptions="End" /> </Grid> </Shell.TitleView> 在AppShell.xaml.cs中,重写OnNaviged方法,获取当前项目 protected override void OnNavigated(ShellNavigatedEventArgs args) { base.OnNavigated(args); var shellItem = Shell.Current?.CurrentItem; string title = shellItem?.Title; int iterationCount = 0; while (shellItem != null && title == null) { title = shellItem.Title; shellItem = shellItem.CurrentItem; if (iterationCount > 10) break; // max nesting reached iterationCount++; } myLabel.Text = title; } 希望它对你有用。 我正在尝试同样的方法来修改 TitleView 的外观。它可以在 iOS 上运行,尽管那里还有另一个错误。但在 Android 上我遇到了同样的问题。在前进导航中,它会更新标题,但当您按后退按钮时,标题不会更新。我已经打开了一个问题并添加了一个存储库。 https://github.com/dotnet/maui/issues/12416#issuecomment-1372627514 还有其他方法可以修改TitleView的外观吗? 我使用视图模型开发了这个解决方法,主要不是为了提供 MVVM 解决方案,而是因为其他建议的答案对我不起作用。 (我怀疑 Liqun Shen 2 月 15 日针对他自己的问题的评论中的建议会起作用。但我没有注意到这一点,直到我自己修复)。 当前页面的标题保存在可由 shell 的视图模型和每个内容页面的视图模型访问的类中: public class ServiceHelper { private static ServiceHelper? _default; public static ServiceHelper Default => _default ??= new ServiceHelper(); internal string CurrentPageTitle { get; set; } = string.Empty; } shell 中每个内容页面的视图模型提供其页面标题。为了促进这一点,大部分工作都是由基本视图模型完成的,它们都是从该模型派生而来的: public abstract class ViewModelBase(string title) : ObservableObject { private ServiceHelper? _serviceHelper; public string Title { get; } = title; internal ServiceHelper ServiceHelper { get => _serviceHelper ??= ServiceHelper.Default; set => _serviceHelper = value; // For unit testing. } public virtual void OnAppearing() { ServiceHelper.CurrentPageTitle = Title; } } 每个 shell 内容页面视图模型只需要让其基础视图模型知道它的标题: public class LocationsViewModel : ViewModelBase { public LocationsViewModel() : base("Locations") { } } 每个 shell 内容页面都需要在其视图模型中触发所需的事件响应方法: public partial class LocationsPage : ContentPage { private LocationsViewModel? _viewModel; public LocationsPage() { InitializeComponent(); } private LocationsViewModel ViewModel => _viewModel ??= (LocationsViewModel)BindingContext; protected override void OnAppearing() { base.OnAppearing(); ViewModel.OnAppearing(); } } Shell 的视图模型为标题栏提供当前页面的标题: public class AppShellViewModel() : ViewModelBase(Global.ApplicationTitle) { private string _currentPageTitle = string.Empty; public string CurrentPageTitle { get => _currentPageTitle; set { _currentPageTitle = value; OnPropertyChanged(); } } public void OnNavigated() { CurrentPageTitle = ServiceHelper.CurrentPageTitle; } } Shell 需要在其视图模型中触发所需的事件响应方法: public partial class AppShell : Shell { private AppShellViewModel? _viewModel; public AppShell() { InitializeComponent(); } private AppShellViewModel ViewModel => _viewModel ??= (AppShellViewModel)BindingContext; protected override void OnNavigated(ShellNavigatedEventArgs args) { base.OnNavigated(args); ViewModel.OnNavigated(); } } 最后,Shell 的 XAML 在标题栏/导航栏上显示由 Shell 视图模型提供的当前页面的标题: <Shell.TitleView> <HorizontalStackLayout VerticalOptions="Fill"> <Image Source="falcon_svg_repo_com.png" HeightRequest="50"/> <Label x:Name="CurrentPageTitleLabel" Text="{Binding CurrentPageTitle}" FontSize="24" Margin="10,0" VerticalTextAlignment="Center"/> </HorizontalStackLayout> </Shell.TitleView>
使用 MAUI 7.0,下一个代码允许更改弹出背景叠加颜色,但该代码不适用于 MAUI 8.0 使用 MAUI 7.0,下一个代码允许更改弹出窗口背景覆盖颜色,但该代码不适用于 MAUI 8.0 <maui:MauiWinUIApplication x:Class="TestMaui8.WinUI.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:maui="using:Microsoft.Maui" xmlns:local="using:TestMaui8.WinUI"> <maui:MauiWinUIApplication.Resources> <Color x:Key="SystemAltMediumColor">Transparent</Color> <SolidColorBrush x:Key="SystemControlPageBackgroundMediumAltMediumBrush" Color="{StaticResource SystemAltMediumColor}" /> <SolidColorBrush x:Key="ContentDialogBackgroundThemeBrush" Color="{StaticResource SystemAltMediumColor}" /> <SolidColorBrush x:Key="ContentDialogDimmingThemeBrush" Color="{StaticResource SystemAltMediumColor}" /> <StaticResource x:Key="ContentDialogBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" /> <StaticResource x:Key="PopupLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" /> <SolidColorBrush x:Key="SliderBorderBrush" Color="#1A73E8" /> <Style TargetType="Slider"> <Setter Property="BorderBrush" Value="{StaticResource SliderBorderBrush}"/> </Style> </maui:MauiWinUIApplication.Resources> </maui:MauiWinUIApplication> 有人知道为什么它不起作用以及如何修复它吗? 更新添加一些图片 CommunityToolkit Popup 没有 Overlay color 功能。您可以在 CommunityToolkit GitHub 页面上提出功能请求。 是的,您发布的上述代码曾经可以工作,但它不适用于具有最新 CommunityToolkit.Maui nuget 的 .NET8。 但是如果您想更改叠加颜色,这里有一个解决方法。 <toolkit:Popup xmlns="http://schemas.microsoft.com/dotnet/2021/maui" ... Color="Black" xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit" > //make the size to be the full screen size <ContentView WidthRequest="1920" HeightRequest="1080"> <VerticalStackLayout WidthRequest="300" HeightRequest="300" BackgroundColor="Green"> <Image Source="dotnet_bot.png"/> <Label Text="Welcome to .NET MAUI!" VerticalOptions="Center" HorizontalOptions="Center" /> </VerticalStackLayout> </ContentView> </toolkit:Popup>
为什么 MAUI DependencyService.Get 返回 null?
我正在尝试在我的 MAUI 应用程序中使用手机上的蓝牙。我关注了这篇文章。 我知道这可能不是最好的资源,但我找不到其他资源。 我是否在某个地方犯了错误,或者是......
据我了解,iOS 中无法像 Android 那样获取 BLE MAC 地址,而是 iOS 根据 BLE MAC 地址创建一个 UUID,该地址在不同的 iOS 开发中是不同的...
问题: \[!\] CocoaPods 找不到 pod“libphonenumber_plugin”的兼容版本: 在 Podfile 中: libphonenumber_plugin(来自 \`.symlinks/plugins/libphonenumber_plugin/ios\`) ...
我正在开发 .net maui 应用程序,该应用程序可以测量音量并通过蓝牙将其发送到记录数据并制作图表的电脑,作为一个业余爱好项目。我的问题是访问麦克风输入。好像有...
如何在我的 iOS 应用程序中获取包含 iOS 12 屏幕时间中显示的信息的报告?有API或者有人知道如何获取这些信息吗?
MAUI 应用程序在目标升级到 .NET8 后运行模拟器之前抛出错误
我有一个相当简单的.NET MAUI 应用程序,我正在 Win10 上的 Visual Studio 中开发它,然后通过在模拟器中运行它来测试它。它工作得很好,直到我将目标框架从 .NET7 升级到...
从服务器/API 上的 iOS 客户端检查 OAuth Facebook 令牌
我有一个通过 Facebook (FBSDK) 连接的 iOS 应用程序。应用程序上的身份验证成功,我可以检查 FBSDKAccessToken.currentAccessToken()。 我的 iOS 应用程序正在与 N...
如何在 MAUI 中重置所有 DI 服务或用户注销时的 DI 范围?
在我的 MAUI Blazor 应用程序中,用户可以在运行时注销。当他们这样做时,我基本上想重置所有注入的服务,因此当另一个用户登录时,他们会获得“新鲜”状态,避免可能的情况
我们应该在进行expo预发布后提交android和ios文件夹吗?
我刚刚运行了 expo prepublish,它生成了 .gitignore 和 ios/ 和 android/ 文件夹。 我是否应该提交 ios/ 和 android/ 文件夹,因为它没有被 .gitignore 明确排除
在 .NET MAUI ContentView 中充当可绑定属性
ContentView 中的 Bindable 属性可以是 Func 类型吗?也就是说,像这样: 公共部分类 MyControl :ContentView { 公共静态只读 BindableProperty
MAUI:如何在代码中绑定事件属性(sender、EventArgs);绑定到 ViewModel 或代码隐藏
我已使用 XAML 标记成功将 DrogGestureRecognizer 的 Drop 事件绑定到 CodeBehind,如下所示: ...
我有一个节标题列表,每个节标题有 1 行或多行。 自从更新到 iOS 16 以来,行分隔线已被推到右侧(如第一个屏幕截图所示)。 在 iOS 15.7 上运行时,该行
我找到了一些帮助,可以在 iOS 上始终显示滚动条,并且它适用于 iOS12。但是当我尝试在 iOS 13 上使用它时,滚动条再次不可见。 我使用以下 CSS 片段: ::-webkit-
开始,始于Xamarin表单上的Revenuecat内应用计费 /Maui
在下面提出自己的问题,我进行了一个小的开始,尚未测试任何代码。请随时扩展或纠正。
我最近开始了 iOS 开发,并尝试使用 Firebase 构建一个具有推送通知功能的简单的基于 Web 的 iOS 应用程序。 我已经尝试了大约 3 个关于发送推送的教程
如标题所示,该模式未在 iOS 模拟器和生成的 IPA 文件上显示。但在 Android 模拟器上运行良好。我是否错过了任何特定于 iOS 的代码?被这个问题困扰了一段时间。
Xamarin Forms 或 .NET Maui 中 RevenueCat 应用内功能的示例代码?
我在这里发布一些示例代码,因为在使用 RevenueCat 开发 Xamarin Forms 应用程序时找不到任何示例代码。
在 WWDC23 上,Apple 宣布使用某些“必要原因”API 等的应用程序和 SDK 需要提供隐私清单。 Blinkid-iOS 是否需要包含此清单? 我...
通过底部表单中的参数过滤.NET MAUI MVVM中collectionView的数据
我正在过滤一个从 ObservableCollection 获取数据的 collectionView。逻辑位于 ViewModel 类中。我从 HTTP 请求获取 ObservableCollection 的数据,之后...
将 Xamarin UWP 应用程序升级到毛伊岛后,新更新拒绝安装
这几乎正是我所发生的事情:https://learn.microsoft.com/en-us/answers/questions/1000760/migrate-uwp-app-to-maui-windows-error-after-更新?评论=问题#最新问题-
我过去问过这个问题,得到的答案是这是一个错误,它将在 NET8 中修复。 使用新版本的框架,问题仍然存在。当我跑步时...
我想从iOS SDK访问一些与相机相关的私有API,例如: - (void)setExposureMode:(int)arg1; - (int)曝光模式; 等等。这只是为了我个人的发展,我...
SoundCloud iOS 启动教程 - 无法识别的选择器
我正在遵循 iOS 快速入门教程,并且已经创建了登录 SoundCloud 的按钮,但我收到此错误: 2013-05-01 15:00:44.698 SoundCloudSample[60999:c07] +[