---
title: "bestMatch(from:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsappearance/bestmatch(from:)"
---

# bestMatch(from:)

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

## Declaration

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

## Parameters

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

## Return Value

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

## Discussion

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.
