33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using Foundation;
|
|
using UIKit;
|
|
using Avalonia;
|
|
using Avalonia.Controls;
|
|
using Avalonia.iOS;
|
|
using Avalonia.Media;
|
|
using Cowain.TestProject.Services;
|
|
|
|
namespace Cowain.TestProject.iOS;
|
|
|
|
// The UIApplicationDelegate for the application. This class is responsible for launching the
|
|
// User Interface of the application, as well as listening (and optionally responding) to
|
|
// application events from iOS.
|
|
[Register("AppDelegate")]
|
|
#pragma warning disable CA1711 // Identifiers should not have incorrect suffix
|
|
public partial class AppDelegate : AvaloniaAppDelegate<App>
|
|
#pragma warning restore CA1711 // Identifiers should not have incorrect suffix
|
|
{
|
|
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
|
|
{
|
|
return base.CustomizeAppBuilder(builder)
|
|
//.WithInterFont();
|
|
.ConfigureFonts(fontManager =>
|
|
{
|
|
fontManager.AddFontCollection(new HarmonyOSFontCollection());
|
|
})
|
|
.With(new FontManagerOptions()
|
|
{
|
|
DefaultFamilyName = "fonts:HarmonyOS Sans#HarmonyOS Sans SC"
|
|
});
|
|
}
|
|
}
|