---
title: CSSuggestion
framework: corespotlight
role: symbol
role_heading: Class
path: corespotlight/cssuggestion
---

# CSSuggestion

The kind of suggestion to use in a query.

## Declaration

```swift
class CSSuggestion
```

## Mentioned in

Building a search interface for your app

## Overview

Overview Your app uses CSSuggestion objects to populate a contextual menu of suggestions.

## Topics

### Setting suggestion attributes

- [localizedAttributedSuggestion](corespotlight/cssuggestion/localizedattributedsuggestion-3ssly.md)
- [suggestionKind](corespotlight/cssuggestion/suggestionkind-swift.property.md)
- [CSSuggestion.SuggestionKind](corespotlight/cssuggestion/suggestionkind-swift.enum.md)

### Comparing suggestions

- [compare(_:)](corespotlight/cssuggestion/compare(_:).md)
- [compare(byRank:)](corespotlight/cssuggestion/compare(byrank:).md)

### Initializers

- [init(coder:)](corespotlight/cssuggestion/init(coder:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Queries

- [Building a search interface for your app](corespotlight/building-a-search-interface-for-your-app.md)
- [Searching for information in your app](corespotlight/searching-for-information-in-your-app.md)
- [CSUserQuery](corespotlight/csuserquery.md)
- [CSUserQueryContext](corespotlight/csuserquerycontext.md)
- [CSSearchQuery](corespotlight/cssearchquery.md)
- [CSSearchQueryContext](corespotlight/cssearchquerycontext.md)
