Xamarin.SwiftUI
Xamarin.SwiftUI copied to clipboard
.NET bindings for SwiftUI
Now that we are targeting .NET 6, we can make use of the [UnmanagedCallersOnlyAttribute](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.unmanagedcallersonlyattribute?view=net-6.0) and [function pointers](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-9.0/function-pointers), and remove the overhead of managed delegates for calling to/from unmanaged code. We...
In both C# and F#, `FormattableString` can be created directly from an interpolated string literal, just like `LocalizedStringKey` in SwiftUI. We should be able to inspect the `FormattableString` and extract...
[ViewModifier](https://developer.apple.com/documentation/swiftui/viewmodifier) is another protocol in SwiftUI that is implemented as a struct, very similar to `View`. - [ ] Following the pattern of the `View` class, create a `ViewModifier` base...
See workaround here: https://github.com/chkn/Xamarin.SwiftUI/commit/ce14ab140f7f0ab59bd405648df1863d314faa14 That workaround disables arm64 simulator builds so we can continue making a device+simulator universal framework. But we'll need to come up with a better solution if...
Previously, CoreCLR did not support explicit layout for structs on non-Windows platforms. To work around it, we ended up adding a bunch of dummy fields, such as [this one](https://github.com/chkn/Xamarin.SwiftUI/blob/main/src/SwiftUI/SwiftUI/HorizontalAlignment.cs#L12), to...
It looks like the API has landed in the runtimes to load code deltas: https://github.com/dotnet/runtime/issues/45689 How we might hot reload SwiftUI: - [ ] Add an extra, dummy state to...
There are a lot of warnings when building the tests--mostly in `SwiftUI.Tests` and a couple in `SwiftUI.Analyzers.Tests`. We should go through and fix these.
[App](https://developer.apple.com/documentation/swiftui/app) is a protocol very similar to `View` and we should be able to expose it in a very similar way, with only slight modifications. Similar to #23, but I...
Currently, you can define the `Body` property on a custom view in a couple ways: 1. Using the exact return type, e.g: `public ModifiedBackground Body => Text("hello").Background(Color.Red)` 2. Using the...