Saturday, August 12, 2023
HomeiOS DevelopmentHow do I register a customized handler in a .NET MAUI iOS...

How do I register a customized handler in a .NET MAUI iOS head undertaking – not in single undertaking – in .NET 8?


I’m attempting emigrate a Xamarin.Kinds utility to .NET MAUI. I’m attempting to stay with a number of head initiatives versus utilizing single undertaking.

I’m attempting to put in writing a handler for a customized management for iOS. I am unable to register this in MauiProgram.cs as a result of that’s within the shared undertaking and is aware of nothing about my iOS code.

The strategy could be to register the iOS handler in AppDelegate, within the FinishedLaunching methodology however this code does not compile in .NET 8 previews (though previously it may need labored):

Microsoft.Maui.Handlers.Handlers.AddHandler<MyCustomControl, MyCustomControlHandler>();

What’s the strategy to do that in .NET 8?



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments