<!--
{
  "availability" : [
    "macOS: 10.14.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSAppearance/bestMatch(from:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSAppearance(im)bestMatchFromAppearancesWithNames:"
  },
  "title" : "bestMatch(from:)"
}
-->

# bestMatch(from:)

Returns the appearance name that most closely matches the current appearance object.

```
func bestMatch(from appearances: [NSAppearance.Name]) -> NSAppearance.Name?
```

## Parameters

`appearances`

An array of appearance names, representing the appearances that your app supports.

## Return Value

The name of the appearance that most closely matches the current appearance object.

## Discussion

You can use this method in situations where your app doesn’t fully support the current appearance, but supports a different appearance object that has similar qualities. This method returns the name from the `appearances` array that comes closest to matching the current appearance object’s attributes.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)