Giter Club home page Giter Club logo

Comments (6)

github-actions avatar github-actions commented on June 25, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

from maui.

breyed avatar breyed commented on June 25, 2024

This issue is similar to #17414. The other issue lists Windows as the affected platform and gives an example of a Windows corner radius. This issue lists all platforms as likely affected and gives examples of iOS font size and color.

from maui.

mattleibow avatar mattleibow commented on June 25, 2024

Are you able to test with Xcode and Objective C? I think the Swift UI styles are not the default styles but rather the new Swift UI team's implementation of the default styles.

from maui.

dotnet-policy-service avatar dotnet-policy-service commented on June 25, 2024

Hi @breyed. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

from maui.

breyed avatar breyed commented on June 25, 2024

I created a new app in Xcode using Storyboard (UIKit) for the interface. I added to the storyboard enabled and disabled buttons, leaving all attributes at their defaults. I did this with both Swift and Objective C. Regardless of the language, the colors are identical to the SwiftUI app’s colors.

iOS 13 added support for both dark mode and SwiftUI. With dark mode support, Apple added colors that vary based on light/dark mode. SwiftUI and UIKit both tap into those.

Having thought through that, I changed SupportedOSPlatformVersion in the MAUI app to 13.0. That fixed the problem. The MAUI colors and sizes now match that of XAML. XAML does add some padding around the buttons, but that appears to be intentional to cause buttons to lay out similarly between platforms. Actually, SupportedOSPlatformVersion had no effect. I had forgotten that I had added styling code to my test app to emulate the native color and size.

from maui.

drasticactions avatar drasticactions commented on June 25, 2024

https://github.com/drasticactions/MauiRepros/tree/main/AppleColors

I wrote four test apps: One in SwiftUI, One in Swift/UIKit, One in MAUI, One with .NET iOS directly with no MAUI UI Toolkit. These screenshots were taken with the iPhone 15 Pro simulator.

Simulator Screenshot - iPhone 15 Pro - 2024-05-28 at 16 46 02

Simulator Screenshot - iPhone 15 Pro - 2024-05-28 at 16 45 18

Simulator Screenshot - iPhone 15 Pro - 2024-05-28 at 16 41 10

Simulator Screenshot - iPhone 15 Pro - 2024-05-28 at 16 47 23

If you compare the Swift app with Swift UI one, you'll have the same Hex values for the colors. Likewise with Dark mode.

Simulator Screenshot - iPhone 15 Pro - 2024-05-28 at 16 55 38

Simulator Screenshot - iPhone 15 Pro - 2024-05-28 at 16 56 00

The Swift (Non SwiftUI) colors match up with the XAML values, and the .NET iOS C# ones. Likewise with font sizes. If you want to compare the defaults in UIKit with what's in MAUI, IMO, your best bet is not using SwiftUI to do it.

from maui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.